Skip to content

Commit

Permalink
new file: Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
bagustris committed Jun 12, 2024
1 parent f1b8bbc commit f7096a2
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions paper/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# =============================================================================
# @file Makefile
# @brief Makefile for generating previews of the paper
# @author Michael Hucka <mhucka@caltech.edu>
# @license Please see the file named LICENSE in the project directory
# @website https://github.com/casics/dassie
# =============================================================================

# Change the following values to match your configuration.
# .............................................................................

assets := assets
input := paper.md
output := paper.pdf
bib := paper.bib
bibstyle := apa.csl

# Main code -- no more customization variables after this point
# .............................................................................

title := $(shell grep title: $(input) | sed 's/title: *//' | tr -d "'")
authors := $(shell sed -n '/authors:/,/affiliations:/p' $(input) | grep name: | sed 's/- name: *//' | paste -d, -s - | sed 's/,/, /g')
repo := $(shell git remote get-url origin | sed 's|git@github.com:|https://github.com/|' | sed 's/\.git//')

$(output): $(input) $(bib) Makefile
pandoc \
--from markdown+autolink_bare_uris+implicit_figures \
-V paper_title="$(title)" \
-V citation_author="$(authors)" \
-V repository="$(repo)" \
-V archive_doi="http://dx.doi.org/00.00000/zenodo.0000000" \
-V formatted_doi="00.00000/joss.00000" \
-V paper_url="http://joss.theoj.org/papers/" \
-V review_issue_url="http://joss.theoj.org/papers/" \
-V issue="0" \
-V volume="00" \
-V year="2020" \
-V submitted="25 February 2020" \
-V published="25 February 2020" \
-V page="00" \
-V graphics="true" \
-V geometry:margin=1in \
-V logo_path=$(assets)/logo.png \
--filter pandoc-citeproc --csl $(assets)/$(bibstyle) \
--template $(assets)/latex.template \
$< -o $@ \

clean:
rm -rf *.pdf

0 comments on commit f7096a2

Please sign in to comment.