19 months ago | Paul Boddie | file changeset files shortlog | Added output directory selection. |
paul@142 | 1 | #!/bin/sh |
paul@142 | 2 | |
paul@142 | 3 | THISDIR=`dirname "$0"` |
paul@142 | 4 | INDIR="$THISDIR/../wiki" |
paul@142 | 5 | |
paul@563 | 6 | ROOT="Departure" |
paul@142 | 7 | |
paul@142 | 8 | MAPPING='--mapping WikiPedia https://en.wikipedia.org/wiki/' |
paul@142 | 9 | THEME='--theme mercurial' |
paul@142 | 10 | |
paul@142 | 11 | if [ "$1" = '--web' ] ; then |
paul@142 | 12 | DOCINDEX= |
paul@142 | 13 | shift 1 |
paul@142 | 14 | else |
paul@142 | 15 | DOCINDEX='--document-index index.html' |
paul@142 | 16 | fi |
paul@142 | 17 | |
paul@563 | 18 | if [ "$1" = '-o' ] ; then |
paul@563 | 19 | OUTDIR="$2" |
paul@563 | 20 | shift 2 |
paul@563 | 21 | else |
paul@563 | 22 | OUTDIR="$THISDIR/../html" |
paul@563 | 23 | fi |
paul@563 | 24 | |
paul@142 | 25 | FILENAMES=${*:-'--all'} |
paul@142 | 26 | |
paul@142 | 27 | moinconvert --input-dir "$INDIR" \ |
paul@142 | 28 | --input-page-sep '--' \ |
paul@142 | 29 | --output-dir "$OUTDIR" \ |
paul@142 | 30 | --root "$ROOT" \ |
paul@142 | 31 | --format html \ |
paul@142 | 32 | --macros \ |
paul@142 | 33 | $DOCINDEX \ |
paul@142 | 34 | $MAPPING \ |
paul@142 | 35 | $THEME \ |
paul@142 | 36 | $FILENAMES |