first commit

This commit is contained in:
Valentin Deniaud 2021-06-10 16:10:33 +02:00
commit 6f32ef3911
10 changed files with 835 additions and 0 deletions

20
.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
# LaTeX generated files.
*.aux
*.bbl
*.blg
*.dvi
*.gz
*.lof
*.log
*.lot
*.nav
*.out
*.snm
*.tdo
*.toc
*.xml
*.fls
*.vrb
*.fdb_latexmk
_minted*
presentation.pdf

5
formation-api/README Normal file
View File

@ -0,0 +1,5 @@
Pour compiler il faut les packages minted et mdframed, présents sous debian dans texlive-latex-extra, à installer via apt.
Ensuite, il faut passer --shell-escape à son compilateur LaTeX, par exemple lualatex --shell-escape formation.tex.
Les fichier *.sty sont issus du thème focus : https://github.com/elauksap/focus-beamertheme.

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,73 @@
% Copyright (C) 2018-2020 Pasquale Claudio Africa and the LaTeX community.
% A full list of contributors can be found at
%
% https://github.com/elauksap/focus-beamertheme
%
% This file is part of beamerthemefocus.
%
% beamerthemefocus is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% beamerthemefocus is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.
\mode<presentation>
% DEFINE COLORS. ---------------------------------------------------------------
\definecolor{main}{RGB}{64, 64, 64}
\definecolor{background}{RGB}{239, 239, 239}
\definecolor{alert}{RGB}{180, 0, 0}
\definecolor{example}{RGB}{0, 110, 0}
% SET COLORS. ------------------------------------------------------------------
\setbeamercolor{normal text}{fg=main, bg=background}
\setbeamercolor{alerted text}{fg=alert}
\setbeamercolor{example text}{fg=example}
\setbeamercolor{titlelike}{fg=background, bg=main}
\setbeamercolor{frametitle}{parent={titlelike}}
\setbeamercolor{footline}{fg=background, bg=main}
\setbeamercolor{block title}{bg=main!80!background, fg=background}
\setbeamercolor{block body}{bg=main!10!background, fg=main}
\setbeamercolor{block title alerted}{bg=alert, fg=background}
\setbeamercolor{block body alerted}{bg=alert!10!background, fg=main}
\setbeamercolor{block title example}{bg=example, fg=background}
\setbeamercolor{block body example}{bg=example!10!background, fg=main}
\setbeamercolor{itemize item}{fg=main}
\setbeamercolor{itemize subitem}{fg=main}
\setbeamercolor{enumerate item}{fg=main!70!black}
\setbeamercolor{enumerate subitem}{fg=main!70!black}
\setbeamercolor{description item}{fg=main!70!black}
\setbeamercolor{description subitem}{fg=main!70!black}
\setbeamercolor{caption name}{fg=main}
\setbeamercolor{section in toc}{fg=main}
\setbeamercolor{subsection in toc}{fg=main}
\setbeamercolor{section number projected}{bg=main}
\setbeamercolor{subsection number projected}{bg=main}
\setbeamercolor{bibliography item}{fg=main}
\setbeamercolor{bibliography entry author}{fg=main!70!black}
\setbeamercolor{bibliography entry title}{fg=main}
\setbeamercolor{bibliography entry location}{fg=main}
\setbeamercolor{bibliography entry note}{fg=main}
\mode<all>

View File

@ -0,0 +1,50 @@
% Copyright (C) 2018-2020 Pasquale Claudio Africa and the LaTeX community.
% A full list of contributors can be found at
%
% https://github.com/elauksap/focus-beamertheme
%
% This file is part of beamerthemefocus.
%
% beamerthemefocus is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% beamerthemefocus is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.
\mode<presentation>
% SET FONTS. -------------------------------------------------------------------
\setbeamerfont{title}{size=\huge, shape=\scshape\bfseries}
\setbeamerfont{subtitle}{size=\Large, shape=\scshape, parent=structure}
\setbeamerfont{author}{size=\Large, shape=\scshape}
\setbeamerfont{institute}{size=\large, shape=\scshape}
\setbeamerfont{date}{size=\large, shape=\scshape}
\setbeamerfont{sectiontitle}{size=\huge, series=\scshape\bfseries}
\setbeamerfont{subsectiontitle}{size=\Large, series=\scshape\bfseries}
\setbeamerfont{frametitle}{size=\Large, shape=\scshape}
\setbeamerfont{footline}{size=\scriptsize}
\setbeamerfont{focusframe}{size=\huge, shape=\scshape}
\setbeamerfont{description item}{shape=\bfseries}
\setbeamerfont{caption name}{shape=\bfseries}
\setbeamerfont{bibliography item}{size=\small, shape=\scshape}
\setbeamerfont{bibliography entry author}{size=\small, shape=\scshape}
\setbeamerfont{bibliography entry title}{size=\small, series=\scshape\bfseries}
\setbeamerfont{bibliography entry location}{size=\small, shape=\scshape\normalfont}
\setbeamerfont{bibliography entry note}{size=\small, shape=\scshape\normalfont}
\mode<all>

