From 4f20bd5582bc9ed864f0e43f030a4e76259cf6f0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 29 Jan 2017 16:54:15 -0500 Subject: org file reorganise --- org/output.org | 71 +++++----------------------------------------------------- 1 file changed, 5 insertions(+), 66 deletions(-) (limited to 'org/output.org') 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), ""); toc ~= ""; break; case DomTags.close_and_open : - writeln(markup.indent_by_spaces_provided(k), ""); - writeln(markup.indent_by_spaces_provided(k), "<", k, ">", obj.text); ++counter; toc ~= ""; toc ~= format(q"¶ @@ -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"¶ @@ -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 - - - - - - - Democratizing Innovation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3