diff options
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -69,20 +69,22 @@ def build_odt(srcdir,destdir): def main(): parser = argparse.ArgumentParser(description='building script') + parser.add_argument('directory',nargs='+',choices=['esempi','strumenti']) parser.add_argument('-H','--html',action='store_true') parser.add_argument('-l','--latex',action='store_true') parser.add_argument('-p','--pdf',action='store_true') parser.add_argument('-o','--odt',action='store_true') args = parser.parse_args() - if args.html: - build_html('esempi',os.path.join('build','html','esempi')) - if args.latex or args.pdf: - build_latex('esempi',os.path.join('build','latex','esempi')) - if args.pdf: - build_pdf(os.path.join('build','latex','esempi'), - os.path.join('build','pdf','esempi')) - if args.odt: - build_odt('esempi',os.path.join('build','odt','esempi')) + for dirname in args.directory: + if args.html: + build_html(dirname,os.path.join('build','html',dirname)) + if args.latex or args.pdf: + build_latex(dirname,os.path.join('build','latex',dirname)) + if args.pdf: + build_pdf(os.path.join('build','latex',dirname), + os.path.join('build','pdf',dirname)) + if args.odt: + build_odt(dirname,os.path.join('build','odt',dirname)) if __name__ == '__main__': main() |