Compare commits

..

No commits in common. "a6d5079473373fcef9ce179b9f10f573a701f90a" and "9609e9f3f3e27a4dbcf623ddd048d5b0d50c508a" have entirely different histories.

21
main.py
View File

@ -1,11 +1,10 @@
#!/usr/bin/python3
import argparse
import os
import yaml
import pypandoc
import os
import re
import sys
import yaml
root = ""
lang = "de"
@ -124,11 +123,15 @@ def read_yaml(path):
except yaml.YAMLError as exc:
print(exc)
# Print information on how to use this program.
def print_usage():
print("Usage: python3 main.py <root-directory>")
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("rootdirectory", help="your project's root directory (default: .)")
parser.add_argument("-l", "--language", default="de", help="the presentation language (default: de)")
args = parser.parse_args()
compile(args.rootdirectory, language=args.language)
if len(sys.argv) != 2:
print_usage()
else:
compile(sys.argv[1], language='de')
# TODO: Handle multiple languages
# compile(sys.argv[1], language='en')