diff options
Diffstat (limited to 'org/spine.org')
-rw-r--r-- | org/spine.org | 83 |
1 files changed, 55 insertions, 28 deletions
diff --git a/org/spine.org b/org/spine.org index 82cdeb7..5f39984 100644 --- a/org/spine.org +++ b/org/spine.org @@ -7,6 +7,7 @@ #+COPYRIGHT: Copyright (C) 2015 - 2020 Ralph Amissah #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty +#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t #+PROPERTY: header-args :exports code #+PROPERTY: header-args+ :noweb yes #+PROPERTY: header-args+ :eval no @@ -96,8 +97,16 @@ string project_name = "spine"; string program_name = "spine"; @system void main(string[] args) { <<spine_mixin>> - <<spine_init>> - <<spine_args>> + <<spine_init_0>> + <<spine_init_1>> + <<spine_init_2>> + <<spine_args_0>> + <<spine_args_1>> + <<spine_args_2>> + <<spine_args_3>> + <<spine_args_4>> + <<spine_args_5>> + <<spine_args_6>> if (_manifests.length > 1 // _manifests[0] initialized dummy element && _opt_action.abstraction) { if (_opt_action.parallelise) { // see else @@ -106,7 +115,12 @@ string program_name = "spine"; if (!empty(manifest.src.filename)) { <<spine_each_file_do_scope>> <<spine_each_file_do_abstraction>> - <<spine_each_file_do_debugs_checkdoc>> + <<spine_each_file_do_debugs_checkdoc_0>> + <<spine_each_file_do_debugs_checkdoc_1>> + <<spine_each_file_do_debugs_checkdoc_2>> + <<spine_each_file_do_debugs_checkdoc_3>> + <<spine_each_file_do_debugs_checkdoc_4>> + <<spine_each_file_do_debugs_checkdoc_5>> <<spine_each_file_do_selected_output>> <<spine_each_file_do_scope_exit>> } else { @@ -121,7 +135,12 @@ string program_name = "spine"; if (!empty(manifest.src.filename)) { <<spine_each_file_do_scope>> <<spine_each_file_do_abstraction>> - <<spine_each_file_do_debugs_checkdoc>> + <<spine_each_file_do_debugs_checkdoc_0>> + <<spine_each_file_do_debugs_checkdoc_1>> + <<spine_each_file_do_debugs_checkdoc_2>> + <<spine_each_file_do_debugs_checkdoc_3>> + <<spine_each_file_do_debugs_checkdoc_4>> + <<spine_each_file_do_debugs_checkdoc_5>> <<spine_each_file_do_selected_output>> <<spine_each_file_do_scope_exit>> } else { @@ -307,14 +326,14 @@ mixin outputHub; **** init :init: -#+NAME: spine_init +#+NAME: spine_init_0 #+BEGIN_SRC d auto hvst = spineHarvest!(); #+END_SRC **** args :args: -#+NAME: spine_init +#+NAME: spine_init_1 #+BEGIN_SRC d string flag_action; string arg_unrecognized; @@ -324,7 +343,7 @@ static auto rgx = RgxI(); *** scope (run complete) :scope: -#+NAME: spine_init +#+NAME: spine_init_2 #+BEGIN_SRC d scope(success) { writefln( @@ -349,7 +368,7 @@ scope(failure) { - set getopt options ***** initialize -#+NAME: spine_args +#+NAME: spine_args_0 #+BEGIN_SRC d bool[string] opts = [ "abstraction" : false, @@ -427,7 +446,7 @@ string[string] settings = [ ***** set & describe -#+NAME: spine_args +#+NAME: spine_args_1 #+BEGIN_SRC d auto helpInfo = getopt(args, std.getopt.config.passThrough, @@ -509,7 +528,7 @@ if (helpInfo.helpWanted) { **** getopt hash to struct - move getopt options to struct -#+NAME: spine_args +#+NAME: spine_args_2 #+BEGIN_SRC d enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } struct OptActions { @@ -830,7 +849,7 @@ OptActions _opt_action = OptActions(); **** env - environmental info -#+NAME: spine_args +#+NAME: spine_args_3 #+BEGIN_SRC d @safe auto program_info() { struct ProgramInfo { @@ -862,7 +881,7 @@ auto _env = [ *** get/read site config -#+NAME: spine_args +#+NAME: spine_args_4 #+BEGIN_SRC d auto _manifested = PathMatters!()(_opt_action, _env, ""); auto _manifests = [ _manifested ]; @@ -897,7 +916,7 @@ if (_opt_action.show_config) { *** use config for operations that do not require file processing -#+NAME: spine_args +#+NAME: spine_args_5 #+BEGIN_SRC d if (!(_opt_action.skip_output)) { if ((_opt_action.debug_do) @@ -916,7 +935,7 @@ if (!(_opt_action.skip_output)) { *** opt action on processing files (loop args) -#+NAME: spine_args +#+NAME: spine_args_6 #+BEGIN_SRC d ConfComposite _make_and_meta_struct = _config; destroy(_config); @@ -1153,7 +1172,7 @@ if ((doc_matters.opt.action.debug_do) ***** show document summary - abstraction _print summary_ (to screen) :abstraction:summary: --show-summary (abstraction summary) -#+NAME: spine_each_file_do_debugs_checkdoc +#+NAME: spine_each_file_do_debugs_checkdoc_0 #+BEGIN_SRC d /+ ↓ debugs +/ if (doc_matters.opt.action.verbose @@ -1167,7 +1186,7 @@ if (doc_matters.opt.action.verbose ***** show metadata (doc headers metadata) --show-metadata -#+NAME: spine_each_file_do_debugs_checkdoc +#+NAME: spine_each_file_do_debugs_checkdoc_1 #+BEGIN_SRC d /+ ↓ debugs +/ if (doc_matters.opt.action.show_metadata) { @@ -1179,7 +1198,7 @@ if (doc_matters.opt.action.show_metadata) { ***** show make (make files & doc headers) --show-make -#+NAME: spine_each_file_do_debugs_checkdoc +#+NAME: spine_each_file_do_debugs_checkdoc_2 #+BEGIN_SRC d /+ ↓ debugs +/ if (doc_matters.opt.action.show_make) { @@ -1191,7 +1210,7 @@ if (doc_matters.opt.action.show_make) { ***** show config (config files & doc headers) --show-config -#+NAME: spine_each_file_do_debugs_checkdoc +#+NAME: spine_each_file_do_debugs_checkdoc_3 #+BEGIN_SRC d /+ ↓ debugs +/ if (doc_matters.opt.action.show_config) { @@ -1203,7 +1222,7 @@ if (doc_matters.opt.action.show_config) { ***** abstraction harvest :abstraction:harvest: - abstraction harvest -#+NAME: spine_each_file_do_debugs_checkdoc +#+NAME: spine_each_file_do_debugs_checkdoc_4 #+BEGIN_SRC d if (doc_matters.opt.action.harvest) { auto _hvst = spineMetaDocHarvest!()(doc_matters, hvst); @@ -1225,7 +1244,7 @@ if (doc_matters.opt.action.harvest) { **** 1. _debug_ (document parts, checkdoc) :debug:checkdoc: - [[./meta_output_debugs.org][meta_output_debugs]] -#+NAME: spine_each_file_do_debugs_checkdoc +#+NAME: spine_each_file_do_debugs_checkdoc_5 #+BEGIN_SRC d /+ ↓ debugs +/ if (doc_matters.opt.action.debug_do) { @@ -1304,6 +1323,14 @@ template spineAbstraction() { <<spine_each_file_do_split_dr_markup_file_header_into_make_and_meta_structs>> <<spine_each_file_do_document_abstraction>> <<spine_each_file_do_document_matters>> + <<spine_each_file_do_document_matters_0>> + <<spine_each_file_do_document_matters_1>> + <<spine_each_file_do_document_matters_2>> + <<spine_each_file_do_document_matters_3>> + <<spine_each_file_do_document_matters_4>> + <<spine_each_file_do_document_matters_5>> + <<spine_each_file_do_document_matters_6>> + <<spine_each_file_do_document_matters_7>> auto t = tuple(doc_abstraction, doc_matters); return t; } @@ -1454,14 +1481,14 @@ if ((_opt_action.debug_do) **** DocumentMatters struct { -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_0 #+BEGIN_SRC d struct DocumentMatters { #+END_SRC **** generator related -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_1 #+BEGIN_SRC d @safe auto generator_program() { struct Prog_ { @@ -1510,7 +1537,7 @@ struct DocumentMatters { **** config make & meta -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_2 #+BEGIN_SRC d @safe auto conf_make_meta() { return _make_and_meta_struct; @@ -1522,7 +1549,7 @@ struct DocumentMatters { **** env related -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_3 #+BEGIN_SRC d @safe auto env() { struct Env_ { @@ -1539,7 +1566,7 @@ struct DocumentMatters { **** opt -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_4 #+BEGIN_SRC d @safe auto opt() { struct Opt_ { @@ -1557,7 +1584,7 @@ struct DocumentMatters { **** output related -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_5 #+BEGIN_SRC d @safe auto src() { return _manifest.src; @@ -1618,7 +1645,7 @@ struct DocumentMatters { **** } close -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_6 #+BEGIN_SRC d } auto doc_matters = DocumentMatters(); @@ -1626,7 +1653,7 @@ auto doc_matters = DocumentMatters(); **** step complete message -#+NAME: spine_each_file_do_document_matters +#+NAME: spine_each_file_do_document_matters_7 #+BEGIN_SRC d if ((_opt_action.debug_do) || (_opt_action.very_verbose) |