faciliter l'invocation depuis la ligne de commande
Cette révision appartient à :
@@ -17,7 +17,13 @@ def compiler(nf, suff) :
|
|||||||
def clean(nf, suff) :
|
def clean(nf, suff) :
|
||||||
subprocess.call(["latexmk", "-cd", "-c", "-jobname="+os.path.splitext(os.path.basename(nf))[0]+suff, nf])
|
subprocess.call(["latexmk", "-cd", "-c", "-jobname="+os.path.splitext(os.path.basename(nf))[0]+suff, nf])
|
||||||
|
|
||||||
with open(sys.argv[1]) as f :
|
if sys.argv[1].endswith(".tex") :
|
||||||
|
nf = sys.argv[1]
|
||||||
|
else :
|
||||||
|
nf = sys.argv[1]+".tex"
|
||||||
|
|
||||||
|
|
||||||
|
with open(nf) as f :
|
||||||
for l in f.readlines() :
|
for l in f.readlines() :
|
||||||
if l.strip() == "" or l.strip().startswith("%") :
|
if l.strip() == "" or l.strip().startswith("%") :
|
||||||
continue
|
continue
|
||||||
@@ -29,6 +35,8 @@ with open(sys.argv[1]) as f :
|
|||||||
modes = [("-ENONCE", ""), ("-PROF", ""), ("-CORRIGE", "")]
|
modes = [("-ENONCE", ""), ("-PROF", ""), ("-CORRIGE", "")]
|
||||||
break
|
break
|
||||||
|
|
||||||
for suff in modes :
|
|
||||||
compiler(sys.argv[1], suff)
|
|
||||||
|
for suff in modes :
|
||||||
|
compiler(nf, suff)
|
||||||
|
|
||||||
|
|||||||
Référencer dans un nouveau ticket
Bloquer un utilisateur