Skip to content

Commit ee08156

Browse files
authored
Merge pull request #26 from rcraggs/master
Added script to generate example HTML docs for each style
2 parents c8ba26c + 8f9c557 commit ee08156

File tree

3 files changed

+194
-0
lines changed

3 files changed

+194
-0
lines changed

Diff for: generate_examples/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Generates html examples for each of the styles. Run `./generate.sh` from inside the `generate_examples` directory to create an example for each in the `generate_examples/out` folder.

Diff for: generate_examples/example.html

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<body>
2+
<head>
3+
<link rel="stylesheet" type="text/css" href="../../XXX.css">
4+
</head>
5+
<h1 id="an-h1-header--">An h1 header </h1>
6+
7+
<p>Paragraphs are separated by a blank line.</p>
8+
9+
<p>2nd paragraph. <em>Italic</em>, <strong>bold</strong>, and <code>monospace</code>. Itemized lists<br/>
10+
look like:</p>
11+
12+
<ul>
13+
<li>this one</li>
14+
<li>that one</li>
15+
<li>the other one</li>
16+
</ul>
17+
18+
19+
<p>Note that &mdash; not considering the asterisk &mdash; the actual text<br/>
20+
content starts at 4-columns in.</p>
21+
22+
<blockquote><p>Block quotes are<br/>
23+
written like so.</p>
24+
25+
<p>They can span multiple paragraphs,<br/>
26+
if you like.</p></blockquote>
27+
28+
<p>Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., &ldquo;it&rsquo;s all<br/>
29+
in chapters 12&ndash;14&rdquo;). Three dots &hellip; will be converted to an ellipsis.<br/>
30+
Unicode is supported. ☺</p>
31+
32+
<h2 id="an-h2-header--">An h2 header </h2>
33+
34+
<p>Here&rsquo;s a numbered list:</p>
35+
36+
<ol>
37+
<li>first item</li>
38+
<li>second item</li>
39+
<li>third item</li>
40+
</ol>
41+
42+
43+
<p>Note again how the actual text starts at 4 columns in (4 characters<br/>
44+
from the left side). Here&rsquo;s a code sample:</p>
45+
46+
<pre><code># Let me re-iterate ...
47+
for i in 1 .. 10 { do-something(i) }
48+
</code></pre>
49+
50+
<p>As you probably guessed, indented 4 spaces. By the way, instead of<br/>
51+
indenting the block, you can use delimited blocks, if you like:</p>
52+
53+
<pre><code class="(null)">define foobar() {
54+
print &quot;Welcome to flavor country!&quot;;
55+
}</code></pre>
56+
57+
58+
<p>(which makes copying &amp; pasting easier). You can optionally mark the<br/>
59+
delimited block for Pandoc to syntax highlight it:</p>
60+
61+
<pre><code class="python">import time
62+
# Quick, count to ten!
63+
for i in range(10):
64+
# (but not *too* quick)
65+
time.sleep(0.5)
66+
print i</code></pre>
67+
68+
69+
<h3 id="an-h3-header">An h3 header</h3>
70+
71+
<p>Now a nested list:</p>
72+
73+
<ol>
74+
<li><p>First, get these ingredients:</p>
75+
76+
<ul>
77+
<li>carrots</li>
78+
<li>celery</li>
79+
<li>lentils</li>
80+
</ul>
81+
</li>
82+
<li><p>Boil some water.</p></li>
83+
<li><p>Dump everything in the pot and follow<br/>
84+
this algorithm:</p>
85+
86+
<pre><code>find wooden spoon
87+
uncover pot
88+
stir
89+
cover pot
90+
balance wooden spoon precariously on pot handle
91+
wait 10 minutes
92+
goto first step (or shut off burner when done)
93+
</code></pre>
94+
95+
<p>Do not bump wooden spoon or it will fall.</p></li>
96+
</ol>
97+
98+
99+
<p>Notice again how text always lines up on 4-space indents (including<br/>
100+
that last line which continues item 3 above).</p>
101+
102+
<p>Here&rsquo;s a link to <a href="http://foo.bar">a website</a>, to a <a href="local-doc.html">local<br/>
103+
doc</a>, and to a <a href="#an-h2-header">section heading in the current<br/>
104+
doc</a>. Here&rsquo;s a footnote <sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>.</p>
105+
106+
<p>Tables can look like this:</p>
107+
108+
<p>size material color</p>
109+
110+
<hr />
111+
112+
<p>9 leather brown<br/>
113+
10 hemp canvas natural<br/>
114+
11 glass transparent</p>
115+
116+
<p>Table: Shoes, their sizes, and what they&rsquo;re made of</p>
117+
118+
<p>(The above is the caption for the table.) Pandoc also supports<br/>
119+
multi-line tables:</p>
120+
121+
<hr />
122+
123+
<p>keyword text</p>
124+
125+
<hr />
126+
127+
<p>red Sunsets, apples, and<br/>
128+
other red or reddish<br/>
129+
things.</p>
130+
131+
<p>green Leaves, grass, frogs<br/>
132+
and other things it&rsquo;s<br/>
133+
not easy being.</p>
134+
135+
<hr />
136+
137+
<p>A horizontal rule follows.</p>
138+
139+
<hr />
140+
141+
<p>Here&rsquo;s a definition list:</p>
142+
143+
<p>apples<br/>
144+
: Good for making applesauce.<br/>
145+
oranges<br/>
146+
: Citrus!<br/>
147+
tomatoes<br/>
148+
: There&rsquo;s no &ldquo;e&rdquo; in tomatoe.</p>
149+
150+
<p>Again, text is indented 4 spaces. (Put a blank line between each<br/>
151+
term/definition pair to spread things out more.)</p>
152+
153+
<p>Here&rsquo;s a &ldquo;line block&rdquo;:</p>
154+
155+
<p>| Line one<br/>
156+
| Line too<br/>
157+
| Line tree</p>
158+
159+
<p>and images can be specified like so:</p>
160+
161+
<p><img src="http://via.placeholder.com/350x150" title="An exemplary image" alt="example image" /></p>
162+
163+
<p>Inline math equations go in like so: $\omega = d\phi / dt$. Display<br/>
164+
math should get its own line and be put in in double-dollarsigns:</p>
165+
166+
<p>$$I = \int \rho R^{2} dV$$</p>
167+
168+
<p>And note that you can backslash-escape any punctuation characters<br/>
169+
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.</p>
170+
<div class="footnotes">
171+
<hr/>
172+
<ol>
173+
<li id="fn:1">
174+
<p>Footnote text goes here.<a href="#fnref:1" rev="footnote">&#8617;</a></p></li>
175+
</ol>
176+
</div>
177+
</html>

Diff for: generate_examples/generate.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
rm -fr out
3+
mkdir out
4+
5+
FILES=../*.css
6+
for f in $FILES
7+
do
8+
name=$(basename "$f" .css)
9+
outname="out/${name}.html"
10+
cp example.html "$outname"
11+
12+
# Set this css in the filename
13+
sed -i -e "s/XXX/$name/g" "$outname"
14+
rm "$outname-e" # An I using Sed wrong!?
15+
done

0 commit comments

Comments
 (0)