View File

@ -0,0 +1,150 @@
% Copyright (C) 2018-2020 Pasquale Claudio Africa and the LaTeX community.
% A full list of contributors can be found at
%
% https://github.com/elauksap/focus-beamertheme
%
% This file is part of beamerthemefocus.
%
% beamerthemefocus is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% beamerthemefocus is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.
\mode<presentation>
\RequirePackage{tikz}
% CUSTOMIZE STRUCTURE ELEMENTS. ------------------------------------------------
\setbeamertemplate{blocks}[default]
\setbeamertemplate{section in toc}[square]
\setbeamertemplate{subsection in toc}[square]
\setbeamertemplate{itemize items}[square]
\setbeamertemplate{itemize subitem}[triangle]
% STRUCTURE FRAME TEMPLATE DEFINITIONS. ----------------------------------------
% Title page.
\defbeamertemplate*{title page}{focus}{%
{%
\usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}%
\begin{tikzpicture}[overlay, remember picture]
\fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
\end{tikzpicture}
}
\vspace{-1.65\baselineskip}
\begin{minipage}[b][0.35\paperheight]{\textwidth}
\vspace{\baselineskip}
\usebeamerfont{title}
\usebeamercolor[fg]{frametitle}
\inserttitle
\end{minipage}
\begin{minipage}[t][0.1\paperheight]{\textwidth}
\usebeamerfont{subtitle}
\usebeamercolor[fg]{frametitle}
\insertsubtitle
\end{minipage}
% Set the title graphic in a zero-height box, so that
% the position of other elements is not affected.
{\vfuzz=9999pt\vbox to 0pt {
\raggedleft
\inserttitlegraphic
}}
\begin{minipage}[t]{\textwidth}
\usebeamerfont{author}
\insertauthor
\end{minipage}
\vspace*{\baselineskip}
\begin{minipage}[t]{\textwidth}
\usebeamerfont{institute}
\insertinstitute
\end{minipage}
\vspace*{\baselineskip}
\begin{minipage}[t]{\textwidth}
\usebeamerfont{date}
\insertdate
\end{minipage}
\vspace*{0pt plus 100fill}
\addtocounter{framenumber}{-1}
\addtocounter{realframenumber}{-1}
}
% Section page.
\defbeamertemplate*{section page}{focus}{%
{%
\usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}%
\begin{tikzpicture}[overlay, remember picture]
\fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
\end{tikzpicture}%
}
\vspace{-2.5\baselineskip}
\begin{minipage}[b][0.45\paperheight]{\textwidth}
\usebeamerfont{sectiontitle}
\usebeamercolor[fg]{frametitle}
\let\hyperlink\@secondoftwo\insertsection
\end{minipage}
\vspace{\baselineskip}
\begin{minipage}[t][0.5\paperheight]{\textwidth}
\usebeamerfont{subsectiontitle}
\usebeamercolor[bg]{frametitle}
\insertsubsection
\end{minipage}
}
\AtBeginSection[]{%
\begin{frame}[plain, noframenumbering]{}
\sectionpage
\end{frame}%
}
% Subsection page.
\defbeamertemplate*{subsection page}{focus}{%
{%
\usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}%
\begin{tikzpicture}[overlay, remember picture]
\fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
\end{tikzpicture}%
}
\vspace{-2.5\baselineskip}
\begin{minipage}[b][0.45\paperheight]{\textwidth}
\usebeamerfont{sectiontitle}
\usebeamercolor[fg]{frametitle}
\let\hyperlink\@secondoftwo\insertsection
\end{minipage}
\vspace{\baselineskip}
\begin{minipage}[t][0.5\paperheight]{\textwidth}
\usebeamerfont{subsectiontitle}
\usebeamercolor[bg]{frametitle}
\insertsubsection
\end{minipage}
}
\AtBeginSubsection[]{%
\begin{frame}[plain, noframenumbering]{}
\subsectionpage
\end{frame}%
}
\mode<all>

