Skip to content

Instantly share code, notes, and snippets.

@escowles
Created December 6, 2019 12:42
Show Gist options
  • Save escowles/6b98b391bfcc4a9d0e60098e91db32ab to your computer and use it in GitHub Desktop.
Save escowles/6b98b391bfcc4a9d0e60098e91db32ab to your computer and use it in GitHub Desktop.
#!/bin/sh
CID=$1 # figgy collection id
DST=$2 # output directory
EAD=$3 # full path to EAD
FIGGY=/home/deploy/figgy # figgy source code
RESTR=/home/deploy/pulfa-restricted # pulfa-restricted source code
# use figgy to export PDFs and update EAD links with DAOs pointing to them
cd $FIGGY
# export PDFs to disk
bundle exec rake export:collection_pdf COLL="$CID" FIGGY_EXPORT_BASE="$DST/pdf" HONEYBADGER_API_KEY=""
# add/update DAO links
bundle exec rake export:pulfa_pdf COLL="$CID" HONEYBADGER_API_KEY=""
# use pulfa-restricted to generate static site
cd $RESTR
# update assets
rsync -va assets/ $DST/
# xslt finding aid to html
java -jar saxon9he.jar -xsl:spv.xsl -s:$EAD -o:$DST/index.html
# revert SVN to avoid problems with other users
cd $SVN_DIR/pulfa/eads
for i in `svn stat | cut -c2-`; do
svn revert $i
done
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment