aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/sdp.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-11-28 20:54:26 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commitaf1765cd7b2f3b1309eea5bcdb91780176518c88 (patch)
tree7529b40e4ecdaabc10c6737486a9ce1795dfea33 /org/sdp.org
parentdiscrete objects marks, output html work in progress (diff)
0.9.2 backmatter: control processing, possible to omit sections
Diffstat (limited to 'org/sdp.org')
-rw-r--r--org/sdp.org106
1 files changed, 61 insertions, 45 deletions
diff --git a/org/sdp.org b/org/sdp.org
index afd2be5..a016400 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -24,7 +24,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 9, 1);
+enum ver = Version(0, 9, 2);
#+END_SRC
* sdp.d sisu document parser :sdp.d:
@@ -215,52 +215,68 @@ look into using getopt
#+NAME: sdp_args
#+BEGIN_SRC d
bool[string] opt_action_bool = [
- "assertions" : false,
- "concordance" : false,
- "digest" : false,
- "docbook" : false,
- "epub" : false,
- "html" : false,
- "manifest" : false,
- "no_ocn" : false,
- "odt" : false,
- "pdf" : false,
- "postgresql" : false,
- "qrcode" : false,
- "sisupod" : false,
- "source" : false,
- "sqlite" : false,
- "text" : false,
- "verbose" : false,
- "xhtml" : false,
- "xml_dom" : false,
- "xml_sax" : false,
+ "assertions" : false,
+ "concordance" : false,
+ "digest" : false,
+ "docbook" : false,
+ "epub" : false,
+ "html" : false,
+ "manifest" : false,
+ "ocn" : true,
+ "odt" : false,
+ "pdf" : false,
+ "postgresql" : false,
+ "qrcode" : false,
+ "sisupod" : false,
+ "source" : false,
+ "sqlite" : false,
+ "text" : false,
+ "verbose" : false,
+ "xhtml" : false,
+ "xml_dom" : false,
+ "xml_sax" : false,
+ "section_toc" : true,
+ "section_body" : true,
+ "section_endnotes" : true,
+ "section_glossary" : true,
+ "section_biblio" : true,
+ "section_bookindex" : true,
+ "section_blurb" : true,
+ "backmatter" : true,
];
auto helpInfo = getopt(args,
std.getopt.config.passThrough,
- "assert", "--assert set optional assertions on", &opt_action_bool["assertions"],
- "concordance", "--concordance file for document", &opt_action_bool["concordance"],
- "digest", "--digest hash digest for each object", &opt_action_bool["digest"],
- "docbook", "--docbook process docbook output", &opt_action_bool["docbook"],
- "epub", "--epub process epub output", &opt_action_bool["epub"],
- "html", "--html process html output", &opt_action_bool["html"],
- "manifest", "--manifest process manifest output", &opt_action_bool["manifest"],
- "no-ocn", "--no-ocn suppress object cite numbers", &opt_action_bool["no_ocn"],
- "odf", "--odf process odf:odt output", &opt_action_bool["odt"],
- "odt", "--odt process odf:odt output", &opt_action_bool["odt"],
- "pdf", "--pdf process pdf output", &opt_action_bool["pdf"],
- "pg", "--pg process postgresql output", &opt_action_bool["postgresql"],
- "postgresql", "--postgresql process postgresql output", &opt_action_bool["postgresql"],
- "qrcode", "--qrcode with document metadata", &opt_action_bool["qrcode"],
- "sisupod", "--sisupod sisupod source content bundled", &opt_action_bool["sisupod"],
- "source", "--source markup source text content", &opt_action_bool["source"],
- "sqlite", "--sqlite process sqlite output", &opt_action_bool["sqlite"],
- "text", "--text process text output", &opt_action_bool["text"],
- "txt", "--txt process text output", &opt_action_bool["text"],
- "verbose|v", "--verbose output to terminal", &opt_action_bool["verbose"],
- "xhtml", "--xhtml process xhtml output", &opt_action_bool["xhtml"],
- "xml-dom", "--xml-dom process xml dom output", &opt_action_bool["xml_dom"],
- "xml-sax", "--xml-sax process xml sax output", &opt_action_bool["xml_sax"],
+ "assert", "--assert set optional assertions on", &opt_action_bool["assertions"],
+ "concordance", "--concordance file for document", &opt_action_bool["concordance"],
+ "digest", "--digest hash digest for each object", &opt_action_bool["digest"],
+ "docbook", "--docbook process docbook output", &opt_action_bool["docbook"],
+ "epub", "--epub process epub output", &opt_action_bool["epub"],
+ "html", "--html process html output", &opt_action_bool["html"],
+ "manifest", "--manifest process manifest output", &opt_action_bool["manifest"],
+ "ocn", "--ocn object cite numbers (default)", &opt_action_bool["ocn"],
+ "odf", "--odf process odf:odt output", &opt_action_bool["odt"],
+ "odt", "--odt process odf:odt output", &opt_action_bool["odt"],
+ "pdf", "--pdf process pdf output", &opt_action_bool["pdf"],
+ "pg", "--pg process postgresql output", &opt_action_bool["postgresql"],
+ "postgresql", "--postgresql process postgresql output", &opt_action_bool["postgresql"],
+ "qrcode", "--qrcode with document metadata", &opt_action_bool["qrcode"],
+ "sisupod", "--sisupod sisupod source content bundled", &opt_action_bool["sisupod"],
+ "source", "--source markup source text content", &opt_action_bool["source"],
+ "sqlite", "--sqlite process sqlite output", &opt_action_bool["sqlite"],
+ "text", "--text process text output", &opt_action_bool["text"],
+ "txt", "--txt process text output", &opt_action_bool["text"],
+ "verbose|v", "--verbose output to terminal", &opt_action_bool["verbose"],
+ "xhtml", "--xhtml process xhtml output", &opt_action_bool["xhtml"],
+ "xml-dom", "--xml-dom process xml dom output", &opt_action_bool["xml_dom"],
+ "xml-sax", "--xml-sax process xml sax output", &opt_action_bool["xml_sax"],
+ "section-toc", "--section-toc process table of contents (default)", &opt_action_bool["section_toc"],
+ "section-body", "--section-body process document body (default)", &opt_action_bool["section_body"],
+ "section-endnotes", "--section-endnotes process document endnotes (default)", &opt_action_bool["section_endnotes"],
+ "section-glossary", "--section-glossary process document glossary (default)", &opt_action_bool["section_glossary"],
+ "section-biblio", "--section-biblio process document biblio (default)", &opt_action_bool["section_biblio"],
+ "section-bookindex", "--section-bookindex process document bookindex (default)", &opt_action_bool["section_bookindex"],
+ "section-blurb", "--section-blurb process document blurb (default)", &opt_action_bool["section_blurb"],
+ "backmatter", "--section-backmatter process document backmatter (default)", &opt_action_bool["backmatter"],
);
if (helpInfo.helpWanted) {
defaultGetoptPrinter("Some information about the program.", helpInfo.options);
@@ -358,7 +374,7 @@ string[string][string] dochead_meta = header_make_and_meta_tuple[1];
#+NAME: sdp_each_file_do_document_abstraction
#+BEGIN_SRC d
/+ ↓ document abstraction: process document, return abstraction as tuple +/
-auto t = abs.abstract_doc_source(content_body, dochead_make, dochead_meta);
+auto t = abs.abstract_doc_source(content_body, dochead_make, dochead_meta, opt_action_bool);
static assert(!isTypeTuple!(t));
auto doc_ao_contents = t[0]; // head ~ toc ~ contents ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~blurb;
auto doc_ao_bookindex_unordered_hashes = t[1]; // redundant?