diff options
Diffstat (limited to 'src/sisudoc/io_out/metadata.d')
-rw-r--r-- | src/sisudoc/io_out/metadata.d | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/sisudoc/io_out/metadata.d b/src/sisudoc/io_out/metadata.d index 4d540af..a89b31a 100644 --- a/src/sisudoc/io_out/metadata.d +++ b/src/sisudoc/io_out/metadata.d @@ -109,11 +109,10 @@ template outputMetadata() { } return o; } - import - std.digest.crc, - std.digest.sha, - std.file, - std.format; + import std.digest.crc; + import std.digest.sha; + import std.file; + import std.format; import sisudoc.io_out; mixin InternalMarkup; char[] metadata_; @@ -393,7 +392,7 @@ string theme_light_1 = format(q"┃ } catch (ErrnoException ex) { // Handle error } - if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_html.fn_scroll("metadata." ~ doc_matters.src.filename)); } + if (doc_matters.opt.action.vox_gt_1) { writeln(" ", pth_html.fn_scroll("metadata." ~ doc_matters.src.filename)); } } static auto mkup = InlineMarkup(); import sisudoc.io_out.html_snippet; @@ -418,6 +417,7 @@ string theme_light_1 = format(q"┃ } auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); auto pth_epub = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); + auto pth_text = spinePathsText!()(doc_matters); auto pth_pdf = spinePathsPDF!()(doc_matters); auto pth_pod = spinePathsPods!()(doc_matters); metadata_ ~= format(q"┃<body lang="en" xml:lang="en"> @@ -443,7 +443,7 @@ string theme_light_1 = format(q"┃ metadata_ ~= "</div>" ~ inline_search_form(doc_matters) ~ "</div><hr />"; if (!(doc_matters.conf_make_meta.meta.title_full.empty)) { metadata_ ~= "<p class=\"lev0\">Title: <b><a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">" ~ doc_matters.conf_make_meta.meta.title_full ~ "</a></b></p>"; - } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt_3) { writeln("ERROR no Title information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.creator_author.empty)) { @@ -454,18 +454,18 @@ string theme_light_1 = format(q"┃ metadata_ ~= "<p class=\"lev1\">Author: <b>" ~ doc_matters.conf_make_meta.meta.creator_author ~ "</b></p>"; } - } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt_3) { writeln("ERROR no Author information provided in document header ", doc_matters.src.filename_base); } 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: " ~ 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) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt_3) { 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: " ~ 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) { + } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt_3) { writeln("WARNING no License information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) { @@ -499,6 +499,10 @@ string theme_light_1 = format(q"┃ ~ "." ~ doc_matters.src.language ~ ".letter.portrait.pdf\" class=\"lnkicon\">" ~ " □ pdf (U.S. letter) </a>] "; } + if (doc_matters.opt.action.html_link_text) { + metadata_ ~= " [<a href=\"../" ~ "text/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".txt\" class=\"lnkicon\">" + ~ " □ txt </a>] "; + } metadata_ ~= "</p>"; if (doc_matters.opt.action.html_link_markup_source) { metadata_ ~= "<hr /><p class=\"lev1\">source: " ~ doc_matters.src.filename_base ~ "</p>"; |