diff options
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r-- | src/doc_reform/meta/metadoc.d | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index 4cb218e..a57159d 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -1,6 +1,7 @@ module doc_reform.meta.metadoc; template DocReformAbstraction() { import + std.datetime, std.getopt, std.file, std.path, @@ -28,8 +29,9 @@ template DocReformAbstraction() { enum makeMeta { make, meta } enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, tag_assoc, images } static auto rgx = Rgx(); - auto DocReformAbstraction(E,O,M)( + auto DocReformAbstraction(E,P,O,M)( E _env, + P program_info, O _opt_action, M _manifest ){ @@ -112,6 +114,41 @@ template DocReformAbstraction() { writeln("step4 commence → (doc_matters)"); } struct DocumentMatters { + auto generator_program() { + struct Prog_ { + auto name() { + return program_info.name; + } + auto ver() { + return program_info.ver; + } + auto name_and_version() { + return format( + "%s-%s", + program_info.name, + program_info.ver, + ); + } + auto url_home() { + return "http://sisudoc.org"; + } + auto url_git() { + return "https://git.sisudoc.org/software/sisu"; + } + } + return Prog_(); + } + 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; + } auto conf_make_meta() { // TODO meld with all make instructions return _make_and_meta_struct; } |