diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/doc_reform/doc_reform.d | 7 | ||||
-rw-r--r-- | src/doc_reform/meta/conf_make_meta_json.d | 3 | ||||
-rw-r--r-- | src/doc_reform/meta/conf_make_meta_toml.d | 6 | ||||
-rw-r--r-- | src/doc_reform/meta/metadoc_from_src.d | 8 | ||||
-rw-r--r-- | src/doc_reform/output/hub.d | 10 | ||||
-rw-r--r-- | src/doc_reform/source/paths_source.d | 8 |
6 files changed, 23 insertions, 19 deletions
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d index 48608f6..081c95c 100755 --- a/src/doc_reform/doc_reform.d +++ b/src/doc_reform/doc_reform.d @@ -131,10 +131,9 @@ void main(string[] args) { "sqlite-db-create", "--sqlite-db-create create db, create tables", &opts["sqlite-db-create"], "sqlite-db-drop", "--sqlite-db-drop drop tables & db", &opts["sqlite-db-drop"], "sqlite-db-recreate", "--sqlite-db-recreate create db, create tables", &opts["sqlite-db-recreate"], - // "sqlite-db-populate", "--sqlite-db-populate create db & tables, insert specified", &opts["sqlite-db-populate"], - "sqlite-delete", "--sqlite process sqlite output", &opts["sqlite-delete"], - "sqlite-insert", "--sqlite process sqlite output", &opts["sqlite-insert"], - "sqlite-update", "--sqlite process sqlite output", &opts["sqlite-update"], + "sqlite-delete", "--sqlite-delete process sqlite output", &opts["sqlite-delete"], + "sqlite-insert", "--sqlite-insert process sqlite output", &opts["sqlite-insert"], + "sqlite-update", "--sqlite-update process sqlite output", &opts["sqlite-update"], "text", "--text process text output", &opts["text"], "txt", "--txt process text output", &opts["text"], "verbose|v", "--verbose output to terminal", &opts["verbose"], diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d index 484747a..248c9d2 100644 --- a/src/doc_reform/meta/conf_make_meta_json.d +++ b/src/doc_reform/meta/conf_make_meta_json.d @@ -543,7 +543,8 @@ static template contentJSONtoDocReformStruct() { } } string[] authors_arr; - auto authors_raw_arr = _struct_composite.meta.creator_author.split(_rgx.arr_delimiter); + auto authors_raw_arr + = _struct_composite.meta.creator_author.split(_rgx.arr_delimiter); foreach (author_raw; authors_raw_arr) { authors_arr ~= author_raw.replace(_rgx.raw_author_munge, "$2 $1"); } diff --git a/src/doc_reform/meta/conf_make_meta_toml.d b/src/doc_reform/meta/conf_make_meta_toml.d index 1cf935b..46bd6a3 100644 --- a/src/doc_reform/meta/conf_make_meta_toml.d +++ b/src/doc_reform/meta/conf_make_meta_toml.d @@ -36,7 +36,8 @@ static template configParseTOMLreturnDocReformStruct() { ){ TOMLDocument _doc = parseTOML(cast(string)(_document_struct.content)); auto _doc_json = toJSON(_doc); - _make_and_meta_struct = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, _document_struct.filename); // struct from json + _make_and_meta_struct + = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, _document_struct.filename); // struct from json return _make_and_meta_struct; } } @@ -71,7 +72,8 @@ static template docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct() { _doc = parseTOML(cast(string)(header_src)); } auto _doc_json = toJSON(_doc); - auto _header_and_make_and_meta_struct = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, "header"); + auto _header_and_make_and_meta_struct + = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, "header"); return _header_and_make_and_meta_struct; } } diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index cdb1e6b..c3c6147 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -4017,8 +4017,10 @@ template DocReformDocAbstraction() { table_object.has.inline_notes_star = false; table_object.has.inline_links = false; if (auto m = table_head.matchFirst(rgx.table_head_instructions)) { - table_object.table.heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false; - table_object.table.number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete + table_object.table.heading + = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false; + table_object.table.number_of_columns + = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; foreach (cw; m["c_widths"].matchAll(rgx.table_col_widths)) { auto x = cw.hit.matchFirst(rgx.table_col_widths_and_alignment); table_object.table.column_widths ~= x["width"].to!int; @@ -4108,7 +4110,7 @@ template DocReformDocAbstraction() { } if (table_object.table.number_of_columns == 0 && table_object.table.column_widths.length > 0) { - writeln(__LINE__, " ERROR"); + writeln(__LINE__, " ERROR"); } if (table_object.table.number_of_columns > 0 && table_object.table.column_widths.length == 0) { diff --git a/src/doc_reform/output/hub.d b/src/doc_reform/output/hub.d index 5e036dd..e8d0dc4 100644 --- a/src/doc_reform/output/hub.d +++ b/src/doc_reform/output/hub.d @@ -26,11 +26,6 @@ template outputHub() { DocReformPod!()(doc_matters); msg.vv("sisu source done"); } - if (sched == outTask.sqlite) { - msg.v("sqlite processing... "); - SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters, doc_abstraction); - msg.vv("sqlite done"); - } if (sched == outTask.epub) { msg.v("epub3 processing... "); outputEPub3!()(doc_abstraction, doc_matters); @@ -51,6 +46,11 @@ template outputHub() { outputHTML!().images_cp(doc_matters); msg.vv("html css & images done"); } + if (sched == outTask.sqlite) { + msg.v("sqlite processing... "); + SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters, doc_abstraction); + msg.vv("sqlite done"); + } } if (!(doc_matters.opt.action.parallelise_subprocesses)) { foreach(schedule; doc_matters.opt.action.output_task_scheduler) { diff --git a/src/doc_reform/source/paths_source.d b/src/doc_reform/source/paths_source.d index 70e2fc4..a6f3fc1 100644 --- a/src/doc_reform/source/paths_source.d +++ b/src/doc_reform/source/paths_source.d @@ -252,7 +252,7 @@ template PathMatters() { assert(_dir == absolute_path_to_src .match(rgx.src_base_parent_dir_name).captures["dir"]); } - if ((_opt_actions.debug_do)) { + if (_opt_actions.debug_do) { writeln("--> (base_dir) ", _dir); } return _dir; @@ -284,7 +284,7 @@ template PathMatters() { } else { _dir = asNormalizedPath(path_and_fn.chainPath("../../")).array; } - if ((_opt_actions.debug_do)) { + if (_opt_actions.debug_do) { writeln("--> (base_dir_path) ", _dir); } return _dir; @@ -330,7 +330,7 @@ template PathMatters() { } else { _dir = (absolute_path_to_src).match(rgx.src_base_parent_dir_name).captures["dir"]; } - if ((_opt_actions.debug_do)) { + if (_opt_actions.debug_do) { writeln("--> (base_parent_dir) ", _dir); } return _dir; @@ -546,7 +546,7 @@ template DocReformPathsPods() { mixin DocReformRgxInit; static auto rgx = Rgx(); string _suffix = ".zip"; - auto DocReformPathsPods(Dm)(Dm doc_matters) { + auto DocReformPathsPods(M)(M doc_matters) { string _base_dir_pod = (doc_matters.output_path.length > 0) ? doc_matters.output_path ~ "/pod" : "/pod"; |