Skip to content

Commit

Permalink
Merge pull request #44 from carlwilson/feat/pub-workflow
Browse files Browse the repository at this point in the history
FIX - Use correct submodule.
  • Loading branch information
carlwilson authored May 31, 2019
2 parents 9a85602 + 6cfa305 commit 3c45fd9
Show file tree
Hide file tree
Showing 85 changed files with 32,465 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "spec-publisher"]
path = spec-publisher
url = https://github.com/carlwilson/E-ARK-AIP.git
url = https://github.com/DILCISBoard/spec-publisher.git
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
dist: trusty
sudo: required

language: java
jdk:
- openjdk8
- oraclejdk8

before_install:
- sudo apt-get update
- sudo apt-get install -y texlive texlive-base texlive-latex-extra texlive-fonts-extra python-virtualenv librsvg2-bin
Expand All @@ -16,11 +14,21 @@ before_install:
- sudo chmod +x /opt/pandoc-2.5/bin/pandoc
- sudo ln -s /opt/pandoc-2.5/bin/pandoc /usr/local/bin/pandoc
- sudo ln -s /opt/pandoc-2.5/bin/pandoc-citeproc /usr/local/bin/pandoc-citeproc

- bundle install
script:
- bash create-pdf.sh
- bash create-site.sh

- bundle exec jekyll build -s ./docs -d ./_site
- bundle exec htmlproofer ./_site --file-ignore /javadoc/ --only-4xx --check-html
deploy:
provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
keep_history: true
local_dir: docs
on:
branch: master
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
- 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: 2 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ Vagrant.configure("2") do |config|
if [ ! -d /home/vagrant/.pandoc/templates ]
then
sudo -u vagrant mkdir -p /home/vagrant/.pandoc/templates
sudo -u vagrant cp /vagrant/spec-publisher/pandoc/templates/eisvogel.latex /home/vagrant/.pandoc/templates/eisvogel.latex
fi
sudo -u vagrant cp /vagrant/spec-publisher/pandoc/templates/eisvogel.latex /home/vagrant/.pandoc/templates/eisvogel.latex
cd /vagrant
sudo -u vagrant /vagrant/create-site.sh
sudo -u vagrant /vagrant/create-pdf.sh
SHELL
end
23 changes: 21 additions & 2 deletions create-pdf.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
#!/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

bash "$SCRIPT_DIR/spec-publisher/utils/create-venv.sh"
source "$SCRIPT_DIR/.venv/markdown/bin/activate"
markdown-pp index.md -o docs/pdf.md -e tableofcontents
deactivate

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

pandoc --include-before-body pandoc/include-before.tex \
--reference-links \
--filter pandoc-citeproc \
Expand All @@ -9,6 +28,6 @@ pandoc --include-before-body pandoc/include-before.tex \
--listings \
--toc \
--number-sections \
index.md \
docs/pdf.md \
pandoc/metadata.yaml \
-o published/pdf/aip-specification.pdf
-o docs/pdf/aip-specification.pdf
30 changes: 27 additions & 3 deletions create-site.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
#!/usr/bin/env bash
echo "Generating GitHub pages site from markdown"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR" || exit
bundle install
bundle exec jekyll build
bundle exec htmlproofer ./_site --file-ignore /javadoc/ --only-4xx --check-html


if [ ! -d ./docs ]
then
mkdir ./docs
fi

if [ -d ./docs/figs ]
then
rm -rf ./docs/figs
fi

if [ -e ./docs/index.md ]
then
rm docs/index.md
fi

