aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_metadata.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-06-26 16:30:25 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-06-27 17:12:48 -0400
commit61180130e90b43f057369878d2d53605f41f8374 (patch)
tree96a5d8a33b69818b43c7d47d191cf17a4d797be5 /org/out_metadata.org
parentreplace some instances of dir listing, index.html (diff)
html links and metadata, fixes & cosmetic work
Diffstat (limited to 'org/out_metadata.org')
-rw-r--r--org/out_metadata.org52
1 files changed, 34 insertions, 18 deletions
diff --git a/org/out_metadata.org b/org/out_metadata.org
index 84c374c..5990f16 100644
--- a/org/out_metadata.org
+++ b/org/out_metadata.org
@@ -59,13 +59,15 @@ string[] metadata_;
#+NAME: output_metadata
#+BEGIN_SRC d
static auto mkup = InlineMarkup();
+import doc_reform.io_out.html_snippet;
+mixin htmlSnippet;
if (doc_matters.opt.action.debug_do) {
writeln(doc_matters.src.filename_base);
writeln("Title: ", doc_matters.conf_make_meta.meta.title_full);
writeln(" Author: ", doc_matters.conf_make_meta.meta.creator_author);
writeln(" Published: ", doc_matters.conf_make_meta.meta.date_published);
writeln(" Copyright: ", doc_matters.conf_make_meta.meta.rights_copyright);
- writeln(" License: ", doc_matters.conf_make_meta.meta.rights_license);
+ writeln(" License: ", special_characters_text(doc_matters.conf_make_meta.meta.rights_license));
if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) {
foreach (topic; doc_matters.conf_make_meta.meta.classify_topic_register_arr.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)) {
string[] subject_tree = topic.split(mkup.sep);
@@ -120,44 +122,52 @@ if (!(doc_matters.conf_make_meta.meta.creator_author.empty)) {
}
metadata_ ~= "<p class=\"lev1\">Published: " ~ doc_matters.conf_make_meta.meta.date_published ~ "</p>";
if (!(doc_matters.conf_make_meta.meta.rights_copyright.empty)) {
- metadata_ ~= "<p class=\"lev1\">Copyright: " ~ doc_matters.conf_make_meta.meta.rights_copyright ~ "</p>";
+ metadata_ ~= "<p class=\"lev1\">Copyright: " ~ special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright) ~ "</p>";
} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) {
writeln("WARNING no Copyright information provided in document header ", doc_matters.src.filename_base);
}
if (!(doc_matters.conf_make_meta.meta.rights_license.empty)) {
- metadata_ ~= "<p class=\"lev1\">License: " ~ doc_matters.conf_make_meta.meta.rights_license ~ "</p>";
+ metadata_ ~= "<p class=\"lev1\">License: " ~ special_characters_text(doc_matters.conf_make_meta.meta.rights_license) ~ "</p>";
} else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) {
writeln("WARNING no License information provided in document header ", doc_matters.src.filename_base);
}
if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) {
- metadata_ ~= "<hr /><p class=\"lev0\">Summary:</p><p class=\"lev1\">" ~ doc_matters.conf_make_meta.meta.notes_summary ~ "</p>";
+ metadata_ ~= "<hr /><p class=\"lev0\">Summary:</p><p class=\"lev1\">" ~ special_characters_text(doc_matters.conf_make_meta.meta.notes_summary) ~ "</p>";
} else if (doc_matters.opt.action.debug_do) {
writeln("WARNING no summary of text provided in document header ", doc_matters.src.filename_base);
}
metadata_ ~= "<hr /><p class=\"lev1\">source: " ~ doc_matters.src.filename_base ~ "</p>";
if (doc_matters.opt.action.html_link_markup_source) {
- metadata_ ~= "<p class=\"lev1\">● markup source: [<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".zip\">"
- ~ "&nbsp;zipped&nbsp;pod&nbsp;</a>] "
- ~ "[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\">"
- ~ "&nbsp;pod&nbsp;tree&nbsp;</a>]";
+ metadata_ ~= "<p class=\"lev1\">●&nbsp;&nbsp;markup source:&nbsp;&nbsp;the&nbsppod&nbsp[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".zip\">"
+ ~ "&nbsp;🫛&nbsp;zipped&nbsp;</a>|&nbsp;"
+ ~ "<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\">"
+ ~ "&nbsp;🫛&nbsp;tree&nbsp;</a>]&nbsp;";
}
-metadata_ ~= "<p class=\"lev1\">● outputs: [<a href=\"" ~ doc_matters.src.filename_base ~ ".html\">"
- ~ "&nbsp;▤&nbsp;html&nbsp;scroll&nbsp;</a>] "
- ~ "[<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
- ~ "&nbsp;※&nbsp;html&nbsp;seg&nbsp;</a>]"
+metadata_ ~= "<p class=\"lev1\">●&nbsp;&nbsp;outputs:&nbsp;&nbsp;[&nbsp;html:&nbsp;<a href=\"" ~ doc_matters.src.filename_base ~ ".html\">"
+ ~ "&nbsp;▤&nbsp;scroll&nbsp;</a>&nbsp;"
+ ~ "|<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
+ ~ "&nbsp;※&nbsp;seg&nbsp;</a>]&nbsp;&nbsp;&nbsp;"
~ "[<a href=\"../../" ~ pth_epub.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".epub\">"
- ~ "&nbsp;◆&nbsp;epub&nbsp;</a>]";
+ ~ "&nbsp;◆&nbsp;epub&nbsp;</a>]&nbsp;&nbsp;&nbsp;";
if ((doc_matters.opt.action.html_link_pdf) || (doc_matters.opt.action.html_link_pdf_a4)) {
+ metadata_ ~= "[&nbsp;pdf:&nbsp;<a href=\"../../pdf/"
+ ~ doc_matters.src.filename_base
+ ~ "." ~ doc_matters.src.language ~ ".a4.portrait.pdf\">"
+ ~ "&nbsp;□&nbsp;a4&nbsp;</a>&nbsp"
+ ~ "|<a href=\"../../pdf/"
+ ~ doc_matters.src.filename_base
+ ~ "." ~ doc_matters.src.language ~ ".letter.portrait.pdf\">"
+ ~ "&nbsp;□&nbsp;U.S.&nbsp;letter&nbsp;</a>]&nbsp";
+} else if (doc_matters.opt.action.html_link_pdf_a4) {
metadata_ ~= "[<a href=\"../../pdf/"
~ doc_matters.src.filename_base
~ "." ~ doc_matters.src.language ~ ".a4.portrait.pdf\">"
- ~ "&nbsp;□&nbsp;pdf&nbsp;(a4)&nbsp;</a>]";
-}
-if ((doc_matters.opt.action.html_link_pdf) || (doc_matters.opt.action.html_link_pdf_letter)) {
+ ~ "&nbsp;□&nbsp;pdf&nbsp;(a4)&nbsp;</a>]&nbsp";
+} else if (doc_matters.opt.action.html_link_pdf_letter) {
metadata_ ~= "[<a href=\"../../pdf/"
~ doc_matters.src.filename_base
~ "." ~ doc_matters.src.language ~ ".letter.portrait.pdf\">"
- ~ "&nbsp;□&nbsp;pdf&nbsp;(U.S.&nbsp;letter)&nbsp;</a>]";
+ ~ "&nbsp;□&nbsp;pdf&nbsp;(U.S.&nbsp;letter)&nbsp;</a>]&nbsp";
}
metadata_ ~= "</p>";
if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) {
@@ -277,8 +287,14 @@ metadata_write_output(doc_matters, metadata_);
}
}
if (!exists(pth_html.base ~ "/index.html")) {
+ import doc_reform.io_out.html_snippet;
+ mixin htmlSnippet;
auto f = File(pth_html.base ~"/index.html", "w");
- f.writeln("");
+ f.writeln(format_html_blank_page_guide_home(
+ "../../css/html_scroll.css",
+ "https://sisudoc.org",
+ "../../index.html",
+ ));
}
} catch (ErrnoException ex) {
// Handle error