Révision du script d’initialisation des documents de formation
This commit is contained in:
parent
d27cbaf6ce
commit
318c24f60b
|
@ -13,8 +13,10 @@ LICENSES = {'CC-by-sa-2.0': 'license-cc-by-sa-2.0',
|
||||||
|
|
||||||
TEMPLATES = {
|
TEMPLATES = {
|
||||||
'beamer': {'fragment': 'frame.tex',
|
'beamer': {'fragment': 'frame.tex',
|
||||||
|
'fragment_pratique': 'frame-pratique.tex',
|
||||||
'master': 'main-beamer.tex'},
|
'master': 'main-beamer.tex'},
|
||||||
'article': {'fragment': 'fragment.tex',
|
'article': {'fragment': 'fragment.tex',
|
||||||
|
'fragment_pratique': 'fragment-pratique.tex',
|
||||||
'master': 'main-article.tex'}
|
'master': 'main-article.tex'}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +94,17 @@ def main():
|
||||||
'client': client,
|
'client': client,
|
||||||
'license': license}
|
'license': license}
|
||||||
master = TEMPLATES[document_class]['master']
|
master = TEMPLATES[document_class]['master']
|
||||||
resources = [(path.join('presentations', directory), master),]
|
master_dir = path.join('presentations', directory)
|
||||||
|
programme_dir = path.join(master_dir, 'programme')
|
||||||
|
resources = [(path.join('presentations', directory), master),
|
||||||
|
(programme_dir, 'contenu.tex'),
|
||||||
|
(programme_dir, 'duree.tex'),
|
||||||
|
(programme_dir, 'evaluation.tex'),
|
||||||
|
(programme_dir, 'moyens.tex'),
|
||||||
|
(programme_dir, 'objectifs.tex'),
|
||||||
|
(programme_dir, 'prerequis.tex'),
|
||||||
|
(programme_dir, 'public.tex'),
|
||||||
|
]
|
||||||
#('slides', 'license-cc-by-sa-2.0.tex'),
|
#('slides', 'license-cc-by-sa-2.0.tex'),
|
||||||
#('slides', 'preambule.tex'),
|
#('slides', 'preambule.tex'),
|
||||||
#('slides', 'title.tex')]
|
#('slides', 'title.tex')]
|
||||||
|
@ -101,7 +113,8 @@ def main():
|
||||||
rendered_template = template.render(**env)
|
rendered_template = template.render(**env)
|
||||||
if not path.exists(directory):
|
if not path.exists(directory):
|
||||||
makedirs(directory)
|
makedirs(directory)
|
||||||
with open(path.join(directory, name), 'w') as rendered_file:
|
template_dest_name = name if template_file == master else template_file
|
||||||
|
with open(path.join(directory, template_dest_name), 'w') as rendered_file:
|
||||||
rendered_file.write(rendered_template.encode('utf-8'))
|
rendered_file.write(rendered_template.encode('utf-8'))
|
||||||
|
|
||||||
def update(args):
|
def update(args):
|
||||||
|
@ -118,17 +131,19 @@ def main():
|
||||||
tex_skbconfig = skbconfig_re.search(tex_master)
|
tex_skbconfig = skbconfig_re.search(tex_master)
|
||||||
tex_skbinputs = skbinput_re.finditer(tex_master)
|
tex_skbinputs = skbinput_re.finditer(tex_master)
|
||||||
fragment = TEMPLATES[tex_class.group('document_class')]['fragment']
|
fragment = TEMPLATES[tex_class.group('document_class')]['fragment']
|
||||||
|
fragment_pratique = TEMPLATES[tex_class.group('document_class')]['fragment_pratique']
|
||||||
|
|
||||||
for skbinput in tex_skbinputs:
|
for skbinput in tex_skbinputs:
|
||||||
rep = path.dirname(skbinput.group('tex'))
|
rep = path.dirname(skbinput.group('tex'))
|
||||||
rep = path.join(tex_skbconfig.group(skbinput.group('rep')), rep)
|
rep = path.join(tex_skbconfig.group(skbinput.group('rep')), rep)
|
||||||
basename = '{0}.tex'.format(path.basename(skbinput.group('tex')))
|
tex_name = path.basename(skbinput.group('tex'))
|
||||||
|
basename = '{0}.tex'.format(tex_name)
|
||||||
dest = path.join(rep, basename)
|
dest = path.join(rep, basename)
|
||||||
if not path.isfile(dest):
|
if not path.isfile(dest):
|
||||||
print(dest)
|
print(dest)
|
||||||
if not path.isdir(rep):
|
if not path.isdir(rep):
|
||||||
makedirs(rep)
|
makedirs(rep)
|
||||||
template = jinja_env.get_template(fragment)
|
template = jinja_env.get_template(fragment_pratique if tex_name.endswith('-pratique') else fragment)
|
||||||
env = {'title': basename, 'subtitle': '',
|
env = {'title': basename, 'subtitle': '',
|
||||||
'name': dest}
|
'name': dest}
|
||||||
rendered_template = template.render(**env)
|
rendered_template = template.render(**env)
|
||||||
|
@ -140,9 +155,9 @@ def main():
|
||||||
"""
|
"""
|
||||||
outline creation
|
outline creation
|
||||||
"""
|
"""
|
||||||
section_re = re.compile(r'\\section\{\(?P<name>.*?)}')
|
section_re = re.compile(r'\\section\{(?P<name>.*?)\}')
|
||||||
part_re = re.compile(r'\\part\{\(?P<name>.*?)}')
|
part_re = re.compile(r'\\part\{(?P<name>.*?)}')
|
||||||
subsection_re = re.compile(r'\\subsection\{\(?P<name>.*?)}')
|
subsection_re = re.compile(r'\\subsection\{(?P<name>.*?)\}')
|
||||||
with open(args.master, 'r') as master_tex:
|
with open(args.master, 'r') as master_tex:
|
||||||
master = master_tex.read()
|
master = master_tex.read()
|
||||||
parts = part_re.finditer(master)
|
parts = part_re.finditer(master)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
3 jours.
|
|
@ -0,0 +1 @@
|
||||||
|
L'appropriation des connaissances est contrôlée par des travaux pratiques durant la formation.
|
|
@ -0,0 +1,2 @@
|
||||||
|
\skbheading{(((title|escape_tex)))}
|
||||||
|
fichier (((name|escape_tex))) à éditer
|
|
@ -0,0 +1,7 @@
|
||||||
|
{\setbeamercolor{background canvas}{bg=TravauxPratiques}
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{(((title|escape_tex)))}
|
||||||
|
fichier (((name|escape_tex))) à éditer
|
||||||
|
% contenu (pas trop long) de la diapositive
|
||||||
|
\end{frame}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
\begin{itemize}
|
||||||
|
\item une salle de formation équipée d'ordinateurs avec infrasctructure de démonstration pour les travaux pratiques ;
|
||||||
|
\item un formateur avec l'expérience de l'installation et de la maintenance des solutions présentées.
|
||||||
|
\end{itemize}
|
|
@ -0,0 +1 @@
|
||||||
|
Le participant à la formation est autonome pour l'administration des serveurs et la recherche d'informations en vue de résoudre les incidents.
|
|
@ -0,0 +1 @@
|
||||||
|
Avoir suivi la formation tronc commun.
|
|
@ -0,0 +1 @@
|
||||||
|
La formation vise toute personne ayant en charge des tâches d'administration sur des serveurs équipés des modules EOLE ScribeAD ou EOLE Horus.
|
Loading…
Reference in New Issue