29 lines
638 B
Bash
29 lines
638 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
OUTPUT=<directory-to-copy-files-to>
|
||
|
|
|
||
|
|
echo "1. sourcing environment"
|
||
|
|
source venv/bin/activate
|
||
|
|
|
||
|
|
echo "2. cleaning output"
|
||
|
|
rm -Rf $OUTPUT/*
|
||
|
|
|
||
|
|
echo "3. pulling all pads"
|
||
|
|
|
||
|
|
pppadump pull --all --force --css ../styles.css --pub out/p --group out/g
|
||
|
|
|
||
|
|
echo "4. pulling __PUBLISH__ pads"
|
||
|
|
|
||
|
|
pppadump pull --html --publish-opt-in --force --css styles.css --pub out/__PUBLISH__
|
||
|
|
|
||
|
|
echo "5. indexing"
|
||
|
|
|
||
|
|
pppadump index input out/p/*.meta.json --title "pppindex" --templatepath templates/ --output $OUTPUT/index.html
|
||
|
|
|
||
|
|
echo "6. copying files"
|
||
|
|
|
||
|
|
cp -r out/* $OUTPUT
|
||
|
|
cp styles/styles.css $OUTPUT/
|
||
|
|
cp styles/styles.css $OUTPUT/__PUBLISH__
|
||
|
|
|
||
|
|
echo "Done."
|