aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-01-23 17:17:47 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit334bb9c301bb72d5331a2e9e067211c18e5f7c69 (patch)
tree914d539ce4f228103da8bf465cbcf61a71f96498 /org/output.org
parenttemplate, document head & body (diff)
templates
Diffstat (limited to 'org/output.org')
-rw-r--r--org/output.org69
1 files changed, 48 insertions, 21 deletions
diff --git a/org/output.org b/org/output.org
index fe1a869..259d4dd 100644
--- a/org/output.org
+++ b/org/output.org
@@ -161,9 +161,12 @@ template SiSUoutputEPub() {
#+name: source_sisupod_config
#+BEGIN_SRC d
-void sisupod_assemble(
- string fn_src,
+void sisupod_assemble(S)(
+ S fn_src,
) {
+ debug(asserts){
+ static assert(is(typeof(fn_src) == string));
+ }
mixin SiSUpaths;
auto pth_sisupod = SiSUpodPaths();
mixin SiSUlanguageCodes;
@@ -226,9 +229,12 @@ string _xhtml_anchor_tags(const(string[]) anchor_tags) {
#+name: xhtml_format_objects
#+BEGIN_SRC d
-auto scroll_head(
- string[string][string] dochead_meta,
+auto scroll_head(Me)(
+ Me dochead_meta,
) {
+ debug(asserts){
+ static assert(is(typeof(dochead_meta) == string[string][string]));
+ }
string o;
o = format(q"¶<!DOCTYPE html>
<html>
@@ -268,9 +274,12 @@ dochead_meta["title"]["full"],
#+name: xhtml_format_objects
#+BEGIN_SRC d
-auto seg_head(
- string[string][string] dochead_meta,
+auto seg_head(Me)(
+ Me dochead_meta,
) {
+ debug(asserts){
+ static assert(is(typeof(dochead_meta) == string[string][string]));
+ }
string o;
o = format(q"¶<!DOCTYPE html>
<html>
@@ -526,10 +535,14 @@ auto endnote(O)(
#+name: output_html_scroll
#+BEGIN_SRC d
-void scroll_write_output_file(
- string fn_src,
- string[] doc,
+void scroll_write_output_file(Fn,D)(
+ Fn fn_src,
+ D doc,
) {
+ debug(asserts){
+ static assert(is(typeof(fn_src) == string));
+ static assert(is(typeof(doc) == string[]));
+ }
mixin SiSUpaths;
auto pth_html = HtmlPaths();
try {
@@ -668,11 +681,16 @@ void scroll(C,T)(
#+name: output_html_seg
#+BEGIN_SRC d
-void seg_write_output_files(
- string fn_src,
- string[] seg_filenames,
- string[][string] doc_html,
+void seg_write_output_files(Fn,FnS,D)(
+ Fn fn_src,
+ FnS seg_filenames,
+ D doc_html,
) {
+ debug(asserts){
+ static assert(is(typeof(fn_src) == string));
+ static assert(is(typeof(seg_filenames) == string[]));
+ static assert(is(typeof(doc_html) == string[][string]));
+ }
mixin SiSUpaths;
auto pth_html = HtmlPaths();
auto xhtml_format = SDPoutputXHTMLs();
@@ -2512,15 +2530,24 @@ void doc_content(C,T)(
#+name: output_epub_xhtml_seg
#+BEGIN_SRC d
-void epub_write_output_files(
- string fn_src,
- string[] seg_filenames,
- string[][string] doc_epub,
- string mimetypes,
- string meta_inf_container_xml,
- string oebps_toc_ncx,
- string oebps_content_opf,
+void epub_write_output_files(Fn,FnS,De,Mt,Mic,Ot,Oc)(
+ Fn fn_src,
+ FnS seg_filenames,
+ De doc_epub,
+ Mt mimetypes,
+ Mic meta_inf_container_xml,
+ Ot oebps_toc_ncx,
+ Oc oebps_content_opf,
) {
+ debug(asserts){
+ static assert(is(typeof(fn_src) == string));
+ static assert(is(typeof(seg_filenames) == string[]));
+ static assert(is(typeof(doc_epub) == string[][string]));
+ static assert(is(typeof(mimetypes) == string));
+ static assert(is(typeof(meta_inf_container_xml) == string));
+ static assert(is(typeof(oebps_toc_ncx) == string));
+ static assert(is(typeof(oebps_content_opf) == string));
+ }
mixin SiSUpaths;
auto pth_epub = EpubPaths();
// doc = xhtml_format.scroll_head ~ doc_epub ~ xhtml_format.tail;