aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-01-29 16:54:15 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit4f20bd5582bc9ed864f0e43f030a4e76259cf6f0 (patch)
treebbbc5ba31d4154d154405c8be2de14b24b1b60e2 /org/output.org
parent0.12.1 abstraction template (diff)
org file reorganise
Diffstat (limited to 'org/output.org')
-rw-r--r--org/output.org71
1 files changed, 5 insertions, 66 deletions
diff --git a/org/output.org b/org/output.org
index 9c23caa..c0dfe5b 100644
--- a/org/output.org
+++ b/org/output.org
@@ -13,8 +13,7 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
[[./sdp.org][sdp]] [[./][org/]]
-* Code Skeleton / Outline / Structure (tangles) :tangle:
-** output hub template file [#A]
+* 0. output hub template file [#A]
#+BEGIN_SRC d :tangle ../src/sdp/output_hub.d
/++
@@ -62,8 +61,6 @@ template outputHub() {
if (doc_matters.opt_action_bool["text"]) {
/+ mixin outputText; +/
writeln("text processing");
- // auto text=SDPoutput_text();
- // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
}
if (doc_matters.opt_action_bool["html"]) {
outputHTML!().scroll(contents,doc_matters);
@@ -98,7 +95,7 @@ template outputHub() {
}
#+END_SRC
-* output functions :output:
+* 1. output functions :output:
** output imports
#+name: output_imports
@@ -188,7 +185,7 @@ void SiSUpod(S)(
#+END_SRC
** text [#C] :text:
-** xml offspring (xhtml html epub)
+** xml offspring (xhtml html epub) :xml:
*** format xhtml objects :format:
**** xhtml common template :template:
@@ -706,9 +703,7 @@ void seg_write_output_files(M,C)(
try {
mkdirRecurse(pth_html.seg(doc_matters.source_filename));
foreach (seg_filename; doc_matters.segnames) {
- // writeln(__LINE__, ": ", fn);
auto f = File(pth_html.fn_seg(doc_matters.source_filename, seg_filename), "w");
- /+ // f.writeln(seg_head); // not needed built and inserted earlier +/
foreach (docseg; doc_html[seg_filename]) {
f.writeln(docseg);
}
@@ -716,7 +711,7 @@ void seg_write_output_files(M,C)(
}
}
catch (ErrnoException ex) {
- // Handle error
+ // handle error
}
}
#+END_SRC
@@ -770,7 +765,6 @@ void seg(C,M)(
segment_filename = obj.segment_anchor_tag;
doc_html[segment_filename] ~= xhtml_format.seg_head(doc_matters.dochead_meta); // consider placing seg_head here as can more easily populate it with lev4 info
foreach (top_level_heading; top_level_headings) {
- // writeln(top_level_heading);
doc_html[segment_filename] ~= top_level_heading;
}
doc_html[segment_filename] ~= xhtml_format.heading(obj);
@@ -827,7 +821,7 @@ void seg(C,M)(
doc_html[segment_filename] ~= xhtml_format.nugget(obj);
break;
case "table":
- doc_html[segment_filename] ~= xhtml_format.para(obj); //
+ doc_html[segment_filename] ~= xhtml_format.para(obj);
break;
case "code":
doc_html[segment_filename] ~= xhtml_format.code(obj);
@@ -872,7 +866,6 @@ void seg(C,M)(
}
}
}
- writeln(doc_matters.keys_seq_seg);
seg_write_output_files(doc_matters, doc_html);
}
#+END_SRC
@@ -2322,12 +2315,9 @@ string epub_oebps_toc(C,M)(C contents, M doc_matters) {
foreach_reverse (k; 0 .. 7) {
switch (obj.dom_markedup[k]) {
case DomTags.close :
- writeln(markup.indent_by_spaces_provided(k), "</", k, ">");
toc ~= "</navPoint>";
break;
case DomTags.close_and_open :
- writeln(markup.indent_by_spaces_provided(k), "</", k, ">");
- writeln(markup.indent_by_spaces_provided(k), "<", k, ">", obj.text);
++counter;
toc ~= "</navPoint>";
toc ~= format(q"¶<navPoint class="chapter" id="navpoint" playOrder="%s">
@@ -2341,7 +2331,6 @@ obj.segment_anchor_tag, // lev < 4 [no link]; lev == 4 [filename] markup.xhtml
);
break;
case DomTags.open :
- writeln(markup.indent_by_spaces_provided(k), "<", k, ">", obj.text);
++counter;
toc ~= format(q"¶<navPoint class="chapter" id="navpoint" playOrder="%s">
<navLabel>
@@ -2390,8 +2379,6 @@ void outputEPub(C,T)(
foreach (obj; contents[part]) {
if (obj.is_a == "heading") {
switch (obj.heading_lev_markup) {
- // case 0:
- // break;
case 0: .. case 3:
/+ fill buffer, and replace with new levels from 1 to 3 +/
switch (obj.heading_lev_markup) {
@@ -2422,7 +2409,6 @@ void outputEPub(C,T)(
segment_filename = obj.segment_anchor_tag;
doc_epub[segment_filename] ~= xhtml_format.seg_head(doc_matters.dochead_meta);
foreach (top_level_heading; top_level_headings) {
- // writeln(top_level_heading);
doc_epub[segment_filename] ~= top_level_heading;
}
doc_epub[segment_filename] ~= xhtml_format.heading(obj);
@@ -2440,7 +2426,6 @@ void outputEPub(C,T)(
switch (obj.is_a) {
case "toc":
doc_epub[segment_filename] ~= xhtml_format.toc(obj);
- // doc_epub ~= xhtml_toc(obj);
break;
default:
// writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
@@ -2469,23 +2454,18 @@ void outputEPub(C,T)(
break;
case "verse":
doc_epub[segment_filename] ~= xhtml_format.nugget(obj);
- // doc_epub ~= xhtml_verse(obj);
break;
case "group":
doc_epub[segment_filename] ~= xhtml_format.nugget(obj);
- // doc_epub ~= xhtml_group(obj);
break;
case "block":
doc_epub[segment_filename] ~= xhtml_format.nugget(obj);
- // doc_epub ~= xhtml_block(obj);
break;
case "quote":
doc_epub[segment_filename] ~= xhtml_format.nugget(obj);
- // doc_epub ~= xhtml_quote(obj);
break;
case "table":
doc_epub[segment_filename] ~= xhtml_format.para(obj); //
- // doc_epub ~= xhtml_table(obj);
break;
case "code":
doc_epub[segment_filename] ~= xhtml_format.code(obj);
@@ -2530,7 +2510,6 @@ void outputEPub(C,T)(
}
}
}
- writeln(doc_matters.keys_seq_seg);
epub_write_output_files(
doc_matters,
doc_epub,
@@ -2563,7 +2542,6 @@ void epub_write_output_files(C,EpD,Mt,Mic,Ot,Oc)(
}
mixin SiSUpaths;
auto pth_epub = EpubPaths();
- // doc = xhtml_format.scroll_head ~ doc_epub ~ xhtml_format.tail;
auto xhtml_format = outputXHTMLs();
try {
mkdirRecurse(pth_epub.doc_meta_inf(doc_matters.source_filename));
@@ -2601,42 +2579,3 @@ void epub_write_output_files(C,EpD,Mt,Mic,Ot,Oc)(
** odt :odt:
** sqlite [#B] :sqlite:
** pgsql :pgsql:
-* +other+
-** example head
-
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>
- Democratizing Innovation
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- <meta name="dc.title" content="Democratizing Innovation" />
- <meta name="dc.author" content="Eric von Hippel" />
- <meta name="dc.publisher" content="SiSU http://www.jus.uio.no/sisu (this copy)" />
- <meta name="dc.date" content="2005" />
- <meta name="dc.date.created" content="2005" />
- <meta name="dc.date.issued" content="2005" />
- <meta name="dc.date.available" content="2005" />
- <meta name="dc.date.valid" content="2005" />
- <meta name="dc.date.modified" content="2005" />
- <meta name="dc.language" content="US" />
- <meta name="dc.rights" content="Copyright: Copyright (C) 2005 Eric von Hippel. Exclusive rights to publish and sell this book in print form in English are licensed to The MIT Press. All other rights are reserved by the author. An electronic version of this book is available under a Creative Commons license. \\ License: Creative Commons US Attribution-NonCommercial-NoDerivs license 2.0. http://creativecommons.org/licenses/by-nc-nd/2.0/legalcode Some Rights Reserved. You are free to copy, distribute, display and perform the work, under the following conditions: Attribution, you must give the original author credit; you may not use this work for commercial purposes; No Derivative Works, you may not alter, transform, or build-upon this work. For reuse or distribution you must make clear to others the license terms of this work. Any conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above." />
-
- <meta name="generator" content="SiSU 7.1.8 of 2016w08/5 (2016-02-26) (n*x and Ruby!)" />
- <link rel="generator" href="http://www.sisudoc.org/" />
- <link rel="shortcut icon" href="../_sisu/image/rb7.ico" />
-
- <link href="../../_sisu/css/html.css" rel="stylesheet"> <link href="../../../_sisu/css/html.css" rel="stylesheet">
-</head>
-
-<body lang="en">
-<a name="top" id="top"></a>
-
-<a name="bottom" id="bottom"></a>
-<a name="end" id="end"></a>
-</div>
-
-</body>
-</html>