aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp.d')
-rwxr-xr-xsrc/sdp.d104
1 files changed, 60 insertions, 44 deletions
diff --git a/src/sdp.d b/src/sdp.d
index 3cb555a..9f98716 100755
--- a/src/sdp.d
+++ b/src/sdp.d
@@ -88,52 +88,68 @@ void main(string[] args) {
}
}
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);
@@ -194,7 +210,7 @@ void main(string[] args) {
string[string][string] dochead_make = header_make_and_meta_tuple[0];
string[string][string] dochead_meta = header_make_and_meta_tuple[1];
/+ ↓ 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?