aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta/metadoc.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-01-05 20:17:17 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-02-11 13:08:49 -0500
commitde02319cfa7b4bbff8c111bda02be1a7c6591555 (patch)
tree732c11d10bc2699cd1b72d00b3be943284eea130 /src/doc_reform/meta/metadoc.d
parentreduce use of auto, much with tuples (diff)
dlang safe default imminent, look ahead
- @safe @trusted & @system, reconsider @trusted
Diffstat (limited to 'src/doc_reform/meta/metadoc.d')
-rw-r--r--src/doc_reform/meta/metadoc.d50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d
index 03cb098..e18a19e 100644
--- a/src/doc_reform/meta/metadoc.d
+++ b/src/doc_reform/meta/metadoc.d
@@ -30,7 +30,7 @@ template spineAbstraction() {
enum makeMeta { make, meta }
enum docAbst { doc_abstract_obj, doc_has }
static auto rgx = Rgx();
- auto spineAbstraction(E,P,O,M,S)(
+ @system auto spineAbstraction(E,P,O,M,S)(
E _env,
P program_info,
O _opt_action,
@@ -108,39 +108,39 @@ template spineAbstraction() {
writeln("step4 commence → (doc_matters)");
}
struct DocumentMatters {
- auto generator_program() {
+ @safe auto generator_program() {
struct Prog_ {
- string project_name() {
+ @safe string project_name() {
return "spine";
}
- string name() {
+ @safe string name() {
return program_info.name;
}
- string ver() {
+ @safe string ver() {
return program_info.ver;
}
- string name_and_version() @trusted {
+ @trusted string name_and_version() {
return format("%s-%s",
name,
ver,
);
}
- string url_home() {
+ @safe string url_home() {
return "http://sisudoc.org";
}
- string url_git() {
+ @safe string url_git() {
return "https://git.sisudoc.org/software/sisu";
}
- auto compiler() {
+ @safe auto compiler() {
return program_info.compiler;
}
- auto stime() {
+ @safe auto stime() {
return Clock.currTime(UTC()).toSimpleString();
}
}
return Prog_();
}
- auto generated_time() {
+ @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
@@ -151,26 +151,26 @@ template spineAbstraction() {
~ ":" ~ _st.second.to!string;
return _time;
}
- auto conf_make_meta() {
+ @safe auto conf_make_meta() {
return _make_and_meta_struct;
}
- auto has() {
+ @safe auto has() {
return _doc_has_struct;
}
- auto env() {
+ @safe auto env() {
struct Env_ {
- auto pwd() {
+ @safe auto pwd() {
return _manifest.env.pwd;
}
- auto home() {
+ @safe auto home() {
return _manifest.env.home;
}
}
return Env_();
}
- auto opt() {
+ @safe auto opt() {
struct Opt_ {
- auto action() {
+ @safe auto action() {
/+ getopt options, commandline instructions, raw
- processing instructions --epub --html etc.
- command line config instructions --output-path
@@ -180,27 +180,27 @@ template spineAbstraction() {
}
return Opt_();
}
- auto src() {
+ @safe auto src() {
return _manifest.src;
}
- auto src_path_info() {
+ @safe auto src_path_info() {
return spinePathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path
}
- auto pod() {
+ @safe auto pod() {
return _manifest.pod;
}
- auto sqlite() {
+ @safe auto sqlite() {
struct SQLite_ {
- string filename() {
+ @safe string filename() {
return _opt_action.sqlite_filename;
}
}
return SQLite_();
}
- auto output_path() {
+ @safe auto output_path() {
return _make_and_meta_struct.conf.output_path;
}
- auto srcs() {
+ @safe auto srcs() {
struct SRC_ {
auto file_insert_list() {
return _header_body_insertfilelist_imagelist[headBody.insert_file_list];