View File

@ -0,0 +1,272 @@
% Copyright (C) 2018-2020 Pasquale Claudio Africa and the LaTeX community.
% A full list of contributors can be found at
%
% https://github.com/elauksap/focus-beamertheme
%
% This file is part of beamerthemefocus.
%
% beamerthemefocus is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% beamerthemefocus is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.
\mode<presentation>
\RequirePackage{appendixnumberbeamer} % Don't number appendix frames.
% Fix hyperref warning caused by \appendix
% (https://tex.stackexchange.com/questions/192686/hyperref-warning-caused-by-beamer-appendix).
\newcommand*{\bkmtranslateto}{\languagename}
\newcommand*{\bkmtranslate}[1]{%
\ifcsname tr@@@\bkmtranslateto @#1\endcsname
\csname tr@@@\bkmtranslateto @#1\endcsname
\else
#1%
\fi
}
\pdfstringdefDisableCommands{\let\translate\bkmtranslate}
\RequirePackage{bookmark}
\RequirePackage{etoolbox} % \BeforeBeginEnvironment.
\RequirePackage{tikz}
\newcounter{realframenumber}
% FRAMETITLE TEMPLATES. --------------------------------------------------------
\defbeamertemplate*{frametitle}{focus}{%
% If not title page.
\ifnum\value{realframenumber}>0%
\vspace{-1pt}%
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.55cm,rightskip=0.55cm,sep=0.2cm]{frametitle}%
\strut\insertframetitle\strut%
\end{beamercolorbox}%
\fi%
}
% Plain header.
\defbeamertemplate{frametitle}{plain}{%
% If not title page.
\ifnum\value{realframenumber}>0%
\vspace{-1pt}%
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.55cm,rightskip=0.55cm,sep=0.2cm,ignorebg]{frametitle}%
\strut%
\end{beamercolorbox}%
\fi%
}
% FOOTLINE TEMPLATES. ----------------------------------------------------------
% Lenghts for the progress bar footline.
\newlength{\focus@pbar@height}% Progress bar height.
\newlength{\focus@pbar@leftoffset}
\newlength{\focus@pbar@rightoffset}
\defbeamertemplate*{footline}{progressbar}{%
% If not appendix.
\ifnum\mainend<0% From package appendixnumberbeamer.
%
\settowidth{\focus@pbar@leftoffset}{1}%
\addtolength{\focus@pbar@leftoffset}{1.5em}%
%
\settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}%
\addtolength{\focus@pbar@rightoffset}{1.5em}%
%
% If not title page.
\ifnum\value{realframenumber}>0%
\ifnum\value{framenumber}<\inserttotalframenumber%
\begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]\usebeamerfont{footline}
\pgfmathsetmacro{\focus@pbar@progress}%
{(\paperwidth-\focus@pbar@leftoffset-\focus@pbar@rightoffset)*(\insertframenumber/\inserttotalframenumber)}
\clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\fill[footline.bg] (0,0) rectangle ++(\the\focus@pbar@leftoffset,\the\focus@pbar@height);
\fill[footline.bg] (\the\focus@pbar@leftoffset,0) rectangle ++(\focus@pbar@progress pt,\the\focus@pbar@height)
++(0,{-0.5*\the\focus@pbar@height}) node[anchor=east, text=footline.fg] {\strut\insertframenumber};
\fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus@pbar@rightoffset,\the\focus@pbar@height)
++(0,{-0.5*\the\focus@pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber};
\end{tikzpicture}%
\else%
\begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]
\clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber};
\node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/};
\node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber};
\end{tikzpicture}%
\fi%
\fi%
\fi%
}
% Full bar footline.
\def\footlineinfo#1{\def\focus@footlineinfo{#1}}
\footlineinfo{} % Empty by default.
\defbeamertemplate{footline}{fullbar}{%
% If not appendix.
\ifnum\mainend<0% From package appendixnumberbeamer.
%
\settowidth{\focus@pbar@leftoffset}{1}%
\addtolength{\focus@pbar@leftoffset}{1.5em}%
%
\settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}%
\addtolength{\focus@pbar@rightoffset}{1.5em}%
%
% If not title page.
\ifnum\value{realframenumber}>0%
\begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]
\clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\ifx\focus@footlineinfo\empty
\else
\node[anchor=west, footline.fg] at ({\the\focus@pbar@leftoffset},{0.5*\focus@pbar@height}) {\focus@footlineinfo};
\fi
\node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber};
\node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/};
\node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber};
\end{tikzpicture}%
\fi%
\fi%
}
% Empty footline.
\defbeamertemplate{footline}{none}{}
\DeclareOptionBeamer{numbering}{\def\beamer@focus@numbering{#1}}
\ExecuteOptionsBeamer{numbering=progressbar}
\ProcessOptionsBeamer
\def\beamer@focus@numberingprogressbar{progressbar}
\def\beamer@focus@numberingfullbar{fullbar}
\def\beamer@focus@numberingnone{none}
% BACKGROUND CANVAS TEMPLATES. -------------------------------------------------
\defbeamertemplate*{background canvas}{focus}{%
\begin{tikzpicture}
\clip (0,0) rectangle ++(\paperwidth,\paperheight);
\fill[normal text.bg] (0,0) rectangle ++(\paperwidth,\paperheight);
\end{tikzpicture}%
}
\defbeamertemplate{background canvas}{focusframe}{%
\begin{tikzpicture}
\clip (0,0) rectangle ++(\paperwidth,\paperheight);
\fill[frametitle.bg] (0,0) rectangle ++(\paperwidth,\paperheight);
\end{tikzpicture}%
}
% HOOKS FOR CREATING FRAMES. ---------------------------------------------------
\BeforeBeginEnvironment{frame}{%
\stepcounter{realframenumber}
\setbeamertemplate{background canvas}[focus]%
\setbeamertemplate{frametitle}[focus]%
%
% Reset footline height and determine it for the current slide.
\setlength{\focus@pbar@height}{0cm}%
\focus@calculatefootheight%
%
% If not appendix.
\ifnum\mainend<0 % From package appendixnumberbeamer.
\settoheight{\focus@pbar@height}{\usebeamerfont{footline}1234567890/}%
\addtolength{\focus@pbar@height}{6pt}%
%
\ifx\beamer@focus@numbering\beamer@focus@numberingprogressbar%
\setbeamertemplate{footline}[progressbar]%
\else%
\ifx\beamer@focus@numbering\beamer@focus@numberingfullbar%
\setbeamertemplate{footline}[fullbar]%
\fi%
\fi%
%
\focus@calculatefootheight%
\fi%
}
% Enable noframenumbering option.
\define@key{beamerframe}{noframenumbering}[true]{%
\setbeamertemplate{footline}[none]%
\setlength{\focus@pbar@height}{0cm}%
\focus@calculatefootheight%
%
\addtocounter{framenumber}{-1}%
}
% Enable plain option.
\define@key{beamerframe}{plain}[true]{%
\setbeamertemplate{background canvas}[focus]%
\setbeamertemplate{frametitle}[plain]%
%
\setbeamertemplate{footline}[none]%
}
% Full vertical centering
% (from https://tex.stackexchange.com/questions/247826/beamer-full-vertical-centering).
\define@key{beamerframe}{c}[true]{%
\beamer@frametopskip=0pt plus 1fill\relax%
\beamer@framebottomskip=0pt plus 1fill\relax%
\beamer@frametopskipautobreak=0pt plus 0.4\paperheight\relax%
\beamer@framebottomskipautobreak=0pt plus 0.6\paperheight\relax%
\def\beamer@initfirstlineunskip{}%
}
% Enable focus option.
\providebool{focus@standout}
\define@key{beamerframe}{focus}[true]{%
\booltrue{focus@standout}%
\begingroup%
\setkeys{beamerframe}{noframenumbering}%
\setbeamertemplate{background canvas}[focusframe]%
\setbeamertemplate{frametitle}[plain]%
%
\setkeys{beamerframe}{c}%
\centering%
\usebeamerfont{focusframe}%
\usebeamercolor[fg]{frametitle}%
}
\apptocmd{\beamer@reseteecodes}
{%
\ifbool{focus@standout}%
{%
\endgroup%
\boolfalse{focus@standout}%
}{}%
}{}{}
% Recalculate the footline's size and refresh other parameters.
% Partially copied from the definition of \beamer@calculateheadfoot.
\def\focus@calculatefootheight{%
\footheight=\focus@pbar@height%
\advance\footheight by 4pt%
\sidebarheight=\paperheight%
\advance\sidebarheight by-\headheight%
\advance\sidebarheight by\headdp%
\advance\sidebarheight by-\footheight%
\advance\sidebarheight by 4pt%
\footskip=\footheight%
\textheight=\paperheight%
\advance\textheight by-\footheight%
\advance\textheight by-\headheight%
\@colht\textheight%
\@colroom\textheight%
\vsize\textheight%
}
\mode<all>

View File

@ -0,0 +1,62 @@
% Copyright (C) 2018-2020 Pasquale Claudio Africa and the LaTeX community.
% A full list of contributors can be found at
%
% https://github.com/elauksap/focus-beamertheme
%
% This file is part of beamerthemefocus.
%
% beamerthemefocus is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% beamerthemefocus is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemefocus}[2020/11/18 v2.8.1 Focus Beamer theme]
\mode<presentation>
% THEME OPTIONS. ---------------------------------------------------------------
\DeclareOptionBeamer{numbering}{%
\PassOptionsToPackage{numbering=#1}{beamerouterthemefocus}
}
\newif\if@focus@loadfirafonts
\@focus@loadfirafontstrue
\DeclareOptionBeamer{nofirafonts}{\@focus@loadfirafontsfalse}
\ProcessOptionsBeamer
% LOAD EXTERNAL PACKAGES. ------------------------------------------------------
\if@focus@loadfirafonts
\RequirePackage[T1]{fontenc}
\PassOptionsToPackage{type1}{FiraSans}
\PassOptionsToPackage{type1}{FiraMono}
\RequirePackage{FiraSans}
\RequirePackage{FiraMono}
\fi
\usecolortheme{focus}
\usefonttheme{focus}
\useinnertheme{focus}
\useoutertheme{focus}
\setbeamertemplate{navigation symbols}{}
% SET MARGINS. -----------------------------------------------------------------
\setbeamersize{text margin left=0.75cm, text margin right=0.75cm}
\setlength{\leftmargini}{0.75cm}
\mode<all>

BIN
formation-api/eo.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,203 @@
\documentclass{beamer}
\usetheme{focus}
\usepackage{minted}
\usepackage{mdframed}
\setbeameroption{show notes}
\surroundwithmdframed{minted}
\AtBeginEnvironment{frame}{\setcounter{footnote}{0}}
\setbeamerfont{footnote}{size=\tiny}
\title{Formation : usage des API Publik}
\author{Valentin Deniaud}
\titlegraphic{\includegraphics[scale=0.75]{eo.pdf}}
\institute{Académie de Versailles}
\date{29/06/2021}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}{Sommaire}
\tableofcontents
\end{frame}
\begin{frame}[noframenumbering,plain]
Ne pas oublier de lancer l'enregistrement !
\end{frame}
\section{Introduction}
\begin{frame}{Vue d'ensemble}
\begin{itemize}
\item Pas un logiciel mais plusieurs « briques »
\item Écrites en Python/Django
\begin{itemize}
\item Mais ce n'est pas important !
\note[item]{Passer par les API permet justement d'utiliser son langage favori}
\end{itemize}
\item Reliées entre elles via
\begin{itemize}
\item API webservices
\note[item]{Et ouais, le consommateur numéro 1 des API Publik c'est Publik.}
\item Provisionning
\item SSO
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Les briques et leurs fonctions}
\begin{itemize}
\item w.c.s. : démarches
\note[item]{On va se concentrer sur wcs.}
\item authentic : connexion
\note[item]{Et parler un peu de l'API authentic.}
\item combo : portail
\item passerelle : connexion
\note[item]{Éventuellement un laïus sur à quel point c'est nul les connecteurs + pas le but de cette formation.}
\item chrono : prise de rendez-vous
\note[item]{L'API chrono est foisonnante mais on va pas en parler sauf cas d'usage spécifique.}
\end{itemize}
\end{frame}
\begin{frame}{Schéma général}
\includegraphics[scale=0.49]{architecture.png}
\end{frame}
\begin{frame}{Documentation utile}
\small{\url{https://doc-publik.entrouvert.com/dev/connecteurs/}}
\end{frame}
\section{Source de données}
\begin{frame}[fragile]{Présentation}
\begin{itemize}
\item Objectif : récupérer des informations depuis un SI externe
\item Dictionnaire JSON
\item Structure très simple
\note[item]{Rendre une API compatible Publik, c'est facile !}
\end{itemize}
\begin{minted}[tabsize=4]{json}
{
"err": 0,
"data": {
"text": "Donnée 1",
"id": 1,
"xxx": "clé supplémentaire"
}
}
\end{minted}
\end{frame}
\begin{frame}[fragile]{Et les erreurs ?}
\begin{minted}[tabsize=4]{json}
{
"err": 1,
"err_class": "TypeError",
"err_desc": "name must be a string",
"data": null
}
\end{minted}
\end{frame}
\begin{frame}{Utilisation dans une démarche}
\begin{itemize}
\item Alimentation d'un champ liste\footnote{\url{https://doc-publik.entrouvert.com/admin-fonctionnel/fabrique-formulaires/form-champs/champ_liste/}}
\note[item]{Exemple à base d'etherpad, genre \url{https://pad.inpt.fr/p/test-ws}}
\item Cas d'usage avancé : autocomplétion\footnote{\url{https://doc-publik.entrouvert.com/admin-fonctionnel/les-tutos/utiliser-l-autocompletion/}}
\note[item]{Exemple à partir d'un connecteur passerelle existant}
\begin{itemize}
\item Requis quand il y a beaucoup de données
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Utilisation dans le portail}
\begin{itemize}
\item Cellule JSON\footnote{\url{https://doc-publik.entrouvert.com/admin-fonctionnel/fabrique-formulaires/form-champs/champ_liste/}}
\note[item]{Exemple à base d'etherpad, bis}
\note[item]{Ne pas trop s'apesantir parce que relou pour nous d'intégrer ça.}
\item Utilisation du langage de template Django\footnote{\url{https://docs.djangoproject.com/fr/2.2/ref/templates/language/}}
\item Des filtres supplémentaires sont disponibles\footnote{\url{https://doc-publik.entrouvert.com/admin-fonctionnel/parametrage-avance/utiliser-les-filtres/}}
\end{itemize}
\end{frame}
\section{Appel Webservice}
\begin{frame}{Présentation}
\begin{itemize}
\item Objectif : envoyer des données
\note[item]{Exemple à base de \url{https://requestbin.com}}
\begin{itemize}
\item Toujours en JSON
\end{itemize}
\item Et en récupérer (même format que les sources de données)
\end{itemize}
\end{frame}
\begin{frame}{Utilisation}
\begin{itemize}
\item Dans les workflows
\begin{itemize}
\item Action « Webservice »\footnote{\url{https://doc-publik.entrouvert.com/admin-fonctionnel/fabrique-de-workflows/les-actions-de-workflow/elements_appeler-webservices/}}
\item Envoyer les données de la demande
\end{itemize}
\item Dans les formulaires
\begin{itemize}
\item Déclaration dans les paramètres
\item Condition de sortie de page, champ commentaire...
\end{itemize}
\end{itemize}
\end{frame}
\section{API}
\begin{frame}{Authentification}
\begin{itemize}
\item Authentification HTTP Basic, à privilégier
\item Authentification par signature \footnote{\url{https://doc-publik.entrouvert.com/dev/wcs/api-webservices/authentification/}}
\end{itemize}
\end{frame}
\subsection{API démarches}
\begin{frame}{Agir sur une demande}
\begin{itemize}
\item Déclencheur d'une action « Saut automatique » \footnote{\url{https://doc-publik.entrouvert.com/admin-fonctionnel/fabrique-de-workflows/les-actions-de-workflow/actions_transition-automatique/}}
\begin{itemize}
\item Ou d'une action globale
\end{itemize}
\item Appel authentifié en POST vers l'adresse du formulaire à traiter \footnote{\url{https://doc-publik.entrouvert.com/dev/wcs/api-webservices/traitement-d-un-formulaire/}}
\end{itemize}
\end{frame}
\begin{frame}{Web services exposés}
\begin{itemize}
\item w.c.s. expose une large API
\begin{itemize}
\item Récupérer la liste de tous les formulaires
\item Récupérer les données d'un formulaire
\item Compléter un formulaire
\end{itemize}
\item Documentation : \url{https://doc-publik.entrouvert.com/dev/wcs/api-webservices/}
\note[item]{Souligner que c'est une approche alternative, push vs pull, tout ça.}
\end{itemize}
\end{frame}
\subsection{API connexion}
\begin{frame}{Web services exposés}
\begin{itemize}
\item authentic expose une large API
\begin{itemize}
\item Lister et rechercher des utilisateurs
\item Créer ou supprimer un utilisateur
\item Agir sur les rôles
\end{itemize}
\item Documentation : \url{https://doc-publik.entrouvert.com/dev/api-authentic/}
\end{itemize}
\end{frame}
\begin{frame}[focus]
Fin !
\end{frame}
\end{document}