aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_xmls.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/output_xmls.org')
-rw-r--r--org/output_xmls.org177
1 files changed, 89 insertions, 88 deletions
diff --git a/org/output_xmls.org b/org/output_xmls.org
index c73b42c..19f8552 100644
--- a/org/output_xmls.org
+++ b/org/output_xmls.org
@@ -16,6 +16,7 @@
[[./sdp.org][sdp]] [[./][org/]]
[[./output_hub.org][output_hub]]
+
* xml offspring (xhtml html epub) :module:sdp:output_xmls:
** format xhtml objects :format:
*** 0. module template
@@ -332,7 +333,7 @@ auto html_head(Dm)(
((type == "seg")
? "../../../css/html_seg.css"
: "../../css/html_scroll.css"),
- doc_matters.language,
+ doc_matters.src.language,
site_info_button(doc_matters),
inline_search_form(doc_matters),
((type == "seg") ? "" : "\n</div>"),
@@ -356,16 +357,16 @@ auto epub3_seg_head(Dm)(
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
lang="%s" xml:lang="%s">¶",
- doc_matters.language,
- doc_matters.language,
+ doc_matters.src.language,
+ doc_matters.src.language,
);
string html_strict = format(q"¶<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
lang="%s" xml:lang="%s">¶",
- doc_matters.language,
- doc_matters.language,
+ doc_matters.src.language,
+ doc_matters.src.language,
);
string o;
o = format(q"¶%s
@@ -399,7 +400,7 @@ auto epub3_seg_head(Dm)(
doc_matters.conf_make_meta.meta.title_full,
(doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
: ", " ~ doc_matters.conf_make_meta.meta.creator_author,
- doc_matters.language,
+ doc_matters.src.language,
);
return o;
}
@@ -1327,7 +1328,7 @@ void scroll(D,I)(
string suffix = ".html";
string previous_part = "";
string delimit = "";
- foreach (part; doc_matters.keys_seq.scroll) {
+ foreach (part; doc_matters.xml.keys_seq.scroll) {
foreach (obj; doc_abstraction[part]) {
delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
@@ -1343,14 +1344,14 @@ void scroll(D,I)(
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1367,7 +1368,7 @@ void scroll(D,I)(
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -1396,14 +1397,14 @@ void scroll(D,I)(
doc_html ~= xhtml_format.table(obj, _txt);
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1433,14 +1434,14 @@ void scroll(D,I)(
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1449,7 +1450,7 @@ void scroll(D,I)(
case "comment":
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -1474,12 +1475,12 @@ void scroll_write_output(M,C)(
debug(asserts) {
static assert(is(typeof(doc) == string[]));
}
- auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.language);
+ auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language);
try {
if (!exists(pth_html.base)) {
pth_html.base.mkdirRecurse;
}
- auto f = File(pth_html.fn_scroll(doc_matters.source_filename), "w");
+ auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w");
foreach (o; doc) {
f.writeln(o);
}
@@ -1487,7 +1488,7 @@ void scroll_write_output(M,C)(
catch (ErrnoException ex) {
// Handle error
}
- writeln(" ", pth_html.fn_scroll(doc_matters.source_filename));
+ writeln(" ", pth_html.fn_scroll(doc_matters.src.filename));
}
#+END_SRC
@@ -1512,7 +1513,7 @@ void seg(D,I)(
string suffix = ".html";
string previous_part = "";
string delimit = "";
- foreach (part; doc_matters.keys_seq.seg) {
+ foreach (part; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[part]) {
delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
@@ -1567,13 +1568,13 @@ void seg(D,I)(
doc_html_endnotes[segment_filename] ~= t[1];
break;
case 8: .. case 9:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
}
break;
@@ -1590,14 +1591,14 @@ void seg(D,I)(
doc_html[segment_filename] ~= to!string(t[0]);
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -1613,7 +1614,7 @@ void seg(D,I)(
doc_html_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -1651,14 +1652,14 @@ void seg(D,I)(
doc_html_endnotes[segment_filename] ~= "";
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1694,14 +1695,14 @@ void seg(D,I)(
doc_html_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -1710,7 +1711,7 @@ void seg(D,I)(
case "comment":
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
}
break;
@@ -1736,15 +1737,15 @@ void seg_write_output(M,D,E)(
}
mixin SiSUoutputRgxInit;
auto rgx = Rgx();
- auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.language);
+ auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language);
auto xhtml_format = outputXHTMLs();
- auto m = doc_matters.source_filename.matchFirst(rgx.src_fn);
+ auto m = doc_matters.src.filename.matchFirst(rgx.src_fn);
try {
- if (!exists(pth_html.seg(doc_matters.source_filename))) {
- pth_html.seg(doc_matters.source_filename).mkdirRecurse;
+ if (!exists(pth_html.seg(doc_matters.src.filename))) {
+ pth_html.seg(doc_matters.src.filename).mkdirRecurse;
}
- foreach (seg_filename; doc_matters.segnames) {
- auto f = File(pth_html.fn_seg(doc_matters.source_filename, seg_filename), "w");
+ foreach (seg_filename; doc_matters.xml.segnames) {
+ auto f = File(pth_html.fn_seg(doc_matters.src.filename, seg_filename), "w");
foreach (docseg; doc_html[seg_filename]) {
f.writeln(docseg);
}
@@ -1757,7 +1758,7 @@ void seg_write_output(M,D,E)(
catch (ErrnoException ex) {
// handle error
}
- writeln(" ", pth_html.fn_seg(doc_matters.source_filename, "toc"));
+ writeln(" ", pth_html.fn_seg(doc_matters.src.filename, "toc"));
}
#+END_SRC
@@ -1769,7 +1770,7 @@ void css(M)(
auto return ref M doc_matters,
) {
auto css = SiSUcss();
- auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.language);
+ auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language);
try {
if (!exists(pth_html.css)) {
(pth_html.css).mkdirRecurse;
@@ -1864,7 +1865,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
#+BEGIN_SRC d
string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) {
auto xhtml_format = outputXHTMLs();
- auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.language);
+ auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.src.language);
string uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters!
string content = format(q"¶ <?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="EPB-UUID">
@@ -1903,7 +1904,7 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) {
? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
(doc_matters.conf_make_meta.meta.creator_author.empty)
? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
- doc_matters.language, // language, fix (needed in dochead metadata)
+ doc_matters.src.language, // language, fix (needed in dochead metadata)
(doc_matters.conf_make_meta.meta.date_published.empty)
? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.date_published),
(doc_matters.conf_make_meta.meta.rights_copyright.empty)
@@ -1911,17 +1912,17 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) {
uuid,
uuid,
uuid,
- (pth_epub3.fn_oebps_css(doc_matters.source_filename)).chompPrefix("OEBPS/"),
+ (pth_epub3.fn_oebps_css(doc_matters.src.filename)).chompPrefix("OEBPS/"),
);
content ~= " " ~ "<!-- Content Documents -->" ~ "\n ";
content ~= parts["manifest_documents"];
// TODO sort jpg & png
content ~= " " ~ "<!-- Images -->" ~ "\n ";
- foreach (image; doc_matters.image_list) {
+ foreach (image; doc_matters.src.image_list) {
content ~= format(q"¶ <item id="%s" href="%s/%s" media-type="image/%s" />
¶",
image.baseName.stripExtension,
- (pth_epub3.doc_oebps_image(doc_matters.source_filename)).chompPrefix("OEBPS/"),
+ (pth_epub3.doc_oebps_image(doc_matters.src.filename)).chompPrefix("OEBPS/"),
image,
image.extension.chompPrefix("."),
);
@@ -1935,7 +1936,7 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) {
content ~= " " ~ "</guide>" ~ "\n ";
content ~= "" ~ "</package>";
debug(epubmanifest) {
- foreach (s; doc_matters.keys_seq.seg) {
+ foreach (s; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[s]) {
if (obj.is_a == "heading") {
if (obj.heading_lev_markup == 4) {
@@ -1985,7 +1986,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {
<nav epub:type=\"toc\" id=\"toc\">\n",
doc_matters.conf_make_meta.meta.title_full,
);
- foreach (sect; doc_matters.keys_seq.seg) {
+ foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
if (obj.is_a == "heading") {
string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip;
@@ -2091,7 +2092,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) {
(doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
: doc_matters.conf_make_meta.meta.creator_author, // author
);
- foreach (sect; doc_matters.keys_seq.seg) {
+ foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
if (obj.is_a == "heading") {
string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip;
@@ -2163,7 +2164,7 @@ void outputEPub3(D,I)(
string[string] oepbs_content_parts;
string suffix = ".xhtml";
string[] doc_parts_;
- foreach (part; doc_matters.keys_seq.seg) {
+ foreach (part; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[part]) {
string _txt = xhtml_format.special_characters(obj, obj.text);
if (obj.is_a == "heading") {
@@ -2212,13 +2213,13 @@ void outputEPub3(D,I)(
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case 8: .. case 9:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
}
break;
@@ -2236,14 +2237,14 @@ void outputEPub3(D,I)(
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -2259,7 +2260,7 @@ void outputEPub3(D,I)(
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
@@ -2298,14 +2299,14 @@ void outputEPub3(D,I)(
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -2341,14 +2342,14 @@ void outputEPub3(D,I)(
doc_epub3_endnotes[segment_filename] ~= t[1];
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
}
break;
}
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
}
break;
@@ -2357,7 +2358,7 @@ void outputEPub3(D,I)(
case "comment":
break;
default:
- if ((doc_matters.opt_action.debug_do)) {
+ if ((doc_matters.opt.action.debug_do)) {
writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
}
break;
@@ -2453,10 +2454,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
static assert(is(typeof(oebps_toc_ncx) == string));
static assert(is(typeof(oebps_content_opf) == string));
}
- auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.language);
+ auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.src.language);
auto xhtml_format = outputXHTMLs();
/+ zip file +/
- auto fn_epub = pth_epub3.epub_file(doc_matters.source_filename);
+ auto fn_epub = pth_epub3.epub_file(doc_matters.src.filename);
auto zip = new ZipArchive(); // ZipArchive zip = new ZipArchive();
/+ zip archive member files +/
try {
@@ -2464,24 +2465,24 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
pth_epub3.base.mkdirRecurse;
}
debug(epub_output) {
- if (!exists(pth_epub3.dbg_doc_meta_inf(doc_matters.source_filename))) {
- pth_epub3.dbg_doc_meta_inf(doc_matters.source_filename).mkdirRecurse;
+ if (!exists(pth_epub3.dbg_doc_meta_inf(doc_matters.src.filename))) {
+ pth_epub3.dbg_doc_meta_inf(doc_matters.src.filename).mkdirRecurse;
}
- if (!exists(pth_epub3.dbg_doc_oebps_css(doc_matters.source_filename))) {
- pth_epub3.dbg_doc_oebps_css(doc_matters.source_filename).mkdirRecurse;
+ if (!exists(pth_epub3.dbg_doc_oebps_css(doc_matters.src.filename))) {
+ pth_epub3.dbg_doc_oebps_css(doc_matters.src.filename).mkdirRecurse;
}
- if (!exists(pth_epub3.dbg_doc_oebps_image(doc_matters.source_filename))) {
- pth_epub3.dbg_doc_oebps_image(doc_matters.source_filename).mkdirRecurse;
+ if (!exists(pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename))) {
+ pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename).mkdirRecurse;
}
}
{ /+ OEBPS/[segments].xhtml (the document contents) +/
- foreach (seg_filename; doc_matters.segnames_lv_0_to_4) {
- string fn = pth_epub3.fn_oebps_content_xhtml(doc_matters.source_filename, seg_filename);
+ foreach (seg_filename; doc_matters.xml.segnames_lv_0_to_4) {
+ string fn = pth_epub3.fn_oebps_content_xhtml(doc_matters.src.filename, seg_filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
debug(epub_output) {
- string fn_dbg = pth_epub3.dbg_fn_oebps_content_xhtml(doc_matters.source_filename, seg_filename);
+ string fn_dbg = pth_epub3.dbg_fn_oebps_content_xhtml(doc_matters.src.filename, seg_filename);
auto f = File(fn_dbg, "w");
}
foreach (docseg; doc_epub3[seg_filename]) {
@@ -2505,10 +2506,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
File f;
{ /+ mimetypes (identify zip file type) +/
debug(epub_output) {
- fn_dbg = pth_epub3.dbg_fn_mimetypes(doc_matters.source_filename);
+ fn_dbg = pth_epub3.dbg_fn_mimetypes(doc_matters.src.filename);
File(fn_dbg, "w").writeln(mimetypes);
}
- fn = pth_epub3.fn_mimetypes(doc_matters.source_filename);
+ fn = pth_epub3.fn_mimetypes(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
@@ -2519,10 +2520,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
}
{ /+ META-INF/container.xml (identify doc root) +/
debug(epub_output) {
- fn_dbg = pth_epub3.dbg_fn_dmi_container_xml(doc_matters.source_filename);
+ fn_dbg = pth_epub3.dbg_fn_dmi_container_xml(doc_matters.src.filename);
File(fn_dbg, "w").writeln(meta_inf_container_xml);
}
- fn = pth_epub3.fn_dmi_container_xml(doc_matters.source_filename);
+ fn = pth_epub3.fn_dmi_container_xml(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
@@ -2533,10 +2534,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
}
{ /+ OEBPS/toc_nav.xhtml (navigation toc epub3) +/
debug(epub_output) {
- fn_dbg = pth_epub3.dbg_fn_oebps_toc_nav_xhtml(doc_matters.source_filename);
+ fn_dbg = pth_epub3.dbg_fn_oebps_toc_nav_xhtml(doc_matters.src.filename);
File(fn_dbg, "w").writeln(oebps_toc_nav_xhtml);
}
- fn = pth_epub3.fn_oebps_toc_nav_xhtml(doc_matters.source_filename);
+ fn = pth_epub3.fn_oebps_toc_nav_xhtml(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
@@ -2547,10 +2548,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
}
{ /+ OEBPS/toc.ncx (navigation toc epub2) +/
debug(epub_output) {
- fn_dbg = pth_epub3.dbg_fn_oebps_toc_ncx(doc_matters.source_filename);
+ fn_dbg = pth_epub3.dbg_fn_oebps_toc_ncx(doc_matters.src.filename);
File(fn_dbg, "w").writeln(oebps_toc_ncx);
}
- fn = pth_epub3.fn_oebps_toc_ncx(doc_matters.source_filename);
+ fn = pth_epub3.fn_oebps_toc_ncx(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
@@ -2561,10 +2562,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
}
{ /+ OEBPS/content.opf (doc manifest) +/
debug(epub_output) {
- fn_dbg = pth_epub3.dbg_fn_oebps_content_opf(doc_matters.source_filename);
+ fn_dbg = pth_epub3.dbg_fn_oebps_content_opf(doc_matters.src.filename);
File(fn_dbg, "w").writeln(oebps_content_opf);
}
- fn = pth_epub3.fn_oebps_content_opf(doc_matters.source_filename);
+ fn = pth_epub3.fn_oebps_content_opf(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
@@ -2574,25 +2575,25 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
createZipFile!()(fn_epub, zip.build());
}
{ /+ OEBPS/_sisu/image (images) +/
- foreach (image; doc_matters.image_list) {
+ foreach (image; doc_matters.src.image_list) {
debug(epub_output) {
- if (exists(doc_matters.src_path_info.image_root ~ "/" ~ image)) {
- (doc_matters.src_path_info.image_root ~ "/" ~ image)
- .copy((pth_epub3.dbg_doc_oebps_image(doc_matters.source_filename)) ~ "/" ~ image);
+ if (exists(doc_matters.src.path_info.image_root ~ "/" ~ image)) {
+ (doc_matters.src.path_info.image_root ~ "/" ~ image)
+ .copy((pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename)) ~ "/" ~ image);
}
}
}
- foreach (image; doc_matters.image_list) {
+ foreach (image; doc_matters.src.image_list) {
debug(epub_output) {
debug(epub_images) {
writeln(
- doc_matters.src_path_info.image_root, image, " -> ",
- pth_epub3.dbg_doc_oebps_image(doc_matters.source_filename), "/", image
+ doc_matters.src.path_info.image_root, image, " -> ",
+ pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename), "/", image
);
}
}
- auto fn_src = doc_matters.src_path_info.image_root ~ image;
- auto fn_out = pth_epub3.doc_oebps_image(doc_matters.source_filename).to!string ~ "/" ~ image;
+ auto fn_src = doc_matters.src.path_info.image_root ~ image;
+ auto fn_out = pth_epub3.doc_oebps_image(doc_matters.src.filename).to!string ~ "/" ~ image;
if (exists(fn_src)) {
{
auto zip_arc_member_file = new ArchiveMember();
@@ -2609,10 +2610,10 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
{ /+ OEBPS/epub.css +/
auto css = SiSUcss();
debug(epub_output) {
- fn_dbg = pth_epub3.dbg_fn_oebps_css(doc_matters.source_filename);
+ fn_dbg = pth_epub3.dbg_fn_oebps_css(doc_matters.src.filename);
File(fn_dbg, "w").writeln(css.epub_css);
}
- fn = pth_epub3.fn_oebps_css(doc_matters.source_filename);
+ fn = pth_epub3.fn_oebps_css(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();