From 5468e76a7eb6a910b095bf065bc70cdf244c0a1c Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 28 Dec 2006 06:40:21 +0000 Subject: Added "Demos" page to the website. git-svn-id: https://pandoc.googlecode.com/svn/trunk@298 788f1e2b-df1e-0410-8736-df70ead52e1b --- web/S5DEMO | 19 +++++++++++++++++++ web/demos.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ web/header.html | 9 +++++---- 3 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 web/S5DEMO create mode 100644 web/demos.sh (limited to 'web') diff --git a/web/S5DEMO b/web/S5DEMO new file mode 100644 index 000000000..e61ecf853 --- /dev/null +++ b/web/S5DEMO @@ -0,0 +1,19 @@ +% Eating Habits +% John Doe +% March 22, 2005 + +# In the morning + +- Eat eggs +- Drink coffee + +# In the evening + +- Eat spaghetti +- Drink wine + +# Conclusion + +- And the answer is... +- $f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$ + diff --git a/web/demos.sh b/web/demos.sh new file mode 100644 index 000000000..3c402ead6 --- /dev/null +++ b/web/demos.sh @@ -0,0 +1,43 @@ +#!/bin/sh -e +# creates demo page for pandoc +# argument is the destination directory + +DEST=$1 + +NEWLINE=' +' +DEMOS='pandoc README -o demo0.html +pandoc -s -S README -o demo0.html +pandoc -s README -o demo0.tex +pandoc -s -w rst README -o demo0.txt +pandoc -s README -o demo0.rtf +pandoc -s -m -i -w s5 S5DEMO -o demo0.html +web2markdown http://www.gnu.org/software/make/ -o demo0.txt +markdown2pdf README -o demo0.pdf' + +oldifs=$IFS +IFS=$NEWLINE +set -- $DEMOS +IFS=$oldifs + +cd $DEST +PATH=../..:$PATH + +echo '% Pandoc demos + +To see the output created by each of the commands below, +click on the name of the output file: + +' +num=0 +for command in "$@"; do + num=$((num + 1)) + command=$(echo $command | sed -e "s/0/$num/") + firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/') + input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/') + output=$(echo $command | sed -e 's/.*-o \(.*\)/\1/') + echo "1. $firstpart $input -o $output" + result=$($command) # run the command and create output file + echo "Created $output." >&2 +done + diff --git a/web/header.html b/web/header.html index fbbe7ac15..ee5528c94 100644 --- a/web/header.html +++ b/web/header.html @@ -4,10 +4,11 @@
-- cgit v1.2.3