blob: fca3838b716612d2730990f016b4e5f6b8df87b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
MD -> TXT:
scripts/preprocmdheaders.pl -n $docdir
MD -> HTML:
scripts/preprocmdheaders.pl -nl $docdir
scripts/linkpages.pl $docdir
markdown $docdir/index.txt > $docdir/index.html
while read file; do \
markdown $docdir/$file.txt > $docdir/$file.html
done < $docdir/series
scripts/postprochtmlheaders.pl -anL $docdir
scripts/preprocmdheaders.pl [-ntl] docdir
options
-n prepend section numbers to headers
-l handle hyperlinks to sections in text and table of contents
pseudocode
chapter = 0
for each file in $docdir/series:
++chapter
...
for each header:
if opt n:
...
...
scripts/linkpages.pl docdir
scripts/postprochtmlheaders.pl [-anL] docdir
options
-a add "id" attributes to headers
-n remove section numbers from "id" attributes (use with -a)
-L increment header levels
$docdir/
+- appendices
| A list of appendix documents in the book.
+- chapters
| A list of chapter documents in the book.
+- first-chapter.md
| The source file for a chapter.
+- first-chapter.html
| The rendered HTML file for a chapter.
+- first-chapter.txt
| The rendered text file for a chapter.
+- reference-stuff.md
| The source file for an appendix.
+- second-chapter.md
| The source file for a chapter.
\- title.md
The source file for the title page.
|