Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This script will clone/pull the xsf-tools and xeps repos, and will fetch and build TeXML. Afterwards it uses xsf-tools to build all XHTML/PDF output for the current XEPs, build a HTML table of the current XEPs run pelican to generate our non-XEP website content and finally patch the pelican output to include the generated HTML table of the current XEPs. Added content/extensions to .gitignore as it should only be filled with the output of xsf-tools prior to running pelican.
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,56 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# This script builds the complete website. | |||
# This includes: | |||
# - building XHTML + PDF versions of the XEPs | |||
# - put output in content/extensions | |||
# - put prettify.(js/css) and xmpp.css in content/extensions | |||
# - building pelican website | |||
# - fixing pelican website to include a current list of XEPs | |||
# | |||
|
|||
# Required python packages: | |||
# sudo pip install pelican ghp-import markdown | |||
PELICAN=pelican | |||
PELICANOPTS= | |||
|
|||
BASEDIR=$PWD | |||
INPUTDIR=$BASEDIR/content | |||
OUTPUTDIR=$BASEDIR/output | |||
CONFFILE=$BASEDIR/pelicanconf.py | |||
PUBLISHCONF=$BASEDIR/publishconf.py | |||
|
|||
# create build directory | |||
# this will contain xeps, xsf-tools and texml | |||
mkdir -p build | |||
cd build | |||
if [ -d "xeps" ]; then | |||
cd xeps | |||
git pull | |||
cd .. | |||
else | |||
git clone https://github.com/xsf/xeps | |||
fi | |||
if [ -d "xsf-tools" ]; then | |||
cd xsf-tools | |||
git pull | |||
cd .. | |||
else | |||
git clone https://github.com/xsf/xsf-tools | |||
fi | |||
if [ ! -d "texml-2.0.2" ]; then | |||
wget http://mirror.pnl.gov/macports/distfiles/texml/texml-2.0.2.tar.gz | |||
tar xfzv texml-2.0.2.tar.gz | |||
cd texml-2.0.2 | |||
python setup.py build | |||
cd .. | |||
fi | |||
cd .. | |||
|
|||
export PYTHONPATH="$PWD/build/texml-2.0.2/build/lib.linux-x86_64-2.7:$PYTHONPATH" | |||
$PWD/build/xsf-tools/build.py -d -x $PWD/build/xeps -o $PWD/content/extensions --imagespath $PWD/build/xeps/resources | |||
cp $PWD/build/xeps/prettify.css $PWD/content/extensions | |||
cp $PWD/build/xeps/prettify.js $PWD/content/extensions | |||
cp $PWD/build/xeps/xmpp.css $PWD/content/extensions | |||
$PELICAN $INPUTDIR -o $OUTPUTDIR -s $PUBLISHCONF $PELICANOPTS | |||
sed -e '/<!--REPLACE_XEPLIST_TABLE_HERE-->/ {' -e 'r content/extensions/xeplist.txt' -e 'd' -e '}' -i output/extensions/index.html |