aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/conf_make_meta_yaml.d101
-rw-r--r--src/doc_reform/meta/metadoc.d254
2 files changed, 127 insertions, 228 deletions
diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d
index ef40a09..de218ee 100644
--- a/src/doc_reform/meta/conf_make_meta_yaml.d
+++ b/src/doc_reform/meta/conf_make_meta_yaml.d
@@ -786,7 +786,6 @@ template contentYAMLtoSpineStruct() {
_struct_composite.make.substitute = _mk.substitute(_struct_composite.make_str.substitute);
_struct_composite.make.texpdf_font = _mk.texpdf_font(_struct_composite.make_str.texpdf_font);
}
-
/+ meta ------------------------------------------------------------------- +/
if (_struct_composite.meta.creator_author.empty) {
if ("creator" in _yaml
@@ -1162,56 +1161,6 @@ template contentYAMLtoSpineStruct() {
return _struct_composite;
}
}
-/+
-- Name: Spine, Doc Reform [a part of]
- - Description: documents, structuring, processing, publishing, search
- - static content generator
-
- - Author: Ralph Amissah
- [ralph.amissah@gmail.com]
-
- - Copyright: (C) 2015 - 2021 Ralph Amissah, All Rights
- Reserved.
-
- - License: AGPL 3 or later:
-
- Spine (SiSU), a framework for document structuring, publishing and
- search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU AFERO General Public License as published by the
- Free Software Foundation, either version 3 of the License, or (at your
- option) any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see [https://www.gnu.org/licenses/].
-
- If you have Internet connection, the latest version of the AGPL should be
- available at these locations:
- [https://www.fsf.org/licensing/licenses/agpl.html]
- [https://www.gnu.org/licenses/agpl.html]
-
- - Spine (by Doc Reform, related to SiSU) uses standard:
- - docReform markup syntax
- - standard SiSU markup syntax with modified headers and minor modifications
- - docReform object numbering
- - standard SiSU object citation numbering & system
-
- - Homepages:
- [https://www.doc_reform.org]
- [https://www.sisudoc.org]
-
- - Git
- [https://git.sisudoc.org/projects/?p=software/spine.git;a=summary]
-
-+/
template configParseYAMLreturnSpineStruct() {
import dyaml;
import
@@ -1245,56 +1194,6 @@ template configParseYAMLreturnSpineStruct() {
return _make_and_meta_struct;
}
}
-/+
-- Name: Spine, Doc Reform [a part of]
- - Description: documents, structuring, processing, publishing, search
- - static content generator
-
- - Author: Ralph Amissah
- [ralph.amissah@gmail.com]
-
- - Copyright: (C) 2015 - 2021 Ralph Amissah, All Rights
- Reserved.
-
- - License: AGPL 3 or later:
-
- Spine (SiSU), a framework for document structuring, publishing and
- search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU AFERO General Public License as published by the
- Free Software Foundation, either version 3 of the License, or (at your
- option) any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see [https://www.gnu.org/licenses/].
-
- If you have Internet connection, the latest version of the AGPL should be
- available at these locations:
- [https://www.fsf.org/licensing/licenses/agpl.html]
- [https://www.gnu.org/licenses/agpl.html]
-
- - Spine (by Doc Reform, related to SiSU) uses standard:
- - docReform markup syntax
- - standard SiSU markup syntax with modified headers and minor modifications
- - docReform object numbering
- - standard SiSU object citation numbering & system
-
- - Homepages:
- [https://www.doc_reform.org]
- [https://www.sisudoc.org]
-
- - Git
- [https://git.sisudoc.org/projects/?p=software/spine.git;a=summary]
-
-+/
template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {
import
std.exception,
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d
index 3d04236..d8b252e 100644
--- a/src/doc_reform/meta/metadoc.d
+++ b/src/doc_reform/meta/metadoc.d
@@ -101,143 +101,143 @@ template spineAbstraction() {
writeln("step4 commence → (doc_matters)");
}
struct DocumentMatters {
- @safe auto generator_program() {
- struct Prog_ {
- @safe string project_name() {
- return "spine";
- }
- @safe string name() {
- return program_info.name;
- }
- @safe string ver() {
- return program_info.ver;
- }
- @trusted string name_and_version() {
- return format("%s-%s",
- name,
- ver,
- );
- }
- @safe string url_home() {
- return "https://sisudoc.org";
- }
- @safe string url_git() {
- return "https://git.sisudoc.org/software/sisu";
- }
- @safe auto compiler() {
- return program_info.compiler;
- }
- @safe auto stime() {
- return Clock.currTime(UTC()).toSimpleString();
+ @safe auto generator_program() {
+ struct Prog_ {
+ @safe string project_name() {
+ return "spine";
+ }
+ @safe string name() {
+ return program_info.name;
+ }
+ @safe string ver() {
+ return program_info.ver;
+ }
+ @trusted string name_and_version() {
+ return format("%s-%s",
+ name,
+ ver,
+ );
+ }
+ @safe string url_home() {
+ return "https://sisudoc.org";
+ }
+ @safe string url_git() {
+ return "https://git.sisudoc.org/software/sisu";
+ }
+ @safe auto compiler() {
+ return program_info.compiler;
+ }
+ @safe auto stime() {
+ return Clock.currTime(UTC()).toSimpleString();
+ }
}
+ return Prog_();
}
- return Prog_();
- }
- @safe auto generated_time() {
- auto _st = Clock.currTime(UTC());
- auto _time = _st.year.to!string
- ~ "-" ~ _st.month.to!int.to!string // prefer as month number
- ~ "-" ~ _st.day.to!string
- ~ " [" ~ _st.isoWeek.to!string ~ "/" ~ _st.dayOfWeek.to!int.to!string ~ "]"
- ~ " " ~ _st.hour.to!string
- ~ ":" ~ _st.minute.to!string
- ~ ":" ~ _st.second.to!string;
- return _time;
- }
- @safe auto conf_make_meta() {
- return _make_and_meta_struct;
- }
- @safe auto has() {
- return _doc_has_struct;
- }
- @safe auto env() {
- struct Env_ {
- @safe auto pwd() {
- return _manifest.env.pwd;
- }
- @safe auto home() {
- return _manifest.env.home;
- }
+ @safe auto generated_time() {
+ auto _st = Clock.currTime(UTC());
+ auto _time = _st.year.to!string
+ ~ "-" ~ _st.month.to!int.to!string // prefer as month number
+ ~ "-" ~ _st.day.to!string
+ ~ " [" ~ _st.isoWeek.to!string ~ "/" ~ _st.dayOfWeek.to!int.to!string ~ "]"
+ ~ " " ~ _st.hour.to!string
+ ~ ":" ~ _st.minute.to!string
+ ~ ":" ~ _st.second.to!string;
+ return _time;
}
- return Env_();
- }
- @safe auto opt() {
- struct Opt_ {
- @safe auto action() {
- /+ getopt options, commandline instructions, raw
- - processing instructions --epub --html etc.
- - command line config instructions --output
- +/
- return _opt_action;
- }
+ @safe auto conf_make_meta() {
+ return _make_and_meta_struct;
}
- return Opt_();
- }
- @safe auto src() {
- return _manifest.src;
- }
- @safe auto src_path_info() {
- return spinePathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path
- }
- @safe auto pod() {
- return _manifest.pod;
- }
- @safe auto sqlite() {
- struct SQLite_ {
- @safe string filename() {
- string _fn = "";
- string _pth = "";
- if (_opt_action.sqliteDB_filename.length > 0) {
- _fn = _opt_action.sqliteDB_filename;
- } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_filename.length > 0) {
- _fn = _make_and_meta_struct.conf.w_srv_db_sqlite_filename;
- }
- return _fn;
- }
- @safe string path() {
- string _pth = "";
- if (_opt_action.sqliteDB_path.length > 0) {
- _pth = _opt_action.sqliteDB_path;
- } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_path.length > 0) {
- _pth = _make_and_meta_struct.conf.w_srv_db_sqlite_path;
- }
- return _pth;
- }
- @safe string cgi_filename() {
- string _fn = "";
- if (_opt_action.cgi_sqlite_search_filename.length > 0) {
- _fn = _opt_action.cgi_sqlite_search_filename;
- } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script.length > 0) {
- _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script;
- }
- return _fn;
+ @safe auto has() {
+ return _doc_has_struct;
+ }
+ @safe auto env() {
+ struct Env_ {
+ @safe auto pwd() {
+ return _manifest.env.pwd;
+ }
+ @safe auto home() {
+ return _manifest.env.home;
+ }
}
- @safe string cgi_filename_d() {
- string _fn = "";
- if (_opt_action.cgi_sqlite_search_filename_d.length > 0) {
- _fn = _opt_action.cgi_sqlite_search_filename_d;
- } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d.length > 0) {
- _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d;
- }
- return _fn;
+ return Env_();
+ }
+ @safe auto opt() {
+ struct Opt_ {
+ @safe auto action() {
+ /+ getopt options, commandline instructions, raw
+ - processing instructions --epub --html etc.
+ - command line config instructions --output
+ +/
+ return _opt_action;
+ }
}
+ return Opt_();
}
- return SQLite_();
- }
- @safe auto output_path() {
- return _make_and_meta_struct.conf.output_path;
- }
- @safe auto srcs() {
- struct SRC_ {
- auto file_insert_list() {
- return _header_body_insertfilelist_imagelist[headBody.insert_file_list];
+ @safe auto src() {
+ return _manifest.src;
+ }
+ @safe auto src_path_info() {
+ return spinePathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path
+ }
+ @safe auto pod() {
+ return _manifest.pod;
+ }
+ @safe auto sqlite() {
+ struct SQLite_ {
+ @safe string filename() {
+ string _fn = "";
+ string _pth = "";
+ if (_opt_action.sqliteDB_filename.length > 0) {
+ _fn = _opt_action.sqliteDB_filename;
+ } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_filename.length > 0) {
+ _fn = _make_and_meta_struct.conf.w_srv_db_sqlite_filename;
+ }
+ return _fn;
+ }
+ @safe string path() {
+ string _pth = "";
+ if (_opt_action.sqliteDB_path.length > 0) {
+ _pth = _opt_action.sqliteDB_path;
+ } else if (_make_and_meta_struct.conf.w_srv_db_sqlite_path.length > 0) {
+ _pth = _make_and_meta_struct.conf.w_srv_db_sqlite_path;
+ }
+ return _pth;
+ }
+ @safe string cgi_filename() {
+ string _fn = "";
+ if (_opt_action.cgi_sqlite_search_filename.length > 0) {
+ _fn = _opt_action.cgi_sqlite_search_filename;
+ } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script.length > 0) {
+ _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script;
+ }
+ return _fn;
+ }
+ @safe string cgi_filename_d() {
+ string _fn = "";
+ if (_opt_action.cgi_sqlite_search_filename_d.length > 0) {
+ _fn = _opt_action.cgi_sqlite_search_filename_d;
+ } else if (_make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d.length > 0) {
+ _fn = _make_and_meta_struct.conf.w_srv_cgi_search_script_raw_fn_d;
+ }
+ return _fn;
+ }
}
- auto image_list() {
- return _doc_has_struct.imagelist;
+ return SQLite_();
+ }
+ @safe auto output_path() {
+ return _make_and_meta_struct.conf.output_path;
+ }
+ @safe auto srcs() {
+ struct SRC_ {
+ auto file_insert_list() {
+ return _header_body_insertfilelist_imagelist[headBody.insert_file_list];
+ }
+ auto image_list() {
+ return _doc_has_struct.imagelist;
+ }
}
+ return SRC_();
}
- return SRC_();
- }
}
auto doc_matters = DocumentMatters();
if ((_opt_action.debug_do)