diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2024-03-12 22:39:09 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2024-03-12 22:56:34 -0400 |
commit | e9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 (patch) | |
tree | 1ed3c4b528b0a8e54d0eb9babc391e562578c7b4 /src/doc_reform/meta/metadoc.d | |
parent | nix flake & env upkeep (diff) |
mark modules as @safe: (& identify what is not)
Diffstat (limited to 'src/doc_reform/meta/metadoc.d')
-rw-r--r-- | src/doc_reform/meta/metadoc.d | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index 75e0b29..cc0726f 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -48,6 +48,7 @@ +/ module doc_reform.meta.metadoc; +@safe: template spineAbstraction() { import std.datetime; @@ -145,15 +146,15 @@ template spineAbstraction() { writeln("step4 commence → (doc_matters) [", _manifest.src.filename, "]"); } struct DocumentMatters { - @safe auto generator_program() { + auto generator_program() { struct Prog_ { - @safe string project_name() { + string project_name() { return "spine"; } - @safe string name() { + string name() { return program_info.name; } - @safe string ver() { + string ver() { return program_info.ver; } @trusted string name_and_version() { @@ -162,22 +163,22 @@ template spineAbstraction() { @trusted string name_version_and_compiler() { return program_info.name_version_and_compiler; } - @safe string url_home() { + string url_home() { return "https://sisudoc.org"; } - @safe string url_git() { + string url_git() { return "https://git.sisudoc.org/projects/"; } - @safe auto compiler() { + auto compiler() { return program_info.compiler; } - @safe auto time_output_generated() { + auto time_output_generated() { return program_info.time_output_generated; } } return Prog_(); } - @safe auto generated_time() { + auto generated_time() { auto _st = Clock.currTime(UTC()); auto _time = _st.year.to!string ~ "-" ~ _st.month.to!int.to!string // prefer as month number @@ -188,26 +189,26 @@ template spineAbstraction() { ~ ":" ~ _st.second.to!string; return _time; } - @safe auto conf_make_meta() { + auto conf_make_meta() { return _make_and_meta_struct; } - @safe auto has() { + auto has() { return _doc_has_struct; } - @safe auto env() { + auto env() { struct Env_ { - @safe auto pwd() { + auto pwd() { return _manifest.env.pwd; } - @safe auto home() { + auto home() { return _manifest.env.home; } } return Env_(); } - @safe auto opt() { + auto opt() { struct Opt_ { - @safe auto action() { + auto action() { /+ getopt options, commandline instructions, raw - processing instructions --epub --html etc. - command line config instructions --output @@ -217,18 +218,18 @@ template spineAbstraction() { } return Opt_(); } - @safe auto src() { + auto src() { return _manifest.src; } - @safe auto src_path_info() { + 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() { + auto pod() { return _manifest.pod; } - @safe auto sqlite() { + auto sqlite() { struct SQLite_ { - @safe string filename() { + string filename() { string _fn = ""; string _pth = ""; if (_opt_action.sqliteDB_filename.length > 0) { @@ -238,7 +239,7 @@ template spineAbstraction() { } return _fn; } - @safe string path() { + string path() { string _pth = ""; if (_opt_action.sqliteDB_path.length > 0) { _pth = _opt_action.sqliteDB_path; @@ -247,7 +248,7 @@ template spineAbstraction() { } return _pth; } - @safe string cgi_filename() { + string cgi_filename() { string _fn = ""; if (_opt_action.cgi_sqlite_search_filename.length > 0) { _fn = _opt_action.cgi_sqlite_search_filename; @@ -256,7 +257,7 @@ template spineAbstraction() { } return _fn; } - @safe string cgi_filename_d() { + string cgi_filename_d() { string _fn = ""; if (_opt_action.cgi_sqlite_search_filename_d.length > 0) { _fn = _opt_action.cgi_sqlite_search_filename_d; @@ -268,10 +269,10 @@ template spineAbstraction() { } return SQLite_(); } - @safe auto output_path() { + auto output_path() { return _make_and_meta_struct.conf.output_path; } - @safe auto srcs() { + auto srcs() { struct SRC_ { auto file_insert_list() { return _header_body_insertfilelist_imagelist[headBody.insert_file_list]; |