# HG changeset patch # User Paul Boddie # Date 1491939682 -7200 # Node ID e08d8986f0e11539558e802aaff47bbb3964666e # Parent 0c893b6761a725b2c8a6a9f5bc38126dc42c4d6d Added wiki pages and documentation tools (from imip-agent). diff -r 0c893b6761a7 -r e08d8986f0e1 README.txt --- a/README.txt Tue Apr 11 18:29:30 2017 +0200 +++ b/README.txt Tue Apr 11 21:41:22 2017 +0200 @@ -107,3 +107,27 @@ Copyright and licence information can be found in the docs directory - see docs/COPYING.txt and docs/gpl-3.0.txt for more information. + +Generating the Wiki Pages +========================= + +The docs/tools/make_pages.sh script generates a page package for MoinMoin. The +following command will generate a page package called pages.zip using the +pages directory for staging, with Lichen as the page prefix: + +docs/tools/make_pages.sh pages Lichen + +Make sure to include the page prefix where the pages are being deployed in a +wiki with other content at the top level. + +Currently, the wiki pages require the following extensions: + +ImprovedTableParser https://moinmo.in/ParserMarket/ImprovedTableParser + +MoinSupport http://hgweb.boddie.org.uk/MoinSupport + +GraphvizParser https://moinmo.in/ParserMarket/graphviz + +The GraphvizParser requires diagram-tools for the notugly.xsl stylesheet, +although a copy of the stylesheet is provided in the GraphvizParser +distribution for convenience. diff -r 0c893b6761a7 -r e08d8986f0e1 docs/tools/make_pages.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/tools/make_pages.sh Tue Apr 11 21:41:22 2017 +0200 @@ -0,0 +1,92 @@ +#!/bin/sh + +DIRNAME=`dirname $0` +PROGNAME=`basename $0` +OUTDIR=$1 + +if [ ! "$OUTDIR" ] || [ "$1" = '--help' ] ; then + cat 1>&2 < [ ] [ --releases [ --sign ] ] +EOF + exit 1 +fi + +if [ -e "$OUTDIR" ]; then + echo "Please remove $OUTDIR before generating a new package." 1>&2 + exit 1 +fi + +if [ "$2" = '--releases' ]; then + PREFIX= + RELEASES=$2 + SIGN=$3 +else + PREFIX=$2 + RELEASES=$3 + SIGN=$4 +fi + +# Generate release archives. These are held in a separate, semi-permanent +# place so that archives and signatures are not regenerated unnecessarily. + +if [ "$RELEASES" ]; then + "$DIRNAME/make_releases.sh" releases +fi + +if [ "$SIGN" ]; then + "$DIRNAME/sign_releases.sh" releases +fi + +# Generate a manifest for the page package. + +MANIFEST="$OUTDIR/MOIN_PACKAGE" + +mkdir "$OUTDIR" +cat > "$MANIFEST" <> "$MANIFEST" +done + +if [ ! -e "releases" ]; then + echo "No releases to add to the page package!" 1>&2 +else + # Combine the releases with the pages. + + ATTACHMENT="attachment_" + + for FILENAME in releases/* ; do + BASENAME=`basename "$FILENAME"` + cp "$FILENAME" "$OUTDIR/$ATTACHMENT$BASENAME" + done + + # Add the releases to the manifest. + + for FILENAME in releases/* ; do + BASENAME=`basename "$FILENAME"` + PAGENAME="Downloads" + if [ "$PREFIX" ]; then + PAGENAME="$PREFIX/$PAGENAME" + fi + echo "AddAttachment|$ATTACHMENT$BASENAME|$BASENAME|$PAGENAME" >> "$MANIFEST" + done +fi + +zip -j "$OUTDIR" "$OUTDIR/"* diff -r 0c893b6761a7 -r e08d8986f0e1 docs/tools/make_releases.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/tools/make_releases.sh Tue Apr 11 21:41:22 2017 +0200 @@ -0,0 +1,39 @@ +#!/bin/sh + +DIRNAME=`dirname "$0"` +PROGNAME=`basename "$0"` + +ARCHIVE=Lichen + +if [ ! "$1" ] || [ "$1" = '--help' ] ; then + cat 1>&2 < [ -f ] + +Make release archives from tags starting with "rel-" in the repository, +storing the archives in the output directory. If an archive already exists for +a release, it is not regenerated unless the -f (force) option is given. + +All newly-created archive filenames are emitted on standard output. +EOF + exit 1 +fi + +OUTDIR=$1 +FORCE=$2 + +if [ "$FORCE" != '-f' ]; then + FORCE= +fi + +if [ ! -e "$OUTDIR" ]; then + mkdir -p "$OUTDIR" +fi + +for TAG in `hg tags | grep ^rel- | cut -f 1 -d ' '` ; do + NUM=`echo "$TAG" | sed 's/rel-//;s/-/./g'` + OUTFILE="$OUTDIR/$ARCHIVE-$NUM.tar.bz2" + if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then + hg archive -t tbz2 -r "$TAG" "$OUTFILE" + echo "$OUTFILE" + fi +done diff -r 0c893b6761a7 -r e08d8986f0e1 docs/tools/sign_releases.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/tools/sign_releases.sh Tue Apr 11 21:41:22 2017 +0200 @@ -0,0 +1,39 @@ +#!/bin/sh + +DIRNAME=`dirname "$0"` +PROGNAME=`basename "$0"` + +if [ ! "$1" ] || [ "$1" = '--help' ] ; then + cat 1>&2 < [ -f ] + +Sign archives in the given archive directory, invoking GPG to produce a +detached signature. If a signature already exists for an archive, it is not +regenerated unless the -f (force) option is given. + +All newly-created signature filenames are emitted on standard output. +EOF + exit 1 +fi + +OUTDIR=$1 +FORCE=$2 + +if [ "$FORCE" != '-f' ]; then + FORCE= +fi + +if [ ! -e "$OUTDIR" ]; then + cat 1>&2 <