aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-07-20 10:19:50 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-10-17 19:07:20 -0400
commit7f549e075bc5ee5e6c3bacfd94a18c01de91980a (patch)
tree506a4a012e261e5a4c1cf1ca56ba1cbcedaaba59
parent0.8.0 name change in code use dr (doc reform) instead of sisu (diff)
processing info
-rw-r--r--org/doc_reform.org35
-rw-r--r--org/output_latex.org13
-rwxr-xr-xsrc/doc_reform/doc_reform.d12
-rw-r--r--src/doc_reform/meta/metadoc.d23
-rw-r--r--src/doc_reform/output/latex.d13
5 files changed, 72 insertions, 24 deletions
diff --git a/org/doc_reform.org b/org/doc_reform.org
index a38fd26..7d8fee3 100644
--- a/org/doc_reform.org
+++ b/org/doc_reform.org
@@ -78,6 +78,7 @@ import std.algorithm;
import std.parallelism;
<<mixin_doc_reform_version>>
<<mixin_pre_main>>
+string project_name = "DocReform";
string program_name = "doc-reform";
/++
name "doc_reform"
@@ -752,6 +753,9 @@ auto _opt_action = OptActions();
#+BEGIN_SRC d
auto program_info() {
struct ProgramInfo {
+ string project() {
+ return project_name;
+ }
string name() {
return program_name;
}
@@ -762,6 +766,14 @@ auto program_info() {
);
return ver_;
}
+ string compiler() {
+ string ver_ = format(
+ "%s D:%s, %s %s",
+ __VENDOR__, __VERSION__,
+ bits, os,
+ );
+ return ver_;
+ }
}
return ProgramInfo();
}
@@ -1203,25 +1215,34 @@ struct DocumentMatters {
#+BEGIN_SRC d
auto generator_program() {
struct Prog_ {
- auto name() {
+ string project_name() {
+ return program_info.project;
+ }
+ string name() {
return program_info.name;
}
- auto ver() {
+ string ver() {
return program_info.ver;
}
- auto name_and_version() {
+ string name_and_version() {
return format(
"%s-%s",
- program_info.name,
- program_info.ver,
+ name,
+ ver,
);
}
- auto url_home() {
+ string url_home() {
return "http://sisudoc.org";
}
- auto url_git() {
+ string url_git() {
return "https://git.sisudoc.org/software/sisu";
}
+ auto compiler() {
+ return program_info.compiler;
+ }
+ auto stime() {
+ return Clock.currTime(UTC()).toSimpleString();
+ }
}
return Prog_();
}
diff --git a/org/output_latex.org b/org/output_latex.org
index eb50c46..2224bf8 100644
--- a/org/output_latex.org
+++ b/org/output_latex.org
@@ -970,7 +970,6 @@ string latex_head(M)(
#+name: output_latex_head
#+BEGIN_SRC d
string _footer(M)(M doc_matters) {
- writeln("footer: ", doc_matters.conf_make_meta.make.footer);
string _ft = "\\lfoot[\\textrm{\\thepage}]";
string _ft_1 = format(q"┃{\tiny \href{%s}{%s}}┃", "http://sisudoc.org", "SiSU",);
string _ft_2 = format(q"┃
@@ -1233,10 +1232,10 @@ string latex_head(M)(
#+name: output_latex_head_0_tex
#+BEGIN_SRC latex
%%%% Generated by: %s
-%%%% D version: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux-gnu]
-%%%% LaTeX output
-%%%% Last Generated on:
-%%%% SiSU http://www.jus.uio.no/sisu
+%%%% D version: %s
+%%%% LaTeX output last Generated on: %s
+%%%% %s %s
+
#+END_SRC
***** paper type (a4, letter, ...; ( portrait | landscape ))
@@ -1528,6 +1527,10 @@ string latex_head(M)(
#+BEGIN_SRC d
┃",
doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.name_and_version.strip,
+ doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.compiler.strip,
+ doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.stime.strip,
+ doc_matters.generator_program.project_name.strip,
+ doc_matters.generator_program.url_home.strip,
paper.a4_portrait.strip,
margins.portrait.strip,
multicol.portrait.strip,
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d
index 6ca50ea..2378785 100755
--- a/src/doc_reform/doc_reform.d
+++ b/src/doc_reform/doc_reform.d
@@ -81,6 +81,7 @@ import std.algorithm;
import std.parallelism;
mixin(import("version.txt"));
mixin CompileTimeInfo;
+string project_name = "DocReform";
string program_name = "doc-reform";
/++
name "doc_reform"
@@ -531,6 +532,9 @@ void main(string[] args) {
auto _opt_action = OptActions();
auto program_info() {
struct ProgramInfo {
+ string project() {
+ return project_name;
+ }
string name() {
return program_name;
}
@@ -541,6 +545,14 @@ void main(string[] args) {
);
return ver_;
}
+ string compiler() {
+ string ver_ = format(
+ "%s D:%s, %s %s",
+ __VENDOR__, __VERSION__,
+ bits, os,
+ );
+ return ver_;
+ }
}
return ProgramInfo();
}
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d
index 20dc7ec..c597963 100644
--- a/src/doc_reform/meta/metadoc.d
+++ b/src/doc_reform/meta/metadoc.d
@@ -116,25 +116,34 @@ template DocReformAbstraction() {
struct DocumentMatters {
auto generator_program() {
struct Prog_ {
- auto name() {
+ string project_name() {
+ return program_info.project;
+ }
+ string name() {
return program_info.name;
}
- auto ver() {
+ string ver() {
return program_info.ver;
}
- auto name_and_version() {
+ string name_and_version() {
return format(
"%s-%s",
- program_info.name,
- program_info.ver,
+ name,
+ ver,
);
}
- auto url_home() {
+ string url_home() {
return "http://sisudoc.org";
}
- auto url_git() {
+ string url_git() {
return "https://git.sisudoc.org/software/sisu";
}
+ auto compiler() {
+ return program_info.compiler;
+ }
+ auto stime() {
+ return Clock.currTime(UTC()).toSimpleString();
+ }
}
return Prog_();
}
diff --git a/src/doc_reform/output/latex.d b/src/doc_reform/output/latex.d
index 674d6d3..0444d5b 100644
--- a/src/doc_reform/output/latex.d
+++ b/src/doc_reform/output/latex.d
@@ -689,7 +689,6 @@ string table(O,M)(
}
auto paper = paperType();
string _footer(M)(M doc_matters) {
- writeln("footer: ", doc_matters.conf_make_meta.make.footer);
string _ft = "\\lfoot[\\textrm{\\thepage}]";
string _ft_1 = format(q"┃{\tiny \href{%s}{%s}}┃", "http://sisudoc.org", "SiSU",);
string _ft_2 = format(q"┃
@@ -787,10 +786,10 @@ string table(O,M)(
);
string _latex_head = format(q"┃%%%% DocReform LaTeX output
%%%% Generated by: %s
-%%%% D version: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux-gnu]
-%%%% LaTeX output
-%%%% Last Generated on:
-%%%% SiSU http://www.jus.uio.no/sisu
+%%%% D version: %s
+%%%% LaTeX output last Generated on: %s
+%%%% %s %s
+
%s
%s
\setlength{\marginparsep}{4mm}
@@ -962,6 +961,10 @@ string table(O,M)(
}
┃",
doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.name_and_version.strip,
+ doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.compiler.strip,
+ doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.stime.strip,
+ doc_matters.generator_program.project_name.strip,
+ doc_matters.generator_program.url_home.strip,
paper.a4_portrait.strip,
margins.portrait.strip,
multicol.portrait.strip,