Skip to content

Commit

Permalink
Add buildCompleteWebsite.sh script
Browse files Browse the repository at this point in the history
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
tfar committed Mar 18, 2016
1 parent 92585e9 commit 88aaf54
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,3 +15,4 @@ output/
bower_components bower_components
node_modules node_modules
build/ build/
content/extensions
56 changes: 56 additions & 0 deletions buildCompleteWebsite.sh
@@ -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

0 comments on commit 88aaf54

Please sign in to comment.