aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta/metadoc.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-01-01 13:28:27 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2019-05-17 16:59:38 -0400
commitdcbc43ba94c484c7b5741bc9efc88b51e9b04e31 (patch)
treec827619e5393ec9f5d62ae0152f5cbf2e3b9eb80 /src/doc_reform/meta/metadoc.d
parentcode block, number(ed), regex for keyword instruction, not implemented (diff)
doc generator info related
Diffstat (limited to 'src/doc_reform/meta/metadoc.d')
-rw-r--r--src/doc_reform/meta/metadoc.d39
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;
}