From dcbc43ba94c484c7b5741bc9efc88b51e9b04e31 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 Jan 2019 13:28:27 -0500 Subject: doc generator info related --- src/doc_reform/doc_reform.d | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/doc_reform/doc_reform.d') diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d index f1d8d18..53ddbcf 100755 --- a/src/doc_reform/doc_reform.d +++ b/src/doc_reform/doc_reform.d @@ -4,6 +4,7 @@ import doc_reform.conf.compile_time_info, doc_reform.meta.metadoc; import + std.datetime, std.getopt, std.file, std.path, @@ -396,6 +397,21 @@ void main(string[] args) { } } auto _opt_action = OptActions(); + auto program_info() { + struct ProgramInfo { + string name() { + return program_name; + } + auto ver() { + string ver_ = format( + "%s.%s.%s", + _ver.major, _ver.minor, _ver.patch, + ); + return ver_; + } + } + return ProgramInfo(); + } auto _env = [ "pwd" : environment["PWD"], "home" : environment["HOME"], @@ -518,7 +534,7 @@ void main(string[] args) { ) { writeln("--->\nstepX commence → (document abstraction)"); } - auto t = DocReformAbstraction!()(_env, _opt_action, manifest); + auto t = DocReformAbstraction!()(_env, program_info, _opt_action, manifest); static assert(!isTypeTuple!(t)); static assert(t.length==2); auto doc_abstraction = t[dAM.abstraction]; @@ -598,7 +614,7 @@ void main(string[] args) { ) { writeln("--->\nstepX commence → (document abstraction)"); } - auto t = DocReformAbstraction!()(_env, _opt_action, manifest); + auto t = DocReformAbstraction!()(_env, program_info, _opt_action, manifest); static assert(!isTypeTuple!(t)); static assert(t.length==2); auto doc_abstraction = t[dAM.abstraction]; -- cgit v1.2.3