From 5bd8cbc86ab1236d4e891e0711e9a3623f0c51a7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 3 Apr 2022 18:06:45 -0400 Subject: generated-by header, latex, html, epub - consider, implementation quite messy --- org/spine.org | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'org/spine.org') diff --git a/org/spine.org b/org/spine.org index 94ab675..8604507 100644 --- a/org/spine.org +++ b/org/spine.org @@ -1009,6 +1009,25 @@ OptActions _opt_action = OptActions(); bits, os, ); } + @trusted string name_and_version() { + return format("%s-%s", name, ver); + } + @trusted string name_version_and_compiler() { + return format("%s-%s (%s)", name, ver, compiler); + } + @safe auto time_output_generated() { + auto _st = Clock.currTime(UTC()); + auto _t = TimeOfDay(_st.hour, _st.minute, _st.second); + 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 ~ "]" + ~ " - " ~ _t.toISOExtString + // ~ " " ~ _st.hour.to!string ~ ":" ~ _st.minute.to!string ~ ":" ~ _st.second.to!string + ~ " UTC"; + return _time; + // return _st.toISOExtString(); + } } return ProgramInfo(); } @@ -1408,7 +1427,7 @@ if (doc_matters.opt.action.debug_do) { #+BEGIN_SRC d /+ ↓ output hub +/ if (!(_opt_action.skip_output)) { - outputHubInitialize!()(_opt_action); + outputHubInitialize!()(_opt_action, program_info); } #+END_SRC @@ -1661,10 +1680,10 @@ struct DocumentMatters { return program_info.ver; } @trusted string name_and_version() { - return format("%s-%s", - name, - ver, - ); + return program_info.name_and_version; + } + @trusted string name_version_and_compiler() { + return program_info.name_version_and_compiler; } @safe string url_home() { return "https://sisudoc.org"; @@ -1675,8 +1694,8 @@ struct DocumentMatters { @safe auto compiler() { return program_info.compiler; } - @safe auto stime() { - return Clock.currTime(UTC()).toSimpleString(); + @safe auto time_output_generated() { + return program_info.time_output_generated; } } return Prog_(); -- cgit v1.2.3