From cfeca24d5b2a6057860d435364d248db02fd0122 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 12 Aug 2012 15:31:51 -0400 Subject: Add updated (but now old) notes. --- 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 -- cgit v0.9.1