Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Contributing to the TicketMonster tutorial | ||
========================================== | ||
|
||
Each section of the tutorial is contained in a `.txt` file in this git repository. To build the tutorial you'll need [AsciiDoc](http://www.methods.co.nz/asciidoc/index.html) installed. It's available via most major packaging systems (e.g. Debian, Fedora Extra, MacPorts), and has a Windows installer. | ||
|
||
You'll also need pygments for syntax highlighting. It's available as a python egg. | ||
|
||
Once you have installed AsciiDoc, you can build individual sections by invoking `asciidoc -b <output of choice> <section.txt>`. If you want to generate the whole tutorial as html, you can call `./generate.sh`. |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# Require BASH 3 or newer | ||
|
||
REQUIRED_BASH_VERSION=3.0.0 | ||
|
||
if [[ $BASH_VERSION < $REQUIRED_BASH_VERSION ]]; then | ||
echo "You must use Bash version 3 or newer to run this script" | ||
exit | ||
fi | ||
|
||
# Canonicalise the source dir, allow this script to be called anywhere | ||
|
||
SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
# DEFINE | ||
|
||
TARGET=$DIR/target | ||
|
||
echo "** Building tutorial" | ||
|
||
echo "**** Cleaning $TARGET" | ||
rm -rf $TARGET | ||
mkdir -p $TARGET | ||
|
||
echo "**** Copying shared resources to $TARGET" | ||
cp -r gfx $TARGET | ||
|
||
files=`find * -iname *.txt` | ||
for file in $files | ||
do | ||
output_filename=$TARGET/${file//.txt/.html} | ||
echo "**** Processing $file > ${output_filename}" | ||
asciidoc -b xhtml11 -a pygments -o ${output_filename} $file | ||
done |