cp -R spec-publisher/res/md/figs/* figs/
cp -R figs docs/
cp -R profiles docs/
cp -R archived docs/

bash "$SCRIPT_DIR/spec-publisher/utils/create-venv.sh"
source "$SCRIPT_DIR/.venv/markdown/bin/activate"
markdown-pp index.md -o docs/index.md -e tableofcontents
deactivate
File renamed without changes.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
11 changes: 11 additions & 0 deletions docs/archived/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AIP specification (DEPRECATED)

This folder contains the the sources that were previously used to develop, publish and maintain the AIP specification.

Here you may find 3 folders:

- **01-Deprecated versions** - holds older versions of the documentation
- **02-Under development versions** - holds versions of the documentation that are still being worked on or under revision
- **03-Published versions** - holds the original source files of the specification that have been turned into official releases in PDF format.

If you find any issues on any version of the specification, please submit an issue here on GitHub at https://github.com/DLMArchivalStandardsBoard/E-ARK-AIP/issues/new
1 change: 1 addition & 0 deletions docs/figs/AIP-format-level-0-basic.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<diagram program="umletino" version="14.2"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>324</x><y>60</y><w>100</w><h>30</h></coordinates><panel_attributes>AIP</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>464</x><y>230</y><w>120</w><h>30</h></coordinates><panel_attributes>representations</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>464</x><y>130</y><w>120</w><h>30</h></coordinates><panel_attributes>/submission/</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>514</x><y>150</y><w>30</w><h>50</h></coordinates><panel_attributes></panel_attributes><additional_attributes>10;10;10;30</additional_attributes></element><element><id>UMLClass</id><coordinates><x>604</x><y>290</y><w>140</w><h>30</h></coordinates><panel_attributes>rep-002</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>364</x><y>250</y><w>180</w><h>60</h></coordinates><panel_attributes></panel_attributes><additional_attributes>160;10;160;20;10;20;10;40</additional_attributes></element><element><id>Relation</id><coordinates><x>514</x><y>250</y><w>180</w><h>60</h></coordinates><panel_attributes></panel_attributes><additional_attributes>10;10;10;20;160;20;160;40</additional_attributes></element><element><id>UMLClass</id><coordinates><x>304</x><y>290</y><w>140</w><h>30</h></coordinates><panel_attributes>rep-001</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>464</x><y>180</y><w>120</w><h>30</h></coordinates><panel_attributes>{ISO 8601 date}</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>514</x><y>200</y><w>30</w><h>50</h></coordinates><panel_attributes></panel_attributes><additional_attributes>10;10;10;30</additional_attributes></element></diagram>
Binary file added docs/figs/AIP-in-BagIt-data-folder.png
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 docs/figs/AIP-in-BagIt-data-folder.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

urn+uuid+123e4567-e89b-12d3-a456-426655440000/
├── data
│ └── urn:uuid:7d0d1987-0f1c-47a7-8fd6-cc5c7de4064f
│ ├── metadata
│ │ └── preservation
│ │ └── premis.xml
│ ├── METS.xml
│ └── submission
│ ├── metadata
│ │ ├── descriptive
│ │ │ └── ead.xml
│ ├── METS.xml
│ └── representations
│ └── rep1
│ ├── data
│ │ └── Example1.docx
│ └── METS.xml
├── manifest-md5.txt
│ 408ad21d50cef31da4df6d9ed81b01a7 data/urn+uuid+123e4567-e89b-12d3-a456-426655440000/ \
│ metadata/preservation/premis.xml
│ 49afbd86a1ca9f34b677a3f09655eae9 data/urn+uuid+123e4567-e89b-12d3-a456-426655440000/ \
│ METS.xml
│ 9ecbfc432b994415c405259aff694632 data/urn+uuid+123e4567-e89b-12d3-a456-426655440000/ \
│ submission/metadata/descriptive/ead.xml
│ 8df7468ea611b0714148cb607ec74fe1 data/urn+uuid+123e4567-e89b-12d3-a456-426655440000/ \
│ submission/METS.xml
│ e1e7914bd762605f38631d21281e9s82 data/urn+uuid+123e4567-e89b-12d3-a456-426655440000/ \
│ submission/representations/rep1/data/Example1.docx
│ 028df7468ea611b0714148cb607ec74d data/urn+uuid+123e4567-e89b-12d3-a456-426655440000/ \
│ submission/representations/rep1/METS.xml
└── bagit.txt
BagIt-Version: 0.97
Tag-File-Character-Encoding: UTF-8

1 change: 1 addition & 0 deletions docs/figs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Edit UXF files using Umlet/Umletino: http://www.umlet.com/umletino/umletino.html
Loading

0 comments on commit 3c45fd9

Please sign in to comment.