From 109ab8b0c58f50aec206ac4fe2301c4a07270bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Fri, 3 Jul 2020 14:52:59 +0200 Subject: [PATCH] Print help message when no file or list arguments --- tools/datafileBuilder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/datafileBuilder.py b/tools/datafileBuilder.py index 6300a793..40d01ac6 100755 --- a/tools/datafileBuilder.py +++ b/tools/datafileBuilder.py @@ -19,7 +19,7 @@ if args.list: print("The list of avalable formats are:") for formatName,_ in getFormatHandlers(): print(formatName) -else: +elif args.file!=None: lines=args.file.readlines() soup=TexSoup(lines) opt=soup.dfbOptions @@ -37,4 +37,6 @@ else: datapath.mkdir() datalst=dataFileBase.readFromTable(dat,texOps,commands=commands) for data in datalst: - data.toFile(datapath,texOps.suffix) \ No newline at end of file + data.toFile(datapath,texOps.suffix) +else: + parser.print_help() \ No newline at end of file