26 lines
689 B
Python
26 lines
689 B
Python
# -*- 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)
|
|
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.convert(args.inputFile, args.pdf)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
command_line_runner()
|