add pdf command line option

This commit is contained in:
dechert
2021-06-15 17:32:40 +02:00
parent 11387d34cc
commit e8be969e98
3 changed files with 10 additions and 1 deletions

View File

@@ -10,13 +10,15 @@ def get_parser():
# required arg
parser.add_argument("inputFile", help="name of the csv file to used as input, e.g. quiz.csv",
type=str)
parser.add_argument('-pdf', '--pdf', action='store_true',
help="converts markdown file to pdf")
return parser
def command_line_runner():
parser = get_parser()
args = parser.parse_args()
converter.write_markdown_file(args.inputFile)
converter.convert(args.inputFile, args.pdf)
if __name__ == "__main__":