From b70dfcf862ef81795210d6ceafc6ba9082199bf9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 4 Oct 2019 21:42:07 -0400 Subject: --show-{config,make,metadata,summary} --- org/doc_reform.org | 69 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 7 deletions(-) (limited to 'org/doc_reform.org') diff --git a/org/doc_reform.org b/org/doc_reform.org index a8fd2a6..1d853c1 100644 --- a/org/doc_reform.org +++ b/org/doc_reform.org @@ -348,6 +348,9 @@ bool[string] opts = [ "pod" : false, "serial" : false, "show-summary" : false, + "show-metadata" : false, + "show-make" : false, + "show-config" : false, "source" : false, "sqlite-discrete" : false, "sqlite-db-create" : false, @@ -408,6 +411,9 @@ auto helpInfo = getopt(args, "pod", "--pod doc reform pod source content bundled", &opts["pod"], "serial", "--serial serial processing", &opts["serial"], "show-summary", "--show-summary", &opts["show-summary"], + "show-make", "--show-make", &opts["show-make"], + "show-metadata", "--show-metadata", &opts["show-metadata"], + "show-config", "--show-config", &opts["show-config"], "source", "--source markup source text content", &opts["source"], "sqlite-discrete", "--sqlite process discrete sqlite output", &opts["sqlite-discrete"], "sqlite-db-create", "--sqlite-db-create create db, create tables", &opts["sqlite-db-create"], @@ -555,6 +561,15 @@ struct OptActions { bool show_summary() { return opts["show-summary"]; } + bool show_make() { + return opts["show-make"]; + } + bool show_metadata() { + return opts["show-metadata"]; + } + bool show_config() { + return opts["show-config"]; + } bool source() { return opts["source"]; } @@ -965,8 +980,9 @@ if ((doc_matters.opt.action.debug_do) #+END_SRC *** 2. _output processing_ (post abstraction processing) -**** 0. abstraction _print summary_ :abstraction:summary: -- abstraction summary +**** 0. abstraction +***** show document summary - abstraction _print summary_ (to screen) :abstraction:summary: +--show-summary (abstraction summary) #+NAME: doc_reform_each_file_do_debugs_checkdoc #+BEGIN_SRC d @@ -974,12 +990,51 @@ if ((doc_matters.opt.action.debug_do) if (doc_matters.opt.action.verbose || doc_matters.opt.action.show_summary ) { - import doc_reform.meta.metadoc_summary; + import doc_reform.meta.metadoc_show_summary; DocReformMetaDocSummary!()(doc_abstraction, doc_matters); } #+END_SRC -**** 0. abstraction harvest :abstraction:harvest: +***** show metadata (doc headers metadata) +--show-metadata + +#+NAME: doc_reform_each_file_do_debugs_checkdoc +#+BEGIN_SRC d +/+ ↓ debugs +/ +if (doc_matters.opt.action.show_metadata +) { + import doc_reform.meta.metadoc_show_metadata; + DocReformShowMetaData!()(doc_matters); +} +#+END_SRC + +***** show make (make files & doc headers) +--show-make + +#+NAME: doc_reform_each_file_do_debugs_checkdoc +#+BEGIN_SRC d +/+ ↓ debugs +/ +if (doc_matters.opt.action.show_make +) { + import doc_reform.meta.metadoc_show_make; + DocReformShowMake!()(doc_matters); +} +#+END_SRC + +***** show config (config files & doc headers) +--show-config + +#+NAME: doc_reform_each_file_do_debugs_checkdoc +#+BEGIN_SRC d +/+ ↓ debugs +/ +if (doc_matters.opt.action.show_config +) { + import doc_reform.meta.metadoc_show_config; + DocReformShowConfig!()(doc_matters); +} +#+END_SRC + +***** abstraction harvest :abstraction:harvest: - abstraction harvest #+NAME: doc_reform_each_file_do_debugs_checkdoc @@ -1028,7 +1083,7 @@ if (!(doc_matters.opt.action.skip_output)) { scope(exit) { if (!(_opt_action.quiet)) { writefln( - "processed file: %s (%s)", + "processed file: %s [%s]", manifest.src.filename, manifest.src.language ); @@ -1356,7 +1411,7 @@ struct DocumentMatters { return SQLite_(); } auto output_path() { - return _manifest.output.path; + return _make_and_meta_struct.conf.output_path; } auto srcs() { struct SRC_ { @@ -1451,7 +1506,7 @@ struct DocumentMattersAbridged { return SQLite_(); } auto output_path() { - return _manifest.output.path; + return _make_and_meta_struct.conf.output_path; } } #+END_SRC -- cgit v1.2.3