Skip to content

Commit

Permalink
Merge pull request #71 from DILCISBoard/fix/pdf-publication
Browse files Browse the repository at this point in the history
Fix/pdf publication
  • Loading branch information
carlwilson authored Oct 29, 2021
2 parents 73d5c67 + 0b2d73b commit efc8ac4
Show file tree
Hide file tree
Showing 22 changed files with 705 additions and 987 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ jdk:
- openjdk8
script:
- docker run -it --rm -v "$PWD:/source" -u "$(id -u):$(id -g)" --entrypoint /source/create-site.sh eark4all/spec-pdf-publisher
- cd spec-publisher
- git stash
- git checkout feat/pdf-publication
- git pull
- cd ..
- docker run -it --rm -v "$PWD:/source" -u "$(id -u):$(id -g)" --entrypoint /source/create-pdf.sh eark4all/spec-pdf-publisher
- mkdir site
- docker run -it --rm -v "$PWD"/docs:/usr/src/app -v "$PWD"/site:/_site -u "$(id -u):$(id -g)" starefossen/github-pages jekyll build -d /_site
Expand All @@ -22,4 +27,3 @@ deploy:
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- secure: BotaeBrNqqxykaQxjNsFDgTXyr+h2mhM/H4Pu7LkXyZmJyNJVqW9rD/0CGpSSBssJ5AquULmluwVK9nRNeE1bRq8eVEcQ7aQphtB6NvCOIBeJFnKfH7t8dnyjTa9nX4PbCDP9AIeARSTBEihSUyPao7RFh5DyW76S/AqQdyQyKJrNsm0L0ISHPjWqFzpVur7NjE+gXBAyr0xTpbTnxhnKCz0Na0S33YlyL2LGqMP99+JcVggrPa7IB9DZU5lGmy7R7zfC5hs4angnk1/bLnK0hR+dKZQ9AFUpWAMDM/Rg3u6OgZxP8fqFqsTfThezXp46z8XbGHIW9GEvnK/4zFdft3ooKVTVPD903hKlUZHoYn3CoWT46p+5eO+kZmflfU+j0lcW3z88nZHRXHv92rrPlo4HCe09ILm6JacU9co/9Up+pCkxNd0uOFrjtb9+1Lz5v8+2VBTpTwKCcri11Rimn0VedgA8MESZlfhCSh0G8Tc1RzOMO3PSaYHgaYdWdAH1FPFZO+q7TSbGkT+LIKnAcjaqFufOGGabaz4mIle8nQY7jpFP+t5grTSxFdZ4S7MGYPQbD54N8y/Wshe498trzW4Nwwbl2TCLQHtfkHB1qlqSnCfMjvG+DUO5reCyNmrro1qPlBruO+YMxYzQwYNWkUAQNk9yFh6kFahEsQt8nk=
3 changes: 3 additions & 0 deletions PDF.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
!INCLUDE "metadata.md"

!INCLUDE "index.md"

References
==========
3 changes: 2 additions & 1 deletion archive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ Archived Versions of the AIP Specification

Latest
------
[PDF Version 2.0.4](/pdf/eark-aip.pdf) 12-06-2020
[PDF Version 2.1.0](/pdf/eark-aip.pdf) 15-10-2021

Archived Versions
-----------------
### 2.0.x
- [PDF Version 2.0.4](/v2_0/eark-aip-v2-0-4.pdf) 12-06-2020
- [PDF Version 2.0.1](/v2_0/eark-aip-v2-0-1.pdf) 09-09-2019
- [PDF Version 2.0.0](/v2_0/aip-specification-v2-0-0.pdf) 31-05-2019

Expand Down
Binary file added archive/v2_0/eark-aip-v2-0-4.pdf
Binary file not shown.
22 changes: 22 additions & 0 deletions create-erms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/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

if [ ! -d "$SCRIPT_DIR/docs/pdf" ]
then
mkdir -p "$SCRIPT_DIR/docs/pdf/"
fi

pandoc --from markdown \
--template eisvogel \
dummy.md \
pandoc/erms.yaml \
-o docs/pdf/erms.pdf
22 changes: 22 additions & 0 deletions create-geo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/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

if [ ! -d "$SCRIPT_DIR/docs/pdf" ]
then
mkdir -p "$SCRIPT_DIR/docs/pdf/"
fi

pandoc --from markdown \
--template eisvogel \
dummy.md \
pandoc/geo.yaml \
-o docs/pdf/geo.pdf
14 changes: 8 additions & 6 deletions create-pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ command -v markdown-pp >/dev/null 2>&1 || {
source "$tmpdir/.venv-markdown/bin/activate"
}
echo " - MARKDOWN-PP: Processing postface markdown"
markdown-pp postface.md -o "$SCRIPT_DIR/docs/postface.md" -e tableofcontents
markdown-pp postface-pdf.md -o "$SCRIPT_DIR/docs/postface-pdf.md" -e tableofcontents

cd "$SCRIPT_DIR/docs" || exit

Expand All @@ -20,17 +20,16 @@ pandoc --from gfm \
"../spec-publisher/res/md/common-intro.md" \
-o "./preface.tex"
echo " - PANDOC: Finished"
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 gfm \
--to latex \
--metadata-file "../spec-publisher/pandoc/metadata.yaml" \
"$SCRIPT_DIR/docs/postface.md" \
"$SCRIPT_DIR/docs/postface-pdf.md" \
-o ./postface.tex
sed -i 's%section{%section*{%' ./postface.tex
rm "$SCRIPT_DIR/docs/postface.md"
rm "$SCRIPT_DIR/docs/postface-pdf.md"

