Ajout du nom du fichier dans le template pour faciliter la recherche

This commit is contained in:
Benjamin Bohard 2015-07-06 15:11:15 +02:00
parent 82603c4400
commit c4642d833a
2 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,8 @@ def main():
if not path.isdir(rep): if not path.isdir(rep):
makedirs(rep) makedirs(rep)
template = jinja_env.get_template('frame.tex') template = jinja_env.get_template('frame.tex')
env = {'title': '', 'subtitle': ''} env = {'title': '', 'subtitle': '',
'name': dest}
rendered_template = template.render(**env) rendered_template = template.render(**env)
with open(dest, 'w') as rendered_file: with open(dest, 'w') as rendered_file:
rendered_file.write(rendered_template.encode('utf-8')) rendered_file.write(rendered_template.encode('utf-8'))

View File

@ -1,4 +1,5 @@
\begin{frame} \begin{frame}
\frametitle{(((title)))} \frametitle{(((title)))}
fichier (((name))) à éditer
% contenu (pas trop long) de la diapositive % contenu (pas trop long) de la diapositive
\end{frame} \end{frame}