aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--org/default_paths.org9
-rw-r--r--org/doc_reform.org13
-rw-r--r--org/meta_abstraction.org17
-rw-r--r--org/meta_conf_make_meta.org50
-rw-r--r--org/output_harvest_metadata.org68
-rwxr-xr-xsrc/doc_reform/doc_reform.d13
-rw-r--r--src/doc_reform/meta/conf_make_meta_json.d15
-rw-r--r--src/doc_reform/meta/conf_make_meta_yaml.d35
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d17
-rw-r--r--src/doc_reform/meta/metadoc_harvests_authors.d36
-rw-r--r--src/doc_reform/meta/metadoc_harvests_topics.d64
-rw-r--r--src/doc_reform/source/paths_source.d9
-rw-r--r--subprojects/archived.wrap4
-rw-r--r--subprojects/toml-d.wrap4
14 files changed, 249 insertions, 105 deletions
diff --git a/org/default_paths.org b/org/default_paths.org
index e50881f..459d8b9 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -75,6 +75,9 @@ template PodManifest() {
}
return _manifest_path;
}
+ string pods_collection_root_path() {
+ return (pod_manifest_path.length > 0) ? ((chainPath(pod_manifest_path, "..")).asNormalizedPath).array.to!string : "";
+ }
string pod_manifest_file_with_path() {
string _k;
if (exists(pod_manifest_path.chainPath(pod_manifest_filename).array)!=0) {
@@ -141,7 +144,6 @@ template PathMatters() {
return Env_();
}
auto opt() {
- auto _opt_actions = _opt_actions;
struct Opt_ {
auto action() {
return _opt_actions;
@@ -157,9 +159,8 @@ template PathMatters() {
bool src_is_pod() {
return (_manifested.pod_manifest_path.length > 0) ? true : false;
}
- auto collection_root() {
- auto _collection_root = ((chainPath(_manifested.pod_manifest_path, "..")).asNormalizedPath).array;
- return _collection_root;
+ string collection_root() {
+ return _manifested.pods_collection_root_path;
}
string manifest_filename() {
return _manifested.pod_manifest_filename;
diff --git a/org/doc_reform.org b/org/doc_reform.org
index f367dea..5b44538 100644
--- a/org/doc_reform.org
+++ b/org/doc_reform.org
@@ -377,8 +377,8 @@ bool[string] opts = [
"workon" : false,
];
string[string] settings = [
- "output-dir" : "",
- "site-config-dir" : "",
+ "config" : "",
+ "output" : "",
"lang" : "all",
"sqlite-filename" : "documents",
];
@@ -439,8 +439,8 @@ auto helpInfo = getopt(args,
"theme-dark", "--theme-dark alternative dark theme", &opts["theme-dark"],
"theme-light", "--theme-light default light theme", &opts["theme-light"],
"workon", "--workon (reserved for some matters under development & testing)", &opts["workon"],
- "output-dir", "--output-dir=[dir path]", &settings["output-dir"],
- "site-config-dir", "--site-config-dir=[dir path]", &settings["site-config-dir"],
+ "config", "--config=/path/to/config/file/including/filename", &settings["config"],
+ "output", "--output=/path/to/output/dir specify where to place output", &settings["output"],
"sqlite-filename", "--sqlite-filename=[filename].sqlite", &settings["sqlite-filename"],
"lang", "--lang=[lang code e.g. =en or =en,es]", &settings["lang"],
);
@@ -462,6 +462,9 @@ struct OptActions {
bool concordance() {
return opts["concordance"];
}
+ auto config_path_set() {
+ return settings["config"];
+ }
bool css_theme_default() {
bool _is_light;
if (opts["light"] || opts["theme-light"]) {
@@ -612,7 +615,7 @@ struct OptActions {
return settings["lang"].split(",");
}
auto output_dir_set() {
- return settings["output-dir"];
+ return settings["output"];
}
auto sqlite_filename() {
return settings["sqlite-filename"];
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org
index bff74a4..5da3795 100644
--- a/org/meta_abstraction.org
+++ b/org/meta_abstraction.org
@@ -4862,11 +4862,18 @@ string[string] flow_heading_matched_(CMM)(
assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels
switch (an_object["lev"]) {
case "A": // Title set
- an_object[an_object_key]=(an_object[an_object_key])
- .replaceFirst(rgx.variable_doc_title,
- (conf_make_meta.meta.title_full ~ ","))
- .replaceFirst(rgx.variable_doc_author,
- conf_make_meta.meta.creator_author);
+ if (an_object[an_object_key].match(rgx.variable_doc_title)
+ && an_object[an_object_key].match(rgx.variable_doc_author)) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title,
+ (conf_make_meta.meta.title_full ~ ", "))
+ .replaceFirst(rgx.variable_doc_author,
+ conf_make_meta.meta.creator_author);
+ } else if (an_object[an_object_key].match(rgx.variable_doc_title)) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title,
+ conf_make_meta.meta.title_full);
+ }
collapsed_lev["h0"] = 0;
an_object["lev_collapsed_number"]
= collapsed_lev["h0"].to!string;
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index b6f1c7d..07befe1 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -816,16 +816,21 @@ if (_struct_composite.meta.creator_author.empty) {
= _struct_composite.meta.creator_author.split(rgx.arr_delimiter);
auto _lastname = appender!(char[])();
foreach (author_raw; authors_raw_arr) {
- author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
- authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
- authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["as_input"] ~= author_raw;
if (auto m = author_raw.match(rgx.raw_author_munge)) {
+ author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
+ authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
+ authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
+ authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
(m.captures[1]).map!toUpper.copy(_lastname);
authors_hash_arr["last_first"] ~= _lastname.data.to!string ~ ", " ~ m.captures[2];
_lastname = appender!(char[])();
+ } else {
+ author_arr ~= author_raw;
+ authors_hash_arr["last"] ~= author_raw;
+ authors_hash_arr["full"] ~= author_raw;
+ authors_hash_arr["last_first"] ~= author_raw;
}
+ authors_hash_arr["as_input"] ~= author_raw;
}
_struct_composite.meta.creator_author_arr = author_arr;
_struct_composite.meta.creator_author = author_arr.join(", ").chomp.chomp;
@@ -1555,16 +1560,21 @@ if (_struct_composite.meta.creator_author.empty) {
= _struct_composite.meta.creator_author.split(rgx.arr_delimiter);
auto _lastname = appender!(char[])();
foreach (author_raw; authors_raw_arr) {
- author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
- authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
- authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["as_input"] ~= author_raw;
if (auto m = author_raw.match(rgx.raw_author_munge)) {
+ author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
+ authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
+ authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
+ authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
(m.captures[1]).map!toUpper.copy(_lastname);
authors_hash_arr["last_first"] ~= _lastname.data.to!string ~ ", " ~ m.captures[2];
_lastname = appender!(char[])();
+ } {
+ author_arr ~= author_raw;
+ authors_hash_arr["last"] ~= author_raw;
+ authors_hash_arr["full"] ~= author_raw;
+ authors_hash_arr["last_first"] ~= author_raw;
}
+ authors_hash_arr["as_input"] ~= author_raw;
}
_struct_composite.meta.creator_author_arr = author_arr;
_struct_composite.meta.creator_author = author_arr.join(", ").chomp.chomp;
@@ -1810,9 +1820,15 @@ static template configParseYAMLreturnDocReformStruct() {
CCm _make_and_meta_struct,
M _manifested
){
- Node yaml_root = Loader.fromString(_document_struct.content).load();
- _make_and_meta_struct
- = contentYAMLtoDocReformStruct!()(_make_and_meta_struct, yaml_root, _manifested, _document_struct.filename); // struct from yaml
+ Node yaml_root;
+ try {
+ yaml_root = Loader.fromString(_document_struct.content).load();
+ _make_and_meta_struct
+ = contentYAMLtoDocReformStruct!()(_make_and_meta_struct, yaml_root, _manifested, _document_struct.filename); // struct from yaml
+ } catch {
+ import std.stdio;
+ writeln("ERROR failed to read content, not parsed as yaml");
+ }
return _make_and_meta_struct;
}
}
@@ -1846,8 +1862,12 @@ static template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {
) {
Node _yaml_root;
if (header_src.match(rgx.yaml_header_meta_title)) {
- import dyaml;
- _yaml_root = Loader.fromString(header_src).load();
+ try {
+ _yaml_root = Loader.fromString(header_src).load();
+ } catch {
+ import std.stdio;
+ writeln("ERROR failed to read document header, not parsed as yaml");
+ }
}
auto _header_and_make_and_meta_struct
= contentYAMLtoDocReformStruct!()(_make_and_meta_struct, _yaml_root, _manifested, "header");
diff --git a/org/output_harvest_metadata.org b/org/output_harvest_metadata.org
index a25ab61..a7ce40f 100644
--- a/org/output_harvest_metadata.org
+++ b/org/output_harvest_metadata.org
@@ -252,8 +252,8 @@ foreach(k0;
_prev_k = k0.toUpper.to!(char[])[0];
}
if (k0 != "_a") {
- topics ~= format(q"┃<p class="lev0"><a name="%s">%s</a></p>┃",
- k0, k0,) ~ "\n";
+ topics ~= format(q"┃<p class="lev0"><a name="%s" class="lev0">%s</a></p>┃",
+ k0.translate([' ' : "_"]), k0,) ~ "\n";
if (_opt_action.very_verbose) {
writeln("", k0);
}
@@ -265,13 +265,13 @@ foreach(k0;
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃ <a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -291,8 +291,8 @@ foreach(k0;
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)
) {
if (k1 != "_a") {
- topics ~= format(q"┃<p class="lev1"><a name="%s">%s</a></p>┃",
- k1, k1,) ~ "\n";
+ topics ~= format(q"┃<p class="lev1"><a name="%s" class="lev1">%s</a></p>┃",
+ k1.translate([' ' : "_"]), k1,) ~ "\n";
if (_opt_action.very_verbose) {
writeln(" ", k1);
}
@@ -304,13 +304,13 @@ foreach(k0;
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃ <a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -331,8 +331,8 @@ foreach(k0;
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)
) {
if (k2 != "_a") {
- topics ~= format(q"┃<p class="lev2"><a name="%s">%s</a></p>┃",
- k2, k2,) ~ "\n";
+ topics ~= format(q"┃<p class="lev2"><a name="%s" class="lev2">%s</a></p>┃",
+ k2.translate([' ' : "_"]), k2,) ~ "\n";
if (_opt_action.very_verbose) {
writeln(" ", k2);
}
@@ -344,13 +344,13 @@ foreach(k0;
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃ <a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -371,8 +371,8 @@ foreach(k0;
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)
) {
if (k3 != "_a") {
- topics ~= format(q"┃<p class="lev3"><a name="%s">%s</a></p>┃",
- k3, k3,) ~ "\n";
+ topics ~= format(q"┃<p class="lev3"><a name="%s" class="lev3">%s</a></p>┃",
+ k3.translate([' ' : "_"]), k3,) ~ "\n";
if (_opt_action.very_verbose) {
writeln(" ", k3);
}
@@ -384,13 +384,13 @@ foreach(k0;
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃<a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -521,8 +521,8 @@ template DocReformMetaDocHarvestsAuthors() {
) {
if (doc_harvest.author_surname_fn != _prev_auth) {
_au[doc_harvest.author_surname_fn]
- = format(q"┃<p class="author"><a name="%s">%s</a></p> <p class="publication">%s "<a href="%s">%s</a>" [%s]</p>┃",
- doc_harvest.author_surname,
+ = format(q"┃<p class="author"><a name="%s" class="lev0">%s</a></p> <p class="publication">%s "<a href="%s">%s</a>" [%s]</p>┃",
+ doc_harvest.author_surname.translate([' ' : "_"]),
doc_harvest.author_surname_fn,
(doc_harvest.date_published.length > 0)
? doc_harvest.date_published : "",
@@ -616,6 +616,22 @@ string theme_dark_0 = format(q"┃
color : #888888;
text-decoration : underline;
}
+ a.lev0:hover {
+ color : #FFFFFF;
+ background-color : #000000;
+ }
+ a.lev1:hover {
+ color : #FFFFFF;
+ background : #333333;
+ }
+ a.lev2:hover {
+ color : #FFFFFF;
+ background : #555555;
+ }
+ a.lev3:hover {
+ color : #FFFFFF;
+ background : #777777;
+ }
┃");
string theme_light_0 = format(q"┃
body {
@@ -642,6 +658,20 @@ string theme_light_0 = format(q"┃
color : #003399;
text-decoration : underline;
}
+ a.lev0:hover {
+ color : #000000;
+ background-color : #FFFFFF;
+ }
+ a.lev1:hover {
+ color : #FFFFFF;
+ background : #444444;
+ }
+ a.lev2:hover {
+ background : #888888;
+ }
+ a.lev3:hover {
+ background : #BBBBBB;
+ }
┃");
#+END_SRC
@@ -718,7 +748,7 @@ string theme_light_1 = format(q"┃
<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
<meta name="generator" content="doc_reform" />
<link rel="generator" href="http://sisudoc.org" />
-<link href="../../_sisu/css/harvest.css" rel="stylesheet">
+<link href="./css/harvest.css" rel="stylesheet">
<style TYPE="text/css">
/* DocReform harvest css default stylesheet */%s
.norm, .bold {
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d
index 708c96a..369c91b 100755
--- a/src/doc_reform/doc_reform.d
+++ b/src/doc_reform/doc_reform.d
@@ -170,8 +170,8 @@ void main(string[] args) {
"workon" : false,
];
string[string] settings = [
- "output-dir" : "",
- "site-config-dir" : "",
+ "config" : "",
+ "output" : "",
"lang" : "all",
"sqlite-filename" : "documents",
];
@@ -232,8 +232,8 @@ void main(string[] args) {
"theme-dark", "--theme-dark alternative dark theme", &opts["theme-dark"],
"theme-light", "--theme-light default light theme", &opts["theme-light"],
"workon", "--workon (reserved for some matters under development & testing)", &opts["workon"],
- "output-dir", "--output-dir=[dir path]", &settings["output-dir"],
- "site-config-dir", "--site-config-dir=[dir path]", &settings["site-config-dir"],
+ "config", "--config=/path/to/config/file/including/filename", &settings["config"],
+ "output", "--output=/path/to/output/dir specify where to place output", &settings["output"],
"sqlite-filename", "--sqlite-filename=[filename].sqlite", &settings["sqlite-filename"],
"lang", "--lang=[lang code e.g. =en or =en,es]", &settings["lang"],
);
@@ -248,6 +248,9 @@ void main(string[] args) {
bool concordance() {
return opts["concordance"];
}
+ auto config_path_set() {
+ return settings["config"];
+ }
bool css_theme_default() {
bool _is_light;
if (opts["light"] || opts["theme-light"]) {
@@ -398,7 +401,7 @@ void main(string[] args) {
return settings["lang"].split(",");
}
auto output_dir_set() {
- return settings["output-dir"];
+ return settings["output"];
}
auto sqlite_filename() {
return settings["sqlite-filename"];
diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d
index 0a3c4c2..3d69a3c 100644
--- a/src/doc_reform/meta/conf_make_meta_json.d
+++ b/src/doc_reform/meta/conf_make_meta_json.d
@@ -393,16 +393,21 @@ static template contentJSONtoDocReformStruct() {
= _struct_composite.meta.creator_author.split(rgx.arr_delimiter);
auto _lastname = appender!(char[])();
foreach (author_raw; authors_raw_arr) {
- author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
- authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
- authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["as_input"] ~= author_raw;
if (auto m = author_raw.match(rgx.raw_author_munge)) {
+ author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
+ authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
+ authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
+ authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
(m.captures[1]).map!toUpper.copy(_lastname);
authors_hash_arr["last_first"] ~= _lastname.data.to!string ~ ", " ~ m.captures[2];
_lastname = appender!(char[])();
+ } {
+ author_arr ~= author_raw;
+ authors_hash_arr["last"] ~= author_raw;
+ authors_hash_arr["full"] ~= author_raw;
+ authors_hash_arr["last_first"] ~= author_raw;
}
+ authors_hash_arr["as_input"] ~= author_raw;
}
_struct_composite.meta.creator_author_arr = author_arr;
_struct_composite.meta.creator_author = author_arr.join(", ").chomp.chomp;
diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d
index 8b76a3e..a9c4434 100644
--- a/src/doc_reform/meta/conf_make_meta_yaml.d
+++ b/src/doc_reform/meta/conf_make_meta_yaml.d
@@ -451,16 +451,21 @@ static template contentYAMLtoDocReformStruct() {
= _struct_composite.meta.creator_author.split(rgx.arr_delimiter);
auto _lastname = appender!(char[])();
foreach (author_raw; authors_raw_arr) {
- author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
- authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
- authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- authors_hash_arr["as_input"] ~= author_raw;
if (auto m = author_raw.match(rgx.raw_author_munge)) {
+ author_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
+ authors_hash_arr["first"] ~= author_raw.replace(rgx.raw_author_munge, "$2");
+ authors_hash_arr["last"] ~= author_raw.replace(rgx.raw_author_munge, "$1");
+ authors_hash_arr["full"] ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
(m.captures[1]).map!toUpper.copy(_lastname);
authors_hash_arr["last_first"] ~= _lastname.data.to!string ~ ", " ~ m.captures[2];
_lastname = appender!(char[])();
+ } else {
+ author_arr ~= author_raw;
+ authors_hash_arr["last"] ~= author_raw;
+ authors_hash_arr["full"] ~= author_raw;
+ authors_hash_arr["last_first"] ~= author_raw;
}
+ authors_hash_arr["as_input"] ~= author_raw;
}
_struct_composite.meta.creator_author_arr = author_arr;
_struct_composite.meta.creator_author = author_arr.join(", ").chomp.chomp;
@@ -781,9 +786,15 @@ static template configParseYAMLreturnDocReformStruct() {
CCm _make_and_meta_struct,
M _manifested
){
- Node yaml_root = Loader.fromString(_document_struct.content).load();
- _make_and_meta_struct
- = contentYAMLtoDocReformStruct!()(_make_and_meta_struct, yaml_root, _manifested, _document_struct.filename); // struct from yaml
+ Node yaml_root;
+ try {
+ yaml_root = Loader.fromString(_document_struct.content).load();
+ _make_and_meta_struct
+ = contentYAMLtoDocReformStruct!()(_make_and_meta_struct, yaml_root, _manifested, _document_struct.filename); // struct from yaml
+ } catch {
+ import std.stdio;
+ writeln("ERROR failed to read content, not parsed as yaml");
+ }
return _make_and_meta_struct;
}
}
@@ -812,8 +823,12 @@ static template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {
) {
Node _yaml_root;
if (header_src.match(rgx.yaml_header_meta_title)) {
- import dyaml;
- _yaml_root = Loader.fromString(header_src).load();
+ try {
+ _yaml_root = Loader.fromString(header_src).load();
+ } catch {
+ import std.stdio;
+ writeln("ERROR failed to read document header, not parsed as yaml");
+ }
}
auto _header_and_make_and_meta_struct
= contentYAMLtoDocReformStruct!()(_make_and_meta_struct, _yaml_root, _manifested, "header");
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index f5e0b81..4eb7771 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -3855,11 +3855,18 @@ template DocReformDocAbstraction() {
assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels
switch (an_object["lev"]) {
case "A": // Title set
- an_object[an_object_key]=(an_object[an_object_key])
- .replaceFirst(rgx.variable_doc_title,
- (conf_make_meta.meta.title_full ~ ","))
- .replaceFirst(rgx.variable_doc_author,
- conf_make_meta.meta.creator_author);
+ if (an_object[an_object_key].match(rgx.variable_doc_title)
+ && an_object[an_object_key].match(rgx.variable_doc_author)) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title,
+ (conf_make_meta.meta.title_full ~ ", "))
+ .replaceFirst(rgx.variable_doc_author,
+ conf_make_meta.meta.creator_author);
+ } else if (an_object[an_object_key].match(rgx.variable_doc_title)) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title,
+ conf_make_meta.meta.title_full);
+ }
collapsed_lev["h0"] = 0;
an_object["lev_collapsed_number"]
= collapsed_lev["h0"].to!string;
diff --git a/src/doc_reform/meta/metadoc_harvests_authors.d b/src/doc_reform/meta/metadoc_harvests_authors.d
index 1645d9b..29fcc72 100644
--- a/src/doc_reform/meta/metadoc_harvests_authors.d
+++ b/src/doc_reform/meta/metadoc_harvests_authors.d
@@ -44,6 +44,22 @@ string theme_dark_0 = format(q"┃
color : #888888;
text-decoration : underline;
}
+ a.lev0:hover {
+ color : #FFFFFF;
+ background-color : #000000;
+ }
+ a.lev1:hover {
+ color : #FFFFFF;
+ background : #333333;
+ }
+ a.lev2:hover {
+ color : #FFFFFF;
+ background : #555555;
+ }
+ a.lev3:hover {
+ color : #FFFFFF;
+ background : #777777;
+ }
┃");
string theme_light_0 = format(q"┃
body {
@@ -70,6 +86,20 @@ string theme_light_0 = format(q"┃
color : #003399;
text-decoration : underline;
}
+ a.lev0:hover {
+ color : #000000;
+ background-color : #FFFFFF;
+ }
+ a.lev1:hover {
+ color : #FFFFFF;
+ background : #444444;
+ }
+ a.lev2:hover {
+ background : #888888;
+ }
+ a.lev3:hover {
+ background : #BBBBBB;
+ }
┃");
string theme_dark_1 = format(q"┃
h1 {
@@ -141,7 +171,7 @@ string theme_light_1 = format(q"┃
<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
<meta name="generator" content="doc_reform" />
<link rel="generator" href="http://sisudoc.org" />
-<link href="../../_sisu/css/harvest.css" rel="stylesheet">
+<link href="./css/harvest.css" rel="stylesheet">
<style TYPE="text/css">
/* DocReform harvest css default stylesheet */%s
.norm, .bold {
@@ -265,8 +295,8 @@ string theme_light_1 = format(q"┃
) {
if (doc_harvest.author_surname_fn != _prev_auth) {
_au[doc_harvest.author_surname_fn]
- = format(q"┃<p class="author"><a name="%s">%s</a></p> <p class="publication">%s "<a href="%s">%s</a>" [%s]</p>┃",
- doc_harvest.author_surname,
+ = format(q"┃<p class="author"><a name="%s" class="lev0">%s</a></p> <p class="publication">%s "<a href="%s">%s</a>" [%s]</p>┃",
+ doc_harvest.author_surname.translate([' ' : "_"]),
doc_harvest.author_surname_fn,
(doc_harvest.date_published.length > 0)
? doc_harvest.date_published : "",
diff --git a/src/doc_reform/meta/metadoc_harvests_topics.d b/src/doc_reform/meta/metadoc_harvests_topics.d
index 9f73552..63e4a79 100644
--- a/src/doc_reform/meta/metadoc_harvests_topics.d
+++ b/src/doc_reform/meta/metadoc_harvests_topics.d
@@ -87,6 +87,22 @@ string theme_dark_0 = format(q"┃
color : #888888;
text-decoration : underline;
}
+ a.lev0:hover {
+ color : #FFFFFF;
+ background-color : #000000;
+ }
+ a.lev1:hover {
+ color : #FFFFFF;
+ background : #333333;
+ }
+ a.lev2:hover {
+ color : #FFFFFF;
+ background : #555555;
+ }
+ a.lev3:hover {
+ color : #FFFFFF;
+ background : #777777;
+ }
┃");
string theme_light_0 = format(q"┃
body {
@@ -113,6 +129,20 @@ string theme_light_0 = format(q"┃
color : #003399;
text-decoration : underline;
}
+ a.lev0:hover {
+ color : #000000;
+ background-color : #FFFFFF;
+ }
+ a.lev1:hover {
+ color : #FFFFFF;
+ background : #444444;
+ }
+ a.lev2:hover {
+ background : #888888;
+ }
+ a.lev3:hover {
+ background : #BBBBBB;
+ }
┃");
string theme_dark_1 = format(q"┃
h1 {
@@ -182,7 +212,7 @@ string theme_light_1 = format(q"┃
<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
<meta name="generator" content="doc_reform" />
<link rel="generator" href="http://sisudoc.org" />
-<link href="../../_sisu/css/harvest.css" rel="stylesheet">
+<link href="./css/harvest.css" rel="stylesheet">
<style TYPE="text/css">
/* DocReform harvest css default stylesheet */%s
.norm, .bold {
@@ -304,8 +334,8 @@ string theme_light_1 = format(q"┃
_prev_k = k0.toUpper.to!(char[])[0];
}
if (k0 != "_a") {
- topics ~= format(q"┃<p class="lev0"><a name="%s">%s</a></p>┃",
- k0, k0,) ~ "\n";
+ topics ~= format(q"┃<p class="lev0"><a name="%s" class="lev0">%s</a></p>┃",
+ k0.translate([' ' : "_"]), k0,) ~ "\n";
if (_opt_action.very_verbose) {
writeln("", k0);
}
@@ -317,13 +347,13 @@ string theme_light_1 = format(q"┃
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃ <a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -343,8 +373,8 @@ string theme_light_1 = format(q"┃
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)
) {
if (k1 != "_a") {
- topics ~= format(q"┃<p class="lev1"><a name="%s">%s</a></p>┃",
- k1, k1,) ~ "\n";
+ topics ~= format(q"┃<p class="lev1"><a name="%s" class="lev1">%s</a></p>┃",
+ k1.translate([' ' : "_"]), k1,) ~ "\n";
if (_opt_action.very_verbose) {
writeln(" ", k1);
}
@@ -356,13 +386,13 @@ string theme_light_1 = format(q"┃
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃ <a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -383,8 +413,8 @@ string theme_light_1 = format(q"┃
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)
) {
if (k2 != "_a") {
- topics ~= format(q"┃<p class="lev2"><a name="%s">%s</a></p>┃",
- k2, k2,) ~ "\n";
+ topics ~= format(q"┃<p class="lev2"><a name="%s" class="lev2">%s</a></p>┃",
+ k2.translate([' ' : "_"]), k2,) ~ "\n";
if (_opt_action.very_verbose) {
writeln(" ", k2);
}
@@ -396,13 +426,13 @@ string theme_light_1 = format(q"┃
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃ <a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
@@ -423,8 +453,8 @@ string theme_light_1 = format(q"┃
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)
) {
if (k3 != "_a") {
- topics ~= format(q"┃<p class="lev3"><a name="%s">%s</a></p>┃",
- k3, k3,) ~ "\n";
+ topics ~= format(q"┃<p class="lev3"><a name="%s" class="lev3">%s</a></p>┃",
+ k3.translate([' ' : "_"]), k3,) ~ "\n";
if (_opt_action.very_verbose) {
writeln(" ", k3);
}
@@ -436,13 +466,13 @@ string theme_light_1 = format(q"┃
_auth = [];
if (t_a_.author_arr.length < 2) {
_auth = format(q"┃<a href="authors.html#%s">%s</a>┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
t_a_.author,
);
} else {
foreach (a; t_a_.author_arr) {
_auth ~= format(q"┃ <a href="authors.html#%s">%s</a>,┃",
- t_a_.author_surname,
+ t_a_.author_surname.translate([' ' : "_"]),
a,
);
}
diff --git a/src/doc_reform/source/paths_source.d b/src/doc_reform/source/paths_source.d
index 838f114..f291fb5 100644
--- a/src/doc_reform/source/paths_source.d
+++ b/src/doc_reform/source/paths_source.d
@@ -43,6 +43,9 @@ template PodManifest() {
}
return _manifest_path;
}
+ string pods_collection_root_path() {
+ return (pod_manifest_path.length > 0) ? ((chainPath(pod_manifest_path, "..")).asNormalizedPath).array.to!string : "";
+ }
string pod_manifest_file_with_path() {
string _k;
if (exists(pod_manifest_path.chainPath(pod_manifest_filename).array)!=0) {
@@ -87,7 +90,6 @@ template PathMatters() {
return Env_();
}
auto opt() {
- auto _opt_actions = _opt_actions;
struct Opt_ {
auto action() {
return _opt_actions;
@@ -103,9 +105,8 @@ template PathMatters() {
bool src_is_pod() {
return (_manifested.pod_manifest_path.length > 0) ? true : false;
}
- auto collection_root() {
- auto _collection_root = ((chainPath(_manifested.pod_manifest_path, "..")).asNormalizedPath).array;
- return _collection_root;
+ string collection_root() {
+ return _manifested.pods_collection_root_path;
}
string manifest_filename() {
return _manifested.pod_manifest_filename;
diff --git a/subprojects/archived.wrap b/subprojects/archived.wrap
deleted file mode 100644
index 0cb238c..0000000
--- a/subprojects/archived.wrap
+++ /dev/null
@@ -1,4 +0,0 @@
-[wrap-git]
-directory = archived
-url = https://github.com/ximion/archive.git
-revision = head
diff --git a/subprojects/toml-d.wrap b/subprojects/toml-d.wrap
deleted file mode 100644
index 70f7adc..0000000
--- a/subprojects/toml-d.wrap
+++ /dev/null
@@ -1,4 +0,0 @@
-[wrap-git]
-directory = toml-d
-url = https://github.com/ximion/toml.git
-revision = head