Commit d28c6de6 authored by Maximilian Sprengholz's avatar Maximilian Sprengholz 😵
Browse files

regex fix

parent d35b4b96
......@@ -18,8 +18,8 @@ gen_docs:
stage: build
- cd docs
- python3 dep/ '' 'subtitle:' 'subtitle:"Version <b>${CI_COMMIT_TAG}</b>"'
- python3 dep/ '' '(date:[\s])(.*)' '\1"${DATE}"'
- python3 dep/ '' '(subtitle:[\s])(.*)' '\1"Version <b>' ${CI_COMMIT_TAG} '</b>"'
- python dep/ '' '(date:[\s])(.*)' '\1"' ${DATE} '"'
- pandoc --filter pandoc-include --filter pandoc-crossref --citeproc --bibliography=dep/appendix.bib --csl=dep/journal-of-family-research.csl --number-sections --table-of-contents -c dep/empty.css -H dep/vue_extended_h.css -H dep/lightbox.js -s -o appendix.html
- cd ../
- git config --global "${GITLAB_USER_NAME}"
......@@ -34,7 +34,7 @@ gen_docs:
stage: deploy
- git pull --rebase http://${GITLAB_USER_LOGIN}:${TOKEN}${CI_PROJECT_PATH}
- rm -rf public
- mkdir public
- cp -R -f results/figures/ public/ # copy figures
This diff is collapsed.
......@@ -2,7 +2,7 @@
'Online Appendix: From "guestworkers" to EU migrants: A gendered view on the labor market integration of different arrival cohorts in Germany'
subtitle: "Version <b>1.2.0</b> XXX"
date: "2020-12-21"
date: "20-12-23"
titleDelim: .
figureTemplate: __$$figureTitle$$ $$i$$$$titleDelim$$__ $$t$$
subfigureTemplate: __$$figureTitle$$ $$i$$$$titleDelim$$__ $$t$$
......@@ -2,8 +2,12 @@
import sys
import re
replace_string = ''
for i in xrange(3,len(sys.argv)):
replace_string += sys.argv[i]
with open(sys.argv[1],'r') as file:
filedata =
filedata = re.sub(sys.argv[2], sys.argv[3], filedata)
filedata = re.sub(sys.argv[2], replace_string, filedata)
with open(sys.argv[1],'w') as file:
This diff is collapsed.
python dep/ '' '(subtitle:[\s])(.*)' '\1"Version <b>${CI_COMMIT_TAG}</b>"'
python dep/ '' '(date:[\s])(.*)' '\1"${DATE}"'
#python dep/ '' '(subtitle:[\s])(.*)' '\1"Version <b>${CI_COMMIT_TAG}</b>"'
export DATE=$(date '+%y-%m-%d')
python dep/ '' '(date:[\s])(.*)' '\1"' ${DATE} '"'
# pandoc call
pandoc --filter pandoc-include --filter pandoc-crossref --citeproc --bibliography=appendix.bib --csl=journal-of-family-research.csl --number-sections --table-of-contents -c ../public/css/vue_extended.css -s -o test.html
#pandoc --filter pandoc-include --filter pandoc-crossref --citeproc --bibliography=appendix.bib --csl=journal-of-family-research.csl --number-sections --table-of-contents -c ../public/css/vue_extended.css -s -o test.html
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment