aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--org/out_xmls.org7
-rw-r--r--org/spine.org5
-rw-r--r--src/doc_reform/io_out/xmls.d7
-rwxr-xr-xsrc/doc_reform/spine.d5
4 files changed, 24 insertions, 0 deletions
diff --git a/org/out_xmls.org b/org/out_xmls.org
index 54b40aa..e875330 100644
--- a/org/out_xmls.org
+++ b/org/out_xmls.org
@@ -756,6 +756,9 @@ auto nav_pre_next_svg(O,M)(
M doc_matters,
) {
string prev, next, toc;
+ string harvest_link = (doc_matters.opt.action.harvest_link)
+ ? format(q"┃<p class="tiny">[<a href="../../../topics.html">&nbsp;T&nbsp;</a>|<a href="../../../authors.html">&nbsp;A&nbsp;</a>]</p>┃")
+ : "";
if (obj.tags.segment_anchor_tag_epub == "toc") {
toc = "";
prev = "";
@@ -796,6 +799,7 @@ auto nav_pre_next_svg(O,M)(
);
}
string _toc_pre_next = format(q"┃ <div class="flex-menu-option">
+ %s
<div class="nav-bar">
%s
%s
@@ -804,11 +808,13 @@ auto nav_pre_next_svg(O,M)(
</div>
</div>
</div>┃",
+ harvest_link,
toc,
prev,
next,
);
string _pre_next = format(q"┃ <div class="flex-menu-option">
+ %s
<div class="nav-bar">
%s
%s
@@ -816,6 +822,7 @@ auto nav_pre_next_svg(O,M)(
</div>
</div>
</div>┃",
+ harvest_link,
prev,
next,
);
diff --git a/org/spine.org b/org/spine.org
index 9704dec..87d32b2 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -331,6 +331,7 @@ bool[string] opts = [
"harvest" : false,
"harvest-authors" : false,
"harvest-topics" : false,
+ "harvest-link" : false,
"html" : false,
"html-seg" : false,
"html-scroll" : false,
@@ -394,6 +395,7 @@ auto helpInfo = getopt(args,
"harvest", "--harvest extract info on authors & topics from document header metadata", &opts["harvest"],
"harvest-authors", "--harvest-authors extract info on authors from document header metadata", &opts["harvest-authors"],
"harvest-topics", "--harvest-topics extract info on topics from document header metadata", &opts["harvest-topics"],
+ "harvest-link", "--harvest-link place links back to harvest in segmented html", &opts["harvest-link"],
"html", "--html process html output", &opts["html"],
"html-seg", "--html-seg process html output", &opts["html-seg"],
"html-scroll", "--html-seg process html output", &opts["html-scroll"],
@@ -485,6 +487,9 @@ struct OptActions {
bool epub() {
return opts["epub"];
}
+ bool harvest_link() {
+ return (opts["harvest-link"]) ? true : false;
+ }
bool harvest() {
return (opts["harvest"] || opts["harvest-authors"] || opts["harvest-topics"]) ? true : false;
}
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index a906d89..a88dced 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -599,6 +599,9 @@ template outputXHTMLs() {
M doc_matters,
) {
string prev, next, toc;
+ string harvest_link = (doc_matters.opt.action.harvest_link)
+ ? format(q"┃<p class="tiny">[<a href="../../../topics.html">&nbsp;T&nbsp;</a>|<a href="../../../authors.html">&nbsp;A&nbsp;</a>]</p>┃")
+ : "";
if (obj.tags.segment_anchor_tag_epub == "toc") {
toc = "";
prev = "";
@@ -639,6 +642,7 @@ template outputXHTMLs() {
);
}
string _toc_pre_next = format(q"┃ <div class="flex-menu-option">
+ %s
<div class="nav-bar">
%s
%s
@@ -647,11 +651,13 @@ template outputXHTMLs() {
</div>
</div>
</div>┃",
+ harvest_link,
toc,
prev,
next,
);
string _pre_next = format(q"┃ <div class="flex-menu-option">
+ %s
<div class="nav-bar">
%s
%s
@@ -659,6 +665,7 @@ template outputXHTMLs() {
</div>
</div>
</div>┃",
+ harvest_link,
prev,
next,
);
diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d
index 51e571d..9dae5c4 100755
--- a/src/doc_reform/spine.d
+++ b/src/doc_reform/spine.d
@@ -124,6 +124,7 @@ void main(string[] args) {
"harvest" : false,
"harvest-authors" : false,
"harvest-topics" : false,
+ "harvest-link" : false,
"html" : false,
"html-seg" : false,
"html-scroll" : false,
@@ -187,6 +188,7 @@ void main(string[] args) {
"harvest", "--harvest extract info on authors & topics from document header metadata", &opts["harvest"],
"harvest-authors", "--harvest-authors extract info on authors from document header metadata", &opts["harvest-authors"],
"harvest-topics", "--harvest-topics extract info on topics from document header metadata", &opts["harvest-topics"],
+ "harvest-link", "--harvest-link place links back to harvest in segmented html", &opts["harvest-link"],
"html", "--html process html output", &opts["html"],
"html-seg", "--html-seg process html output", &opts["html-seg"],
"html-scroll", "--html-seg process html output", &opts["html-scroll"],
@@ -271,6 +273,9 @@ void main(string[] args) {
bool epub() {
return opts["epub"];
}
+ bool harvest_link() {
+ return (opts["harvest-link"]) ? true : false;
+ }
bool harvest() {
return (opts["harvest"] || opts["harvest-authors"] || opts["harvest-topics"]) ? true : false;
}