add command line interface

This commit is contained in:
dechert
2021-06-15 15:56:07 +02:00
parent 7ec4a56d53
commit ec4135035d
3 changed files with 33 additions and 3 deletions

23
command_line.py Normal file
View File

@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
import argparse
# from md_tagebuch import __version__
import converter
def get_parser():
parser = argparse.ArgumentParser(description='Generate marp markdown slides from csv')
# required arg
parser.add_argument("inputFile", help="name of the csv file to used as input, e.g. quiz.csv",
type=str)
return parser
def command_line_runner():
parser = get_parser()
args = parser.parse_args()
converter.write_markdown_file(args.inputFile)
if __name__ == "__main__":
command_line_runner()