From d1f530400acd0c443755489affc9c2be2fcc08de Mon Sep 17 00:00:00 2001 From: Jutta Schnabel <jschnabel@km3net.de> Date: Fri, 9 Oct 2020 22:22:01 +0200 Subject: [PATCH] trying to add pandoc --- .gitlab-ci.yml | 3 +-- make_documents.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2caa9d0..e9eb13d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,6 @@ cache: default: before_script: - npm install gitbook-cli -g # install gitbook - - npm install pip - gitbook fetch 3.2.3 # fetch final stable version - gitbook install # add any requested plugins in book.json @@ -25,7 +24,7 @@ test: build: stage: build script: - - pip install pyyaml + - npm install pandoc - 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 ce6abb5..43a67f1 100644 --- a/make_documents.py +++ b/make_documents.py @@ -8,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