Contribution declaration is optional

This commit is contained in:
Filip Gralinski 2022-02-12 11:56:46 +01:00
parent a610b4bbc3
commit 8e0fa440a9
6 changed files with 18 additions and 3 deletions

View File

@ -16,5 +16,6 @@
"specialization": "none",
"supervisor": "none",
"album_no": "none",
"beeminder_support": "no"
"beeminder_support": "no",
"contribution_declaration": "yes"
}

View File

@ -139,6 +139,10 @@ if [ "{{ cookiecutter.beeminder_support }}" = "yes" ]; then
cp -r _optional_files/_beeminder_support/* .
fi
if [ "{{ cookiecutter.contribution_declaration }}" = "yes" ]; then
cp -r _optional_files/_contribution_declaration/* .
fi
rm -rf _latex-templates _optional_files
if [ -e .git ]; then

View File

@ -9,3 +9,4 @@ default_context:
specialization: 'sztuczna inteligencja'
supervisor: 'prof. dr hab. Jan Nowak'
album_no: '123456'
contribution_declaration: 'no'

View File

@ -17,3 +17,4 @@ default_context:
supervisor: '{{ cookiecutter.supervisor }}'
album_no: '{{ cookiecutter.album_no }}'
beeminder_support: '{{ cookiecutter.beeminder_support }}'
contribution_declaration: '{{ cookiecutter.contribution_declaration }}'

View File

@ -38,9 +38,17 @@ SCOREFILES=$(shell perl extract-score-files.pl $(CONTENT_TEX_SOURCES))
clean_latex_stuff=rm -rf *.aux *.nav *.toc *.log *.out *.blg *.bbl autozoil-log.txt autozoil.xml the-appendix.pdf supplement.zip $(PAPER_ID).pdf $(PAPER_ID).zip arxiv-$(PAPER_ID).pdf arxiv-$(PAPER_ID).tar.gz abstract.txt sentences.txt stats.txt $(EXTRA_PDFS) helpers/$(PAPER_ID)-contribution-declaration.tex helpers/$(PAPER_ID)-contribution-declaration.pdf helpers/*.aux helpers/*.bbl helpers/*.bcf helpers/*.blg helpers/*.log helpers/*.run.xml
ifeq ($(HAS_SUPPLEMENT),yes)
{% if cookiecutter.contribution_declaration == 'yes' %}
all: $(PAPER_ID).pdf abstract.txt supplement.zip stats.txt sentences.txt helpers/$(PAPER_ID)-contribution-declaration.pdf
{% else %}
all: $(PAPER_ID).pdf abstract.txt supplement.zip stats.txt sentences.txt
{% endif %}
else
{% if cookiecutter.contribution_declaration == 'yes' %}
all: $(PAPER_ID).pdf abstract.txt stats.txt sentences.txt helpers/$(PAPER_ID)-contribution-declaration.pdf
{% else %}
all: $(PAPER_ID).pdf abstract.txt stats.txt sentences.txt
{% endif %}
endif
source-pack: $(PAPER_ID).zip
@ -109,7 +117,7 @@ titlepage.pdf: titlepage.tex
xelatex $<
endif
{% if cookiecutter.contribution_declaration == 'yes' %}
helpers/$(PAPER_ID)-contribution-declaration.pdf: helpers/$(PAPER_ID)-contribution-declaration.tex bibliography.bib
(cd helpers && pdflatex $(PAPER_ID)-contribution-declaration.tex)
(cd helpers && biber $(PAPER_ID)-contribution-declaration)
@ -117,7 +125,7 @@ helpers/$(PAPER_ID)-contribution-declaration.pdf: helpers/$(PAPER_ID)-contributi
helpers/$(PAPER_ID)-contribution-declaration.tex: contributions.yaml helpers/contribution-declaration.tex.tmpl helpers/generate-contribution-declaration.py
(cd helpers && python3 generate-contribution-declaration.py) < $< > $@
{% endif %}
clean:
$(clean_latex_stuff)