diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de1d0f1ca5675e5cfb7641afce394655ab28b4ef..2c558e6d735a00f5132aa3d134d7f1a84515aba7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,9 @@ test: build: stage: build + image: docker.km3net.de/base/texlive:2018 script: + - pip install pyyaml - python make_documents.py - pandoc Deliverable_4-8.md -f markdown -t docx -s -o Deliverable_4-8.docx - pandoc Deliverable_4-9.md -f markdown -t docx -s -o Deliverable_4-9.docx diff --git a/make_documents.py b/make_documents.py index 005d7ea82c316a6f55c981d0258199d23582a8e6..ce6abb50dfdc05bb19b531cc66f342ccd0bbe089 100644 --- a/make_documents.py +++ b/make_documents.py @@ -1,4 +1,5 @@ #!/usr/bin/python +import yaml def fulltext_from_filelist(filelistname, onlystatus = ""): fulltext = "" @@ -7,13 +8,13 @@ def fulltext_from_filelist(filelistname, onlystatus = ""): while infilename: with open(infilename, "r") as ftext: addtext = ftext.read() - # info = yaml.load(addtext[addtext.find("---")+3:addtext.find("---", 5)]) + info = yaml.load(addtext[addtext.find("---")+3:addtext.find("---", 5)]) takeit = True - '''if onlystatus: + if onlystatus: takeit = False if "status" in info: if info["status"] == onlystatus: - takeit = True''' + takeit = True if takeit: fulltext += addtext[addtext.find("---", 5)+3:len(addtext)] + "\n" infilename = f.readline().rstrip("\n")