-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from DILCISBoard/feat/pdf-publication
FEAT - Full PDF publication for v2.0.1
- Loading branch information
Showing
4 changed files
with
186 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
!INCLUDE "spec-publisher/res/md/common-intro.md" | ||
!INCLUDE "specification/metadata.md" | ||
|
||
!INCLUDE "specification/E-ARK-SIP_specification-v2.0.0-DRAFT.md" | ||
!INCLUDE "specification/E-ARK-SIP_specification-v2.0.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,99 @@ | ||
#!/usr/bin/env bash | ||
echo "Generating PDF document from markdown" | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd "$SCRIPT_DIR" || exit | ||
|
||
if [ ! -d ~/.pandoc/templates ] | ||
then | ||
mkdir -p ~/.pandoc/templates | ||
fi | ||
cp spec-publisher/pandoc/templates/eisvogel.latex ~/.pandoc/templates/eisvogel.latex | ||
echo "Generating PDF from markdown" | ||
bash "$SCRIPT_DIR/spec-publisher/utils/create-venv.sh" | ||
|
||
command -v markdown-pp >/dev/null 2>&1 || { | ||
tmpdir=$(dirname $(mktemp -u)) | ||
source "$tmpdir/.venv-markdown/bin/activate" | ||
} | ||
echo " - MARKDOWN-PP: Processing postface markdown" | ||
cd "./specification/postface/" | ||
markdown-pp postface-pdf.md -o "$SCRIPT_DIR/docs/postface.md" -e tableofcontents | ||
|
||
cd "$SCRIPT_DIR/docs" || exit | ||
|
||
### | ||
# Pandoc options: | ||
# --from markdown \ # Source fromat Markdown | ||
# --template ../pandoc/templates/eisvogel.latex \ # Use this latex template | ||
# --listings \ # Use listings package for code blocks | ||
# --table-of-contents \ # Generate table of contents | ||
# --metadata-file ../pandoc/metadata.yaml \ # Additional Pandoc metadata | ||
# --include-before-body "../spec-publisher/res/md/common-intro.md" \ | ||
# --include-after-body "../specification/postface/postface.md" \ | ||
# --number-sections \ # Generate Heading Numbers | ||
# eark-csip-pdf.md \ # Input Markdown file | ||
# -o ./pdf/eark-csip.pdf # PDF Destinaton | ||
echo " - PANDOC: Generating Preface from markdown" | ||
pandoc --from gfm \ | ||
--to latex \ | ||
--metadata-file "../spec-publisher/pandoc/metadata.yaml" \ | ||
"../spec-publisher/res/md/common-intro.md" \ | ||
-o ./preface.tex | ||
sed -i 's%fig_1_dip.svg%fig_1_dip.png%' ./preface.tex | ||
sed -i 's%section{%section*{%' ./preface.tex | ||
|
||
echo " - PANDOC: Generating Postface from markdown" | ||
pandoc --from markdown \ | ||
--to latex \ | ||
--metadata-file "../spec-publisher/pandoc/metadata.yaml" \ | ||
"./postface.md" \ | ||
-o ./postface.tex | ||
sed -i 's%section{%section*{%' ./postface.tex | ||
|
||
rm postface.md | ||
|
||
if [ ! -d "$SCRIPT_DIR/docs/pdf" ] | ||
then | ||
mkdir -p "$SCRIPT_DIR/docs/pdf/" | ||
fi | ||
|
||
bash "$SCRIPT_DIR/spec-publisher/utils/create-venv.sh" | ||
source "$SCRIPT_DIR/.venv/markdown/bin/activate" | ||
cd "$SCRIPT_DIR" || exit | ||
|
||
command -v markdown-pp >/dev/null 2>&1 || { | ||
tmpdir=$(dirname $(mktemp -u)) | ||
source "$tmpdir/.venv-markdown/bin/activate" | ||
} | ||
echo " - MARKDOWN-PP: Preparing PDF markdown" | ||
markdown-pp PDF.md -o docs/eark-sip-pdf.md -e tableofcontents | ||
deactivate | ||
|
||
cp -R specification/images docs/ | ||
cp -R spec-publisher/res/md/figs docs/ | ||
|
||
cd docs || exit | ||
|
||
### | ||
# Pandoc options: | ||
# --from markdown \ # Source fromat Markdown | ||
# --template ../pandoc/templates/eisvogel.latex \ # Use this latex template | ||
# --listings \ # Use listings package for code blocks | ||
# --table-of-contents \ # Generate table of contents | ||
# --metadata-file ../pandoc/metadata.yaml \ # Additional Pandoc metadata | ||
# --include-before-body "../spec-publisher/res/md/common-intro.md" \ | ||
# --include-after-body "../specification/postface/postface.md" \ | ||
# --number-sections \ # Generate Heading Numbers | ||
# eark-sip-pdf.md \ # Input Markdown file | ||
# -o ./pdf/eark-csip.pdf # PDF Destinaton | ||
echo "PANDOC: Generating PDF document from markdown" | ||
pandoc --from markdown \ | ||
--template eisvogel \ | ||
--template "../spec-publisher/pandoc/templates/eisvogel.latex" \ | ||
--listings \ | ||
--toc \ | ||
--table-of-contents \ | ||
--metadata-file "../spec-publisher/pandoc/metadata.yaml" \ | ||
--include-before-body "./preface.tex" \ | ||
--include-after-body "./postface.tex" \ | ||
--number-sections \ | ||
eark-sip-pdf.md \ | ||
--metadata-file ../pandoc/metadata.yaml \ | ||
-o pdf/eark-sip.pdf | ||
-o "./pdf/eark-sip.pdf" | ||
echo "PANDOC: Finished" | ||
|
||
rm postface.tex preface.tex eark-sip-pdf.md | ||
|
||
cd "$SCRIPT_DIR" || exit | ||
# if [ -e docs/eark-csip-pdf.md ] | ||
# then | ||
# rm docs/eark-csip-pdf.md | ||
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
# Postface | ||
|
||
!INCLUDE "authors.md" | ||
|
||
!INCLUDE "revisions-pdf.md" | ||
|
||
!INCLUDE "ack-contact.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
|
||
II Revision History | ||
---------------- | ||
|
||
--------------------------------------------------------------------------------------------------------------- | ||
Revision Date Authors(s) Organisation Description | ||
-------- ---------- ------------------------- ------------ --------------------------------------------------- | ||
0.1 20.10.2014 Tarvo Kärberg NAE First draft. | ||
|
||
0.2 13.11.2014 Tarvo Kärberg NAE Updating content. | ||
|
||
0.3 02.12.2014 Tarvo Kärberg NAE Updating content. | ||
|
||
0.4 17.01.2015 Tarvo Kärberg NAE Updating content. | ||
|
||
0.6 23.01.2015 Anders DNA Updating content. | ||
Bo Nielsen | ||
|
||
0.5 21.01.2015 Karin ESS Updating content. | ||
Bredenberg | ||
|
||
0.7 23.01.2015 Kathrine DNA Updating content. | ||
Hougaard Edsen | ||
|
||
0.71 26.01.2015 Björn Skog ESS Updating content. | ||
|
||
0.72 27.01.2015 Hélder Silva KEEPS Updating content. | ||
|
||
0.8 27.01.2015 Angela Dappert DLM/ Quality assurance and proof-reading. | ||
UPHEC | ||
|
||
0.9 29.01.2017 Kuldar Aas NAE Quality assurance and proof-reading. | ||
|
||
0.91 30.01.2015 David Anderson UPHEC Quality assurance and proof-reading. | ||
|
||
1.0 30.01.2015 Tarvo Kärberg NAE Final version (D3.2). | ||
|
||
0.1 11.05.2015 Karin ESS Updating content. | ||
Bredenberg NAS | ||
|
||
0.3 27.07.2015 Tarvo Kärberg NAE Updating content. | ||
|
||
0.2 30.06.2015 Tarvo Kärberg NAE Updating content. | ||
|
||
0.4 23.10.2015 Tarvo Kärberg NAE Updating content, | ||
synchronising with the SMURF profile. | ||
|
||
0.41 17.11.2015 Tarvo Kärberg NAE Integrating the feedback. | ||
|
||
0.41 17.11.2015 Tarvo Kärberg NAE Integrating the feedback. | ||
|
||
0.42 07.12.2015 Tarvo Kärberg NAE Updating content. | ||
|
||
0.5 12.01.2016 Tarvo Kärberg NAE Updating content, | ||
synchronising with the Common Specification. | ||
|
||
0.6 15.01.2016 Anders DNA Updating content. | ||
Bo Nielsen | ||
|
||
0.61 15.01.2016 Gregor SNA Updating content. | ||
Zavrsnik | ||
|
||
0.62 18.01.2016 Tarvo Kärberg NAE Updating content. | ||
|
||
0.63 20.01.2016 Phillip Mike DNA Updating content. | ||
Tømmerholt | ||
|
||
0.64 25.01.2016 Phillip Mike DNA Updating content. | ||
Tømmerholt | ||
|
||
0.7 26.01.2016 Sven Schlarb AIT Quality assurance and proof-reading. | ||
|
||
0.8 27.01.2016 Kuldar Aas NAE Quality assurance and proof-reading. | ||
|
||
0.9 29.01.2016 Andrew Wilson Uni. Quality assurance and proof-reading. | ||
David Anderson Brgtn | ||
|
||
1.0 29.01.2016 Tarvo Kärberg NAE Final version (general paart of D3.3) | ||
|
||
1.1 14.07.2016 Tarvo Kärberg NAE Incorporating agreements made | ||
in the Common Specification work group. | ||
|
||
1.2 12.12.2016 Tarvo Kärberg NAE Incorporating agreements made in the | ||
Common Specification work group. | ||
|
||
1.3 13.01.2017 Tarvo Kärberg NAE Small updates. | ||
|
||
1.4 31.01.2017 Tarvo Kärberg NAE Finalising the specification. | ||
|
||
2.0.0 15.03.2019 Miguel Ferreira KEEP Updated to v2.0 with CSIP | ||
|
||
2.0.1 09.09.2019 Karin SNA Correction @LABEL and @USE attributes, | ||
Bredenberg typos, layout and PDF formatting. | ||
|
||
--------------------------------------------------------------------------------------------------------------- |