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

regex fix

parent d35b4b96
......@@ -18,8 +18,8 @@ gen_docs:
stage: build
script:
- cd docs
- python3 dep/regexrep.py 'appendix.md' 'subtitle:' 'subtitle:"Version <b>${CI_COMMIT_TAG}</b>"'
- python3 dep/regexrep.py 'appendix.md' '(date:[\s])(.*)' '\1"${DATE}"'
- python3 dep/regexrep.py 'appendix.md' '(subtitle:[\s])(.*)' '\1"Version <b>' ${CI_COMMIT_TAG} '</b>"'
- python dep/regexrep.py 'appendix.md' '(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 appendix.md -H dep/lightbox.js -s -o appendix.html
- cd ../
- git config --global user.name "${GITLAB_USER_NAME}"
......@@ -34,7 +34,7 @@ gen_docs:
pages:
stage: deploy
script:
- git pull --rebase http://${GITLAB_USER_LOGIN}:${TOKEN}@scm.cms.hu-berlin.de/${CI_PROJECT_PATH}
- git pull http://${GITLAB_USER_LOGIN}:${TOKEN}@scm.cms.hu-berlin.de/${CI_PROJECT_PATH}
- rm -rf public
- mkdir public
- cp -R -f results/figures/ public/ # copy figures
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
title:
'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 = file.read()
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:
file.write(filedata)
This diff is collapsed.
python dep/regexrep.py 'appendix.md' '(subtitle:[\s])(.*)' '\1"Version <b>${CI_COMMIT_TAG}</b>"'
python dep/regexrep.py 'appendix.md' '(date:[\s])(.*)' '\1"${DATE}"'
#python dep/regexrep.py 'appendix.md' '(subtitle:[\s])(.*)' '\1"Version <b>${CI_COMMIT_TAG}</b>"'
export DATE=$(date '+%y-%m-%d')
python dep/regexrep.py 'appendix.md' '(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 appendix.md -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 appendix.md -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