if [ ! -d "$SCRIPT_DIR/docs/pdf" ]
then
Expand Down Expand Up @@ -61,6 +60,8 @@ cd docs || exit
# eark-sip-pdf.md \ # Input Markdown file
# -o ./pdf/eark-dip.pdf # PDF Destinaton
echo " - PANDOC: Generating PDF document from markdown"
# pandoc -s --bibliography "../pandoc/bibliography.bib" --citeproc eark-aip-pdf.md -o cits.html

pandoc --from markdown \
--template "../spec-publisher/pandoc/templates/eisvogel.latex" \
--listings \
Expand All @@ -69,8 +70,9 @@ pandoc --from markdown \
--include-before-body "./preface.tex" \
--include-after-body "./postface.tex" \
--number-sections \
eark-aip-pdf.md \
--bibliography "../pandoc/bibliography.bib" \
--filter pandoc-citeproc eark-aip-pdf.md \
-o "./pdf/eark-aip.pdf"
echo "PANDOC: Finished"
rm "$SCRIPT_DIR/docs/preface.tex" "$SCRIPT_DIR/docs/postface.tex" "$SCRIPT_DIR/docs/eark-aip-pdf.md"
# rm "$SCRIPT_DIR/docs/preface.tex" "$SCRIPT_DIR/docs/postface.tex" "$SCRIPT_DIR/docs/eark-aip-pdf.md"
cd "$SCRIPT_DIR" || exit
4 changes: 2 additions & 2 deletions create-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ markdown-pp SITE_BASE.md -o /tmp/site.md
markdown-pp SITE.md -o ./docs/index.md

echo " - copying files to docs directory"
cp -R figs docs/
cp -R spec-publisher/res/md/figs docs/
cp -Rf spec-publisher/site/* docs/
find ./docs/_* -type f -exec sed -i 's/CSIP/AIP/' {} \;
find ./docs/_* -type f -exec sed -i 's/csip/aip/' {} \;
cp -R spec-publisher/res/md/figs docs/
cp -R figs docs/
cp -R profile docs/
cp -R archive docs/
cp -R examples docs/
1 change: 0 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ gfm_quirks: paragraph_end
repository: DILCISBoard/E-ARK-AIP
plugins:
- jekyll-github-metadata
- jekyll-mentions
- jekyll-sitemap
- jekyll-redirect-from
- jemoji
Binary file added figs/ditaa/ditaa_appendix_e_migration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions figs/ditaa/ditaa_appendix_e_migration.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
|
aip1_v0 | aip1_v1
+-------------------------+ | +-------------------------+
| | | | |
| +-----------+ | | | +-----------+ |
| R1 | JPEG2000 | | | | R1.1 | TIFF | |
| +-----------+ | | | +-----------+ |
| | | | |
| +-----------+ | | | +-----------+ |
| R2 | PNG | | | | R2 | PNG | |
| +-----------+ | | | +-----------+ |
| | | | |
| +-----------+ | | | +-----------+ |
| | STRUCTURE | | | | | STRUCTURE | |
| | | | | | | | |
| | R1 | | | | | R1.1 | |
| | | | | | | | |
| | R2 | | | | | R2 | |
| +-----------+ | | | +-----------+ |
| | | | |
+-------------------------+ | +-------------------------+
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions figs/ditaa/ditaa_appendix_e_migration_differential.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
| |
aip1_v0 | aip1_v0_d1 | aip1_v1 (consolidated)
+-------------------+ | +---------------------+ | +---------------------+
| | | | | | | |
| +----------+ | | | +----------+ | | | +----------+ |
| R1 | JPEG2000 | | | | R1.1 | TIFF | | | | R1.1 | TIFF | |
| +----------+ | | | +----------+ | | | +----------+ |
| | | | | | | |
| +----------+ | | | | | | +----------+ |
| R2 | PNG | | | | | | | R2 | PNG | |
| +----------+ | | | | | | +----------+ |
| | | | | | | |
| +-------------+ | | | +---------------+ | | | +-------------+ |
| | STRUCTURE | | | | | STRUCTURE | | | | | STRUCTURE | |
| | | | | | | | | | | | | |
| | R1 | | | | | R1.1 | | | | | R1.1 | |
| | R2 | | | | | aip1_v0/R2 | | | | | R2 | |
| +-------------+ | | | +---------------+ | | | +-------------+ |
| | | | | | | |
+-------------------+ | +---------------------+ | +---------------------+
| |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions figs/ditaa/ditaa_appendix_e_migration_segmented.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
|
aip1_v0_b1 | aip1_v1_b1
+------------------------+ | +------------------------+
| | | | |
| | | | |
| +----------+ | | | +----------+ |
| R1 | JPEG2000 | | | | R1.1 | TIFF | |
| +----------+ | | | +----------+ |
| | | | |
| | | | |
+------------------------+ | +------------------------+
|
aip1_v0_b2 |
+------------------------+ |
| | |
| | |
| +----------+ | |
| R2 | PNG | | |
| +----------+ | |
| | |
| | |
+------------------------+ |
|
aip1_v0 | aip1_v1
+------------------------+ | +-------------------------+
| | | | |
| +------------+ | | | +---------------+ |
| | STRUCTURE | | | | | STRUCTURE | |
| | | | | | | | |
| | aip1_v0_b1 | | | | | R1.1 | |
| | aip1_v0_b2 | | | | | aip1_v0_b2/R2 | |
| +------------+ | | | +---------------+ |
| | | | |
+------------------------+ | +-------------------------+
|
Loading

0 comments on commit efc8ac4

Please sign in to comment.