git.iko.soy/typeable/pandoc
on master help sign in
Added "Demos" page to the website.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@298 788f1e2b-df1e-0410-8736-df70ead52e1b

commit5468e76a7eb6a910b095bf065bc70cdf244c0a1c authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateThu 28 Dec 2006, 06:40 (20 years ago) parenta1a30d6
4 files changed+72−5
Makefile+5−1 web/S5DEMO+19 web/demos.sh+43 web/header.html+5−4
Makefile+5−1
@@ -344,7 +344,7 @@ make_page:=./$(MAIN) -s -B $(web_src)/header.html \
344344 -H $(web_src)/css
345345cleanup_files+=$(web_dest)
346346website: $(web_dest)
347−$(web_dest)/: $(MAIN) html
347+$(web_dest)/: $(MAIN) html
348348 -rm -rf $(web_dest)
349349 ( \
350350 mkdir $(web_dest); \
@@ -363,6 +363,10 @@ $(web_dest)/: $(MAIN) html
363363 sed -e 's/@WINDOWS_PKG_NAME@/$(win_pkg_name)/g' | \
364364 sed -e 's/@VERSION@/$(VERSION)/g' | \
365365 $(make_page) > $(web_dest)/index.html; \
366+ cp README $(web_dest)/README; \
367+ cp $(web_src)/S5DEMO $(web_dest)/S5DEMO; \
368+ sh $(web_src)/demos.sh $(web_dest) | \
369+ $(make_page) > $(web_dest)/demos.html; \
366370 ) || { rm -rf $(web_dest); exit 1; }
367371
368372.PHONY: distclean clean
web/S5DEMOnew file+19
@@ -0,0 +1,19 @@
1+% Eating Habits
2+% John Doe
3+% March 22, 2005
4+
5+# In the morning
6+
7+- Eat eggs
8+- Drink coffee
9+
10+# In the evening
11+
12+- Eat spaghetti
13+- Drink wine
14+
15+# Conclusion
16+
17+- And the answer is...
18+- $f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$
19+
web/demos.shnew file+43
@@ -0,0 +1,43 @@
1+#!/bin/sh -e
2+# creates demo page for pandoc
3+# argument is the destination directory
4+
5+DEST=$1
6+
7+NEWLINE='
8+'
9+DEMOS='pandoc README -o demo0.html
10+pandoc -s -S README -o demo0.html
11+pandoc -s README -o demo0.tex
12+pandoc -s -w rst README -o demo0.txt
13+pandoc -s README -o demo0.rtf
14+pandoc -s -m -i -w s5 S5DEMO -o demo0.html
15+web2markdown http://www.gnu.org/software/make/ -o demo0.txt
16+markdown2pdf README -o demo0.pdf'
17+
18+oldifs=$IFS
19+IFS=$NEWLINE
20+set -- $DEMOS
21+IFS=$oldifs
22+
23+cd $DEST
24+PATH=../..:$PATH
25+
26+echo '% Pandoc demos
27+
28+To see the output created by each of the commands below,
29+click on the name of the output file:
30+
31+'
32+num=0
33+for command in "$@"; do
34+ num=$((num + 1))
35+ command=$(echo $command | sed -e "s/0/$num/")
36+ firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/')
37+ input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/')
38+ output=$(echo $command | sed -e 's/.*-o \(.*\)/\1/')
39+ echo "1. <code>$firstpart <a href=\""$input"\" title=\""View input file"\">$input</a> -o <a href=\""$output"\" title=\""View pandoc output"\">$output</a></code>"
40+ result=$($command) # run the command and create output file
41+ echo "Created $output." >&2
42+done
43+
web/header.html+5−4
@@ -4,10 +4,11 @@
44
55<div id="sidebar">
66<ul>
7−<li><a href="index.html">Home</a></li>
8−<li><a href="README.html">README</a></li>
9−<li><a href="doc/index.html">API</a></li>
10−<li><a href="history.html">History</a></li>
7+<li><a href="index.html" title="Home page">Home</a></li>
8+<li><a href="README.html" title="Pandoc documentation">README</a></li>
9+<li><a href="demos.html" title="Pandoc demos">Demos</a></li>
10+<li><a href="doc/index.html" title="API documentation for Pandoc libraries">API</a></li>
11+<li><a href="history.html" title="Pandoc's changelog">History</a></li>
1112</ul>
1213</div>
1314<div id="main" class="withleftmenu">