aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-10-13 13:33:08 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-11-27 19:51:22 -0500
commit0ff37b772594b21a26b4b878a5ddbc6f1e0d1e67 (patch)
tree86de7f449aab13cee6be7dbff314a024c1aeb499 /org/spine.org
parentconfiguration, hierarchy filenames & paths ... (diff)
org files, tangle output, some fixes
Diffstat (limited to 'org/spine.org')
-rw-r--r--org/spine.org256
1 files changed, 128 insertions, 128 deletions
diff --git a/org/spine.org b/org/spine.org
index fa246b9..61ed8cc 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -1351,11 +1351,11 @@ template spineAbstraction() {
<<spine_each_file_do_document_abstraction>>
<<spine_each_file_do_document_matters_msg_step4_start>>
<<spine_each_file_do_document_matters_0_struct_open>>
- <<spine_each_file_do_document_matters_1_detail_program_time>>
- <<spine_each_file_do_document_matters_2_meta>>
- <<spine_each_file_do_document_matters_3_env>>
- <<spine_each_file_do_document_matters_4_opt>>
- <<spine_each_file_do_document_matters_5_doc>>
+ <<spine_each_file_do_document_matters_1_detail_program_time>>
+ <<spine_each_file_do_document_matters_2_meta>>
+ <<spine_each_file_do_document_matters_3_env>>
+ <<spine_each_file_do_document_matters_4_opt>>
+ <<spine_each_file_do_document_matters_5_doc>>
<<spine_each_file_do_document_matters_6_struct_close_gather>>
<<spine_each_file_do_document_matters_msg_step4_end>>
auto t = tuple(doc_abstraction, doc_matters);
@@ -1518,167 +1518,167 @@ struct DocumentMatters {
#+NAME: spine_each_file_do_document_matters_1_detail_program_time
#+BEGIN_SRC d
- @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_();
- }
- @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 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;
+}
#+END_SRC
**** config make & meta
#+NAME: spine_each_file_do_document_matters_2_meta
#+BEGIN_SRC d
- @safe auto conf_make_meta() {
- return _make_and_meta_struct;
- }
- @safe auto has() {
- return _doc_has_struct;
- }
+@safe auto conf_make_meta() {
+ return _make_and_meta_struct;
+}
+@safe auto has() {
+ return _doc_has_struct;
+}
#+END_SRC
**** env related
#+NAME: spine_each_file_do_document_matters_3_env
#+BEGIN_SRC d
- @safe auto env() {
- struct Env_ {
- @safe auto pwd() {
- return _manifest.env.pwd;
- }
- @safe auto home() {
- return _manifest.env.home;
- }
+@safe auto env() {
+ struct Env_ {
+ @safe auto pwd() {
+ return _manifest.env.pwd;
+ }
+ @safe auto home() {
+ return _manifest.env.home;
}
- return Env_();
}
+ return Env_();
+}
#+END_SRC
**** opt
#+NAME: spine_each_file_do_document_matters_4_opt
#+BEGIN_SRC d
- @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 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 Opt_();
+}
#+END_SRC
**** output related
#+NAME: spine_each_file_do_document_matters_5_doc
#+BEGIN_SRC d
- @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 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;
}
- @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;
+ 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;
}
- @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;
+ 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;
}
- @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 _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;
}
- 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 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_();
+}
#+END_SRC
**** } close