diff options
Diffstat (limited to 'src/doc_reform')
-rwxr-xr-x | src/doc_reform/doc_reform.d | 112 |
1 files changed, 44 insertions, 68 deletions
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d index b59743c..fc93a6c 100755 --- a/src/doc_reform/doc_reform.d +++ b/src/doc_reform/doc_reform.d @@ -73,10 +73,11 @@ void main(string[] args) { "light" : false, "manifest" : false, "ocn" : true, - "parallelise" : true, - "parallelise-subprocesses" : false, + "parallel" : false, + "parallel-subprocesses" : false, "quiet" : false, "pod" : false, + "serial" : false, "source" : false, "sqlite-discrete" : false, "sqlite-db-create" : false, @@ -87,7 +88,7 @@ void main(string[] args) { "sqlite-update" : false, "text" : false, "verbose" : false, - "very-verbose" : false, + "very-verbose" : false, "xhtml" : false, "section_toc" : true, "section_body" : true, @@ -123,10 +124,11 @@ void main(string[] args) { "light", "--light default light theme", &opts["light"], "manifest", "--manifest process manifest output", &opts["manifest"], "ocn", "--ocn object cite numbers (default)", &opts["ocn"], - "parallelise", "--parallelise parallelisation", &opts["parallelise"], - "parallelise-subprocesses", "--parallelise-subprocesses nested parallelisation", &opts["parallelise-subprocesses"], + "parallel", "--parallel parallelisation", &opts["parallel"], + "parallel-subprocesses", "--parallel-subprocesses nested parallelisation", &opts["parallel-subprocesses"], "quiet", "--quiet output to terminal", &opts["quiet"], "pod", "--pod doc reform pod source content bundled", &opts["pod"], + "serial", "--serial serial processing", &opts["serial"], "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"], @@ -189,41 +191,27 @@ void main(string[] args) { return opts["epub"]; } auto html() { - bool _is = ( - opts["html"] - || opts["html-seg"] - || opts["html-scroll"] - ) - ? true - : false; + bool _is; + if ( opts["html"] || opts["html-seg"] || opts["html-scroll"]) + { _is = true; } else { _is = false; } return _is; } auto html_seg() { - bool _is = ( - opts["html"] - || opts["html-seg"] - ) - ? true - : false; + bool _is; + if ( opts["html"] || opts["html-seg"]) + { _is = true; } else { _is = false; } return _is; } auto html_scroll() { - bool _is = ( - opts["html"] - || opts["html-scroll"] - ) - ? true - : false; + bool _is; + if ( opts["html"] || opts["html-scroll"]) + { _is = true; } else { _is = false; } return _is; } auto html_stuff() { - bool _is = ( - opts["html"] - || opts["html-scroll"] - || opts["html-seg"] - ) - ? true - : false; + bool _is; + if (opts["html"] || opts["html-scroll"] || opts["html-seg"]) + { _is = true; } else { _is = false; } return _is; } auto manifest() { @@ -245,57 +233,43 @@ void main(string[] args) { return opts["sqlite-discrete"]; } auto sqlite_db_drop() { - bool _is = ( - opts["sqlite-db-recreate"] - || opts["sqlite-db-drop"] - ) - ? true - : false; + bool _is; + if ( opts["sqlite-db-recreate"] || opts["sqlite-db-drop"]) + { _is = true; } else { _is = false; } return _is; } auto sqlite_db_create() { - bool _is = ( - opts["sqlite-db-recreate"] - || opts["sqlite-db-create"] - ) - ? true - : false; + bool _is; + if ( opts["sqlite-db-recreate"] || opts["sqlite-db-create"]) + { _is = true; } else { _is = false; } return _is; } auto sqlite_delete() { return opts["sqlite-delete"]; } auto sqlite_update() { - bool _is = ( - opts["sqlite-update"] - || opts["sqlite-insert"] - ) - ? true - : false; + bool _is; + if (opts["sqlite-update"] || opts["sqlite-insert"]) + { _is = true; } else { _is = false; } return _is; } auto sqlite_shared_db_action() { - bool _is = ( - opts["sqlite-db-recreate"] + bool _is; + if (opts["sqlite-db-recreate"] || opts["sqlite-db-create"] || opts["sqlite-delete"] || opts["sqlite-insert"] || opts["sqlite-update"] - ) - ? true - : false; + ) { _is = true; } else { _is = false; } return _is; } auto text() { return opts["text"]; } auto verbose() { - bool _is = ( - opts["verbose"] - || opts["very-verbose"] - ) - ? true - : false; + bool _is; + if (opts["verbose"] || opts["very-verbose"]) + { _is = true; } else { _is = false; } return _is; } auto very_verbose() { @@ -344,12 +318,16 @@ void main(string[] args) { return settings["sqlite-filename"]; } auto parallelise() { - bool _is = ( opts["parallelise"]) ? true : false; - _is = ( sqlite_shared_db_action ) ? false : true; + bool _is; + if (opts["parallel"] == true + || (opts["parallel"] != false && opts["serial"] == false)) { + _is = true; + if (sqlite_shared_db_action) { _is = false; } + } else { _is = false; } return _is; } auto parallelise_subprocesses() { - return opts["parallelise-subprocesses"]; + return opts["parallel-subprocesses"]; } auto output_task_scheduler() { int[] schedule; @@ -377,8 +355,8 @@ void main(string[] args) { return schedule.sort().uniq; } auto abstraction() { - bool _is = ( - opts["abstraction"] + bool _is; + if (opts["abstraction"] || concordance || epub || html @@ -388,9 +366,7 @@ void main(string[] args) { || sqlite_discrete || sqlite_delete || sqlite_update - ) - ? true - : false; + ) { _is = true; } else { _is = false; } return _is; } } |