diff options
author | P. J. McDermott <pjm@nac.net> | 2012-08-12 15:31:51 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-08-12 15:31:51 (EDT) |
commit | cfeca24d5b2a6057860d435364d248db02fd0122 (patch) | |
tree | 65ed54c5adf25d2468298aec22336f538aff9493 | |
parent | c35bb407534901f283787c9458c24c9ac6810858 (diff) |
Add updated (but now old) notes.
-rw-r--r-- | notes/processing-scripts.txt | 81 |
1 files changed, 80 insertions, 1 deletions
diff --git a/notes/processing-scripts.txt b/notes/processing-scripts.txt index fca3838..35e8edb 100644 --- a/notes/processing-scripts.txt +++ b/notes/processing-scripts.txt @@ -28,7 +28,28 @@ 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 + +scripts/preproc.pl + options + -f format + "txt" or "html" + pseudopseudocode + scan each source file for sections + build a ToC + print(' ' x $seclev, "* [$secnum $sectitle][$secid]\n"); + if txt + add section numbers to headers + add $title . "\n" . '*' x strlen($title) + if html + add link defs "[$secid]: $chapter.html#$section_id" +scripts/postproc.pl + options + -f format + "txt" or "html" + pseudopseudocode + if txt + blame the schools and bail out + add section numbers and "id" attributes to headers $docdir/ @@ -48,3 +69,61 @@ $docdir/ | The source file for a chapter. \- title.md The source file for the title page. + + +ToC substitution: +$[toc] + +section link substitution: +$[sectlink][foo] +[ยง 1.10.11][foo] + +# create book and documents - DONE +# book->parse() - DONE +# foreach document: - DONE +# doc->parse() - DONE +# foreach heading: - DONE +# section = new Section - DONE +# push(self->sections, section) - DONE +# book->add_section() - DONE +# prefix section title with num - DONE +# book->output() - DONE +# book->subst_macros - DONE +# build ToC string - DONE +# foreach document: - DONE +# doc(Txt)->output() - DONE +# book->subst_macros() - DONE +# write title - DONE +# dump Markdown text - DONE +# doc(HTML)->output() - DONE +# book->subst_macros() - DONE +# append link defs string - DONE +# generate HTML (markdown) - DONE +# parse HTML - DONE +# foreach heading: - DONE +# set id attribute - DONE +# write templated documents - DONE +# +# Book +# new +# add_section +# indexes section by id +# appends to link defs string +# parse +# output +# add_section +# add_macro +# subst_macros +# _do_subst_macro +# Document +# new +# parse +# Document::Txt +# output +# Document::HTML +# output +# Section +# new +# number +# id +# title |