Mise à jour des fichiers communs et script d’initialisation
This commit is contained in:
parent
893066181c
commit
525d75a3f6
|
@ -1,4 +1,3 @@
|
||||||
\documentclass{beamer}
|
|
||||||
|
|
||||||
%\usertheme{Madrid}
|
%\usertheme{Madrid}
|
||||||
\setbeamercovered{transparent}
|
\setbeamercovered{transparent}
|
||||||
|
|
|
@ -8,12 +8,18 @@ import time
|
||||||
from os import path, makedirs
|
from os import path, makedirs
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
|
||||||
|
LICENSES = {'CC-by-sa-2.0': 'license-cc-by-sa-2.0',
|
||||||
|
}
|
||||||
|
|
||||||
|
LATEX_SUBS = {}
|
||||||
|
|
||||||
|
|
||||||
def get_unique_name(base):
|
def get_unique_name(base):
|
||||||
now = time.localtime()
|
now = time.localtime()
|
||||||
year = str(now[0])
|
year = str(now[0])
|
||||||
month = str(now[1]).rjust(2, '0')
|
month = str(now[1]).rjust(2, '0')
|
||||||
day = str(now[2]).rjust(2, '0')
|
day = str(now[2]).rjust(2, '0')
|
||||||
rand = str(randint(0, 100)).rjust(2, '0')
|
rand = str(random.randint(0, 100)).rjust(2, '0')
|
||||||
return '-'.join([base, year, month, day, rand]).decode('utf-8')
|
return '-'.join([base, year, month, day, rand]).decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,13 +61,23 @@ def main():
|
||||||
else:
|
else:
|
||||||
author = author.decode('utf-8')
|
author = author.decode('utf-8')
|
||||||
|
|
||||||
|
client = args.client
|
||||||
|
if not client:
|
||||||
|
client = u'FIXME'
|
||||||
|
else:
|
||||||
|
client = client.decode('utf-8')
|
||||||
|
|
||||||
directory = args.directory
|
directory = args.directory
|
||||||
if not directory:
|
if not directory:
|
||||||
directory = ''
|
directory = ''
|
||||||
|
|
||||||
|
license = LICENSES.get(args.license, 'license-cc-by-sa-2.0')
|
||||||
|
|
||||||
env = {'root': root,
|
env = {'root': root,
|
||||||
'title': title,
|
'title': title,
|
||||||
'author': author}
|
'author': author,
|
||||||
|
'client': client,
|
||||||
|
'license': license}
|
||||||
resources = [(path.join('presentations', directory), 'main.tex'),]
|
resources = [(path.join('presentations', directory), 'main.tex'),]
|
||||||
#('slides', 'license-cc-by-sa-2.0.tex'),
|
#('slides', 'license-cc-by-sa-2.0.tex'),
|
||||||
#('slides', 'preambule.tex'),
|
#('slides', 'preambule.tex'),
|
||||||
|
@ -134,7 +150,9 @@ def main():
|
||||||
parser_init = subparsers.add_parser('init', help='Initialisation du fichier maître')
|
parser_init = subparsers.add_parser('init', help='Initialisation du fichier maître')
|
||||||
parser_init.add_argument('-n', '--name', help="Nom du fichier à créer", required=True)
|
parser_init.add_argument('-n', '--name', help="Nom du fichier à créer", required=True)
|
||||||
parser_init.add_argument('-a', '--author', help="Auteur de la formation")
|
parser_init.add_argument('-a', '--author', help="Auteur de la formation")
|
||||||
|
parser_init.add_argument('-c', '--client', help="Client")
|
||||||
parser_init.add_argument('-t', '--title', help="Titre de la formation")
|
parser_init.add_argument('-t', '--title', help="Titre de la formation")
|
||||||
|
parser_init.add_argument('-l', '--license', help="Termes de mise à disposition de la formation")
|
||||||
parser_init.add_argument('-d', '--directory', help="Sous-répertoires où créer le fichier", required=True)
|
parser_init.add_argument('-d', '--directory', help="Sous-répertoires où créer le fichier", required=True)
|
||||||
parser_init.set_defaults(func=init)
|
parser_init.set_defaults(func=init)
|
||||||
parser_update = subparsers.add_parser('update', help='Mise à jour des fichiers inclus')
|
parser_update = subparsers.add_parser('update', help='Mise à jour des fichiers inclus')
|
||||||
|
|
|
@ -12,15 +12,14 @@
|
||||||
bib = database/bib
|
bib = database/bib
|
||||||
]{skblocal.tex}
|
]{skblocal.tex}
|
||||||
|
|
||||||
\skbinput[]{styles/preambule}
|
\skbinput[from=rep]{style/preambule_slides}
|
||||||
\skbinput[]{styles/formation\_en}
|
|
||||||
|
|
||||||
\title[]{(((title)))}
|
\title[]{(((title)))}
|
||||||
\subtitle{XXX CLIENT XXX}
|
\subtitle{(((client)))}
|
||||||
|
|
||||||
\author[Equipe Auteur]{(((author)))}
|
\author[Equipe Auteur]{(((author)))}
|
||||||
|
|
||||||
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo\_01.png}}
|
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}}
|
||||||
|
|
||||||
\date{{\small \today}}
|
\date{{\small \today}}
|
||||||
|
|
||||||
|
@ -36,7 +35,7 @@
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\skbinput[]{styles/title.tex}
|
\skbinput[from=rep]{style/title}
|
||||||
|
|
||||||
% Corps de la formation
|
% Corps de la formation
|
||||||
%\skbinput[from=slides]{}
|
%\skbinput[from=slides]{}
|
||||||
|
|
Loading…
Reference in New Issue