From d58ac6006cbbcd5bb572556c268b07d46777ac47 Mon Sep 17 00:00:00 2001 From: Jutta Schnabel <jschnabel@km3net.de> Date: Fri, 9 Oct 2020 22:08:13 +0200 Subject: [PATCH] hating pipes --- .gitlab-ci.yml | 2 ++ make_documents.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de1d0f1..2c558e6 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 005d7ea..ce6abb5 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") -- GitLab