diff options
Diffstat (limited to 'src/doc_reform')
22 files changed, 127 insertions, 127 deletions
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d index f7c9751..5ac96ec 100755 --- a/src/doc_reform/doc_reform.d +++ b/src/doc_reform/doc_reform.d @@ -32,10 +32,10 @@ description "A SiSU inspired document parser writen in D." homepage "http://sisudoc.org" +/ void main(string[] args) { - mixin SiSUrgxInit; - mixin contentJSONtoSiSUstruct; - mixin SiSUbiblio; - mixin SiSUrgxInitFlags; + mixin DocReformRgxInit; + mixin contentJSONtoDocReformStruct; + mixin DocReformBiblio; + mixin DocReformRgxInitFlags; mixin outputHub; string flag_action; string arg_unrecognized; @@ -465,7 +465,7 @@ void main(string[] args) { debug(steps) { writeln("--->\nstepX commence → (document abstraction)"); } - auto t = SiSUabstraction!()(_env, _opt_action, manifest); + auto t = DocReformAbstraction!()(_env, _opt_action, manifest); static assert(!isTypeTuple!(t)); static assert(t.length==2); auto doc_abstraction = t[dAM.abstraction]; @@ -475,13 +475,13 @@ void main(string[] args) { } /+ ↓ debugs +/ if (doc_matters.opt.action.verbose) { - SiSUabstractionSummary!()(doc_abstraction, doc_matters); + DocReformAbstractionSummary!()(doc_abstraction, doc_matters); } /+ ↓ debugs +/ if ((doc_matters.opt.action.debug_do) || (doc_matters.opt.action.verbose) ) { - SiSUdebugs!()(doc_abstraction, doc_matters); + DocReformDebugs!()(doc_abstraction, doc_matters); } /+ ↓ output hub +/ if (!(doc_matters.opt.action.skip_output)) { diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d index d6adfa7..30aaedc 100644 --- a/src/doc_reform/meta/conf_make_meta_json.d +++ b/src/doc_reform/meta/conf_make_meta_json.d @@ -3,7 +3,7 @@ extract json header return json +/ module doc_reform.meta.conf_make_meta_json; -static template contentJSONtoSiSUstruct() { +static template contentJSONtoDocReformStruct() { import std.exception, std.regex, @@ -18,8 +18,8 @@ static template contentJSONtoSiSUstruct() { doc_reform.meta.conf_make_meta_json, doc_reform.meta.rgx; ConfCompositePlus _struct_composite; - auto contentJSONtoSiSUstruct(C, J)(C _struct_composite, J _json, string _identifier) { - mixin SiSUrgxInit; + auto contentJSONtoDocReformStruct(C,J)(C _struct_composite, J _json, string _identifier) { + mixin DocReformRgxInit; static auto _rgx = Rgx(); debug (json) { writeln(">> --------------------------- >>"); diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index cf279a5..a05acf7 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -12,7 +12,7 @@ import import doc_reform.meta.defaults, doc_reform.meta.rgx; -mixin SiSUrgxInit; +mixin DocReformRgxInit; static auto _rgx = Rgx(); mixin InternalMarkup; auto _mkup = InlineMarkup(); diff --git a/src/doc_reform/meta/conf_make_meta_toml.d b/src/doc_reform/meta/conf_make_meta_toml.d index d308ae4..1cf935b 100644 --- a/src/doc_reform/meta/conf_make_meta_toml.d +++ b/src/doc_reform/meta/conf_make_meta_toml.d @@ -22,21 +22,21 @@ static template configParseTOMLreturnJSON() { return _doc_json; } } -static template configParseTOMLreturnSiSUstruct() { +static template configParseTOMLreturnDocReformStruct() { import toml, toml.json; import doc_reform.meta.conf_make_meta_structs, doc_reform.meta.conf_make_meta_json; - mixin contentJSONtoSiSUstruct; - auto configParseTOMLreturnSiSUstruct(CCm, T)( + mixin contentJSONtoDocReformStruct; + auto configParseTOMLreturnDocReformStruct(CCm, T)( CCm _make_and_meta_struct, T _document_struct ){ TOMLDocument _doc = parseTOML(cast(string)(_document_struct.content)); auto _doc_json = toJSON(_doc); - _make_and_meta_struct = contentJSONtoSiSUstruct!()(_make_and_meta_struct, _doc_json, _document_struct.filename); // struct from json + _make_and_meta_struct = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, _document_struct.filename); // struct from json return _make_and_meta_struct; } } @@ -56,8 +56,8 @@ static template docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct() { doc_reform.meta.conf_make_meta_structs, doc_reform.meta.conf_make_meta_json, doc_reform.meta.rgx; - mixin SiSUrgxInit; - mixin contentJSONtoSiSUstruct; + mixin DocReformRgxInit; + mixin contentJSONtoDocReformStruct; static auto rgx = Rgx(); auto docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct(CCm, Src)( CCm _make_and_meta_struct, @@ -71,7 +71,7 @@ static template docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct() { _doc = parseTOML(cast(string)(header_src)); } auto _doc_json = toJSON(_doc); - auto _header_and_make_and_meta_struct = contentJSONtoSiSUstruct!()(_make_and_meta_struct, _doc_json, "header"); + auto _header_and_make_and_meta_struct = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, "header"); return _header_and_make_and_meta_struct; } } diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d index 2f8c068..69ab7ba 100644 --- a/src/doc_reform/meta/defaults.d +++ b/src/doc_reform/meta/defaults.d @@ -2,7 +2,7 @@ default settings +/ module doc_reform.meta.defaults; -template SiSUrgxInitFlags() { +template DocReformRgxInitFlags() { /+ regex flags +/ static int[string] flags_type_init() { int[string] flags_type_init = [ @@ -42,7 +42,7 @@ template SiSUrgxInitFlags() { return flags_type_init; } } -template SiSUnode() { +template DocReformNode() { static string[string] node_metadata_heading_str() { auto _node = [ "is" : "", @@ -84,7 +84,7 @@ template SiSUnode() { return _node; } } -template SiSUbiblio() { +template DocReformBiblio() { // required: deemed_author (author || editor); year; fulltitle; struct BibJsnStr { static auto biblio_entry_tags_jsonstr() { @@ -153,7 +153,7 @@ template InternalMarkup() { } } } -template SiSUlanguageCodes() { +template DocReformLanguageCodes() { /+ language codes +/ struct Lang { static string[string][string] codes() { diff --git a/src/doc_reform/meta/doc_debugs.d b/src/doc_reform/meta/doc_debugs.d index 04dedb2..9f26edc 100644 --- a/src/doc_reform/meta/doc_debugs.d +++ b/src/doc_reform/meta/doc_debugs.d @@ -2,7 +2,7 @@ output debugs +/ module doc_reform.meta.doc_debugs; -template SiSUdebugs() { +template DocReformDebugs() { import doc_reform.meta.defaults, doc_reform.meta.rgx; @@ -22,11 +22,11 @@ template SiSUdebugs() { std.typecons, std.utf, std.conv : to; - auto SiSUdebugs(S,T)( + auto DocReformDebugs(S,T)( const S contents, T doc_matters, ) { - mixin SiSUrgxInit; + mixin DocReformRgxInit; mixin InternalMarkup; static auto rgx = Rgx(); auto markup = InlineMarkup(); diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index 7c0e90d..071b166 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -1,5 +1,5 @@ module doc_reform.meta.metadoc; -template SiSUabstraction() { +template DocReformAbstraction() { import std.getopt, std.file, @@ -19,16 +19,16 @@ template SiSUabstraction() { doc_reform.source.read_config_files, doc_reform.source.read_source_files, doc_reform.output.hub; - mixin SiSUrgxInit; - mixin contentJSONtoSiSUstruct; - mixin SiSUbiblio; - mixin SiSUrgxInitFlags; + mixin DocReformRgxInit; + mixin contentJSONtoDocReformStruct; + mixin DocReformBiblio; + mixin DocReformRgxInitFlags; mixin outputHub; enum headBody { header, body_content, insert_file_list, image_list } enum makeMeta { make, meta } enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, images } static auto rgx = Rgx(); - auto SiSUabstraction(E,O,M)( + auto DocReformAbstraction(E,O,M)( E _env, O _opt_action, M _manifest @@ -36,8 +36,8 @@ template SiSUabstraction() { auto _config_document_struct = readConfigDoc!()(_manifest, _env); // document config file auto _config_local_site_struct = readConfigSite!()(_manifest, _env); // local site config ConfCompositePlus _make_and_meta_struct; - _make_and_meta_struct = configParseTOMLreturnSiSUstruct!()(_make_and_meta_struct, _config_document_struct); - _make_and_meta_struct = configParseTOMLreturnSiSUstruct!()(_make_and_meta_struct, _config_local_site_struct); + _make_and_meta_struct = configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _config_document_struct); + _make_and_meta_struct = configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _config_local_site_struct); /+ ↓ read file (filename with path) +/ /+ ↓ file tuple of header and content +/ debug(steps) { @@ -45,7 +45,7 @@ template SiSUabstraction() { ); } auto _header_body_insertfilelist_imagelist - = SiSUrawMarkupContent!()(_opt_action, _manifest.src.path_and_fn); + = DocReformRawMarkupContent!()(_opt_action, _manifest.src.path_and_fn); static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist)); static assert(_header_body_insertfilelist_imagelist.length==4); debug(steps) { @@ -72,7 +72,7 @@ template SiSUabstraction() { debug(steps) { writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters)"); } - auto da = SiSUdocAbstraction!()( + auto da = DocReformDocAbstraction!()( _header_body_insertfilelist_imagelist[headBody.body_content], _make_and_meta_struct, _opt_action, @@ -123,7 +123,7 @@ template SiSUabstraction() { return _manifest.src; } auto src_path_info() { - return SiSUpathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path + return DocReformPathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path } auto srcs() { struct SRC_ { diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index c4a12bb..7a96edd 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -4,7 +4,7 @@ metadoc_from_src.d +/ module doc_reform.meta.metadoc_from_src; -template SiSUdocAbstraction() { +template DocReformDocAbstraction() { /+ ↓ abstraction imports +/ import doc_reform.meta; import @@ -20,7 +20,7 @@ template SiSUdocAbstraction() { /+ ↓ abstraction mixins +/ mixin ObjectSetter; mixin InternalMarkup; - mixin SiSUrgxInit; + mixin DocReformRgxInit; /+ ↓ abstraction struct init +/ /+ initialize +/ ObjGenericComposite[][string] the_table_of_contents_section; @@ -236,7 +236,7 @@ template SiSUdocAbstraction() { auto node_construct = NodeStructureMetadata(); enum sObj { content, anchor_tags, notes_reg, notes_star, links, image_no_dimensions } /+ ↓ abstract marked up document +/ - auto SiSUdocAbstraction(Src,CMM,Opt,Mfst)( + auto DocReformDocAbstraction(Src,CMM,Opt,Mfst)( Src markup_sourcefile_content, CMM conf_make_meta, Opt opt_action, @@ -263,8 +263,8 @@ template SiSUdocAbstraction() { previous_length=0; reset_note_numbers=true; } - mixin SiSUrgxInitFlags; - mixin SiSUnode; + mixin DocReformRgxInitFlags; + mixin DocReformNode; auto node_para_int_ = node_metadata_para_int; auto node_para_str_ = node_metadata_para_str; ObjGenericComposite comp_obj_heading_, comp_obj_para, comp_obj_toc; @@ -3080,7 +3080,7 @@ template SiSUdocAbstraction() { return ref string biblio_entry_str_json, return ref string[] biblio_arr_json ) { - mixin SiSUbiblio; + mixin DocReformBiblio; auto jsn = BibJsnStr(); static auto rgx = Rgx(); if (line.matchFirst(rgx.heading_biblio)) { @@ -5419,7 +5419,7 @@ template SiSUdocAbstraction() { static assert(is(typeof(bookindex_unordered_hashes) == string[][string][string])); static assert(is(typeof(obj_cite_digits.on) == int)); } - mixin SiSUnode; + mixin DocReformNode; mixin InternalMarkup; static auto mkup = InlineMarkup(); string type_is; @@ -5651,7 +5651,7 @@ template SiSUdocAbstraction() { in { } body { - mixin SiSUnode; + mixin DocReformNode; ObjGenericComposite[] the_endnotes_section; auto endnotes_ = gathered_notes(); string type_is; @@ -6303,7 +6303,7 @@ template SiSUdocAbstraction() { "block status: off or closing"); } /+ abstraction functions assertions ↑ +/ -} /+ ← closed: template SiSUdocAbstraction +/ +} /+ ← closed: template DocReformDocAbstraction +/ template docSectKeysSeq() { auto docSectKeysSeq(string[][string] document_section_keys_sequenced) { struct doc_sect_keys_seq { diff --git a/src/doc_reform/meta/metadoc_summary.d b/src/doc_reform/meta/metadoc_summary.d index f2e0632..6d4a01b 100644 --- a/src/doc_reform/meta/metadoc_summary.d +++ b/src/doc_reform/meta/metadoc_summary.d @@ -1,6 +1,6 @@ module doc_reform.meta.metadoc_summary; -template SiSUabstractionSummary() { - auto SiSUabstractionSummary(S,T)( +template DocReformAbstractionSummary() { + auto DocReformAbstractionSummary(S,T)( auto ref const S doc_abstraction, auto ref T doc_matters, ) { diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d index 63bb4ee..39f2479 100644 --- a/src/doc_reform/meta/rgx.d +++ b/src/doc_reform/meta/rgx.d @@ -2,7 +2,7 @@ regex: regular expressions used in sisu document parser +/ module doc_reform.meta.rgx; -static template SiSUrgxInit() { +static template DocReformRgxInit() { import doc_reform.meta.defaults; static struct Rgx { /+ misc +/ diff --git a/src/doc_reform/output/defaults.d b/src/doc_reform/output/defaults.d index 97ba691..f0173cc 100644 --- a/src/doc_reform/output/defaults.d +++ b/src/doc_reform/output/defaults.d @@ -35,7 +35,7 @@ template InternalMarkup() { } } } -template SiSUlanguageCodes() { +template DocReformLanguageCodes() { /+ language codes +/ struct Lang { static string[string][string] codes() { diff --git a/src/doc_reform/output/epub3.d b/src/doc_reform/output/epub3.d index 45e632a..7c4e346 100644 --- a/src/doc_reform/output/epub3.d +++ b/src/doc_reform/output/epub3.d @@ -31,7 +31,7 @@ template outputEPub3() { } string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.src.language); + auto pth_epub3 = DocReformPathsEPUB!()(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"> @@ -220,7 +220,7 @@ template outputEPub3() { <title>%s%s</title> <link rel="stylesheet" href="css/epub.css" type="text/css" id="main-css" /> <meta name="dtb:uid" content="urn:uuid:%s" /> - <!-- <meta name="epub-creator" content="SiSU http://www.jus.uio.no/sisu (this copy)" /> --> + <!-- <meta name="epub-creator" content="DocReform http://www.jus.uio.no/sisu (this copy)" /> --> <meta name="dtb:depth" content="%s" /> <meta name="dtb:totalPageCount" content="0" /> <meta name="dtb:maxPageNumber" content="0" /> @@ -296,7 +296,7 @@ template outputEPub3() { const D doc_abstraction, I doc_matters, ) { - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; auto xhtml_format = outputXHTMLs(); auto rgx = Rgx(); string[][string] doc_epub3; @@ -590,7 +590,7 @@ template outputEPub3() { 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.src.language); + auto pth_epub3 = DocReformPathsEPUB!()(doc_matters.output_path, doc_matters.src.language); auto xhtml_format = outputXHTMLs(); /+ zip file +/ auto fn_epub = pth_epub3.epub_file(doc_matters.src.filename); @@ -744,7 +744,7 @@ template outputEPub3() { } } { /+ OEBPS/epub.css +/ - auto css = SiSUcss(); + auto css = DocReformCss(); debug(epub_output) { fn_dbg = pth_epub3.dbg_fn_oebps_css(doc_matters.src.filename); File(fn_dbg, "w").writeln(css.epub_css); diff --git a/src/doc_reform/output/html.d b/src/doc_reform/output/html.d index 07fe081..5d5ccb5 100644 --- a/src/doc_reform/output/html.d +++ b/src/doc_reform/output/html.d @@ -16,7 +16,7 @@ template outputHTML() { const D doc_abstraction, I doc_matters, ) { - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; auto xhtml_format = outputXHTMLs(); auto rgx = Rgx(); string[] doc_html; @@ -165,7 +165,7 @@ template outputHTML() { debug(asserts) { static assert(is(typeof(doc) == string[])); } - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); + auto pth_html = DocReformPathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { if (!exists(pth_html.base)) { pth_html.base.mkdirRecurse; @@ -185,7 +185,7 @@ template outputHTML() { const D doc_abstraction, M doc_matters, ) { - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; auto rgx = Rgx(); auto xhtml_format = outputXHTMLs(); string[][string] doc_html; @@ -412,9 +412,9 @@ template outputHTML() { debug(asserts) { static assert(is(typeof(doc_html) == string[][string])); } - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; auto rgx = Rgx(); - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); + auto pth_html = DocReformPathsHTML!()(doc_matters.output_path, doc_matters.src.language); auto xhtml_format = outputXHTMLs(); auto m = doc_matters.src.filename.matchFirst(rgx.src_fn); try { @@ -441,8 +441,8 @@ template outputHTML() { void css(M)( auto ref M doc_matters, ) { - auto css = SiSUcss(); - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); + auto css = DocReformCss(); + auto pth_html = DocReformPathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { if (!exists(pth_html.css)) { (pth_html.css).mkdirRecurse; @@ -460,7 +460,7 @@ template outputHTML() { ) { { /+ (copy html images) +/ - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); + auto pth_html = DocReformPathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { pth_html.image.mkdirRecurse; } diff --git a/src/doc_reform/output/hub.d b/src/doc_reform/output/hub.d index b40c929..9e933d8 100644 --- a/src/doc_reform/output/hub.d +++ b/src/doc_reform/output/hub.d @@ -14,7 +14,7 @@ template outputHub() { doc_reform.output.paths_output; import std.parallelism; void outputHub(D,I)(D doc_abstraction, I doc_matters) { - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; mixin Msg; auto msg = Msg!()(doc_matters); static auto rgx = Rgx(); @@ -23,7 +23,7 @@ template outputHub() { auto msg = Msg!()(doc_matters); if (sched == outTask.sisupod) { msg.v("sisu source processing... "); - SiSUpod!()(doc_matters); + DocReformPod!()(doc_matters); msg.vv("sisu source done"); } if (sched == outTask.sqlite) { @@ -82,7 +82,7 @@ template outputHubOp() { doc_reform.output.create_zip_file, doc_reform.output.paths_output; void outputHubOp(E,O)(E env, O opt_action) { - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; static auto rgx = Rgx(); if ((opt_action.sqlite_db_drop)) { if ((opt_action.verbose)) { diff --git a/src/doc_reform/output/paths_output.d b/src/doc_reform/output/paths_output.d index abd21b6..451c40d 100644 --- a/src/doc_reform/output/paths_output.d +++ b/src/doc_reform/output/paths_output.d @@ -7,8 +7,8 @@ import std.array, std.regex, std.stdio; import doc_reform.meta.rgx; -template SiSUoutPaths() { - auto SiSUoutPaths(Po,Lng)( +template DocReformOutPaths() { + auto DocReformOutPaths(Po,Lng)( Po output_pth_root, Lng lng, ) { @@ -25,8 +25,8 @@ template SiSUoutPaths() { return _PathsStruct(); } } -template SiSUoutPathSQLite() { - auto SiSUoutPathSQLite(Po)( +template DocReformOutPathSQLite() { + auto DocReformOutPathSQLite(Po)( Po output_pth_root, ) { struct _PathsStruct { @@ -42,9 +42,9 @@ template SiSUoutPathSQLite() { return _PathsStruct(); } } -template SiSUoutPathsFnPd() { +template DocReformOutPathsFnPd() { /+ TODO stuff to work out here +/ - auto SiSUoutPathsFnPd(Fn,Pn)( + auto DocReformOutPathsFnPd(Fn,Pn)( Fn fn_src_pth, Pn pod_name ) { @@ -79,14 +79,14 @@ template SiSUoutPathsFnPd() { return _PathsStruct(); } } -template SiSUpathsHTML() { - mixin SiSUrgxInit; +template DocReformPathsHTML() { + mixin DocReformRgxInit; static auto rgx = Rgx(); - auto SiSUpathsHTML(Po,Lng)( + auto DocReformPathsHTML(Po,Lng)( Po output_pth_root, Lng lng, ) { - auto out_pth = SiSUoutPaths!()(output_pth_root, lng); + auto out_pth = DocReformOutPaths!()(output_pth_root, lng); string base_dir = "html"; string suffix = ".html"; struct _PathsStruct { @@ -121,14 +121,14 @@ template SiSUpathsHTML() { return _PathsStruct(); } } -template SiSUpathsEPUB() { - mixin SiSUrgxInit; +template DocReformPathsEPUB() { + mixin DocReformRgxInit; static auto rgx = Rgx(); - auto SiSUpathsEPUB(Po,Lng)( + auto DocReformPathsEPUB(Po,Lng)( Po output_pth_root, Lng lng, ) { - auto out_pth = SiSUoutPaths!()( output_pth_root, lng); + auto out_pth = DocReformOutPaths!()( output_pth_root, lng); string base_dir = "epub"; struct _PathsStruct { string base() { @@ -221,10 +221,10 @@ template SiSUpathsEPUB() { return _PathsStruct(); } } -template SiSUpathsSQLiteDiscrete() { - mixin SiSUrgxInit; +template DocReformPathsSQLiteDiscrete() { + mixin DocReformRgxInit; static auto rgx = Rgx(); - auto SiSUpathsSQLiteDiscrete(Po,Lng)( + auto DocReformPathsSQLiteDiscrete(Po,Lng)( Po output_pth_root, Lng lng, ) { @@ -233,7 +233,7 @@ template SiSUpathsSQLiteDiscrete() { return fn_src.baseName.stripExtension; } string base() { - auto out_pth = SiSUoutPaths!()(output_pth_root, lng); + auto out_pth = DocReformOutPaths!()(output_pth_root, lng); string base_dir = "sqlite"; return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array; } @@ -247,10 +247,10 @@ template SiSUpathsSQLiteDiscrete() { return _PathsStruct(); } } -template SiSUpathsSQLite() { - mixin SiSUrgxInit; +template DocReformPathsSQLite() { + mixin DocReformRgxInit; static auto rgx = Rgx(); - auto SiSUpathsSQLite(DbN, Po)( + auto DocReformPathsSQLite(DbN, Po)( DbN db_name, Po output_pth_root, ) { @@ -259,7 +259,7 @@ template SiSUpathsSQLite() { return fn_src.baseName.stripExtension; } string base() { - auto out_pth = SiSUoutPathSQLite!()(output_pth_root); // decide whether to have separate files for each language + auto out_pth = DocReformOutPathSQLite!()(output_pth_root); // decide whether to have separate files for each language string base_dir = "sqlite"; return asNormalizedPath((out_pth.output_root).chainPath(base_dir)).array; } diff --git a/src/doc_reform/output/rgx.d b/src/doc_reform/output/rgx.d index 0d23f11..a15e709 100644 --- a/src/doc_reform/output/rgx.d +++ b/src/doc_reform/output/rgx.d @@ -2,7 +2,7 @@ regex: regular expressions used in sisu document parser +/ module doc_reform.output.rgx; -static template SiSUoutputRgxInit() { +static template DocReformOutputRgxInit() { import doc_reform.output.defaults; static struct Rgx { static newline = ctRegex!("\n", "mg"); diff --git a/src/doc_reform/output/source_sisupod.d b/src/doc_reform/output/source_sisupod.d index fa041fd..7d6b0fb 100644 --- a/src/doc_reform/output/source_sisupod.d +++ b/src/doc_reform/output/source_sisupod.d @@ -1,5 +1,5 @@ module doc_reform.output.source_sisupod; -template SiSUpod() { +template DocReformPod() { import doc_reform.output; import std.digest.sha, @@ -10,16 +10,16 @@ template SiSUpod() { import doc_reform.output.create_zip_file, doc_reform.output.xmls; - void SiSUpod(T)(T doc_matters) { + void DocReformPod(T)(T doc_matters) { debug(asserts) { // static assert(is(typeof(doc_matters) == tuple)); } - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; string pwd = doc_matters.env.pwd; auto src_path_info = doc_matters.src_path_info; auto pth_sisudoc_src = doc_matters.src_path_info; - auto pths_sisupod = SiSUpathsSisupods!()(doc_matters); - mixin SiSUlanguageCodes; + auto pths_sisupod = DocReformPathsSisupods!()(doc_matters); + mixin DocReformLanguageCodes; auto lang = Lang(); static auto rgx = Rgx(); assert (doc_matters.src.filename.match(rgx.src_fn)); diff --git a/src/doc_reform/output/sqlite.d b/src/doc_reform/output/sqlite.d index a765fd7..6fbb4a7 100644 --- a/src/doc_reform/output/sqlite.d +++ b/src/doc_reform/output/sqlite.d @@ -5,7 +5,7 @@ import std.conv : to; import d2sqlite3; import std.typecons : Nullable; -mixin SiSUoutputRgxInit; +mixin DocReformOutputRgxInit; static auto rgx = Rgx(); long _metadata_tid_lastrowid; template SQLiteHubBuildTablesAndPopulate() { @@ -13,7 +13,7 @@ template SQLiteHubBuildTablesAndPopulate() { D doc_abstraction, I doc_matters, ) { - auto pth_sqlite = SiSUpathsSQLite!()(doc_matters.sqlite.filename, doc_matters.output_path); + auto pth_sqlite = DocReformPathsSQLite!()(doc_matters.sqlite.filename, doc_matters.output_path); pth_sqlite.base.mkdirRecurse; auto db = Database(pth_sqlite.sqlite_file); template SQLiteDbStatementComposite() { @@ -26,7 +26,7 @@ template SQLiteHubBuildTablesAndPopulate() { string _db_statement; { if ((doc_matters.opt.action.sqlite_db_create)) { - auto pth_sqlite = SiSUpathsSQLite!()(doc_matters.sqlite.filename, doc_matters.output_path); + auto pth_sqlite = DocReformPathsSQLite!()(doc_matters.sqlite.filename, doc_matters.output_path); pth_sqlite.base.mkdirRecurse; _db_statement ~= SQLiteTablesReCreate!()(); SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE"); @@ -60,7 +60,7 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { D doc_abstraction, I doc_matters, ) { - auto pth_sqlite = SiSUpathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); + auto pth_sqlite = DocReformPathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); pth_sqlite.base.mkdirRecurse; auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { @@ -131,7 +131,7 @@ template SQLiteFormatAndLoadObject() { auto SQLiteFormatAndLoadObject(I)( I doc_matters, ) { - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; struct sqlite_format_and_load_objects { auto generic_munge_sanitize_text_for_search( string _txt, @@ -1216,7 +1216,7 @@ template SQLiteTablesCreate() { } if (opt_action.sqlite_db_create) { string _db_statement; - auto pth_sqlite = SiSUpathsSQLite!()(opt_action.sqlite_filename, opt_action.output_dir_set); + auto pth_sqlite = DocReformPathsSQLite!()(opt_action.sqlite_filename, opt_action.output_dir_set); pth_sqlite.base.mkdirRecurse; auto db = Database(pth_sqlite.sqlite_file); { @@ -1230,7 +1230,7 @@ template SQLiteDbDrop() { void SQLiteDbDrop(O)(O opt_action) { writeln("db drop"); if ((opt_action.sqlite_db_drop)) { - auto pth_sqlite = SiSUpathsSQLite!()(opt_action.sqlite_filename, opt_action.output_dir_set); + auto pth_sqlite = DocReformPathsSQLite!()(opt_action.sqlite_filename, opt_action.output_dir_set); writeln("remove(", pth_sqlite.sqlite_file, ")"); try { remove(pth_sqlite.sqlite_file); diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d index 8428204..f2f09fa 100644 --- a/src/doc_reform/output/xmls.d +++ b/src/doc_reform/output/xmls.d @@ -11,7 +11,7 @@ template outputXHTMLs() { doc_reform.output.create_zip_file, doc_reform.output.xmls, doc_reform.output.xmls_css; - mixin SiSUoutputRgxInit; + mixin DocReformOutputRgxInit; struct outputXHTMLs { static auto rgx = Rgx(); string div_delimit( @@ -114,10 +114,10 @@ template outputXHTMLs() { string _date_modified="Date"; string _language="en"; string _rights="Copyright: Copyright (C) year holder"; - string _generator="doc_reform [SiSU 7.1.8 of 2016w08/5 (2016-02-26)] (n*x and D)"; + string _generator="doc_reform [DocReform 7.1.8 of 2016w08/5 (2016-02-26)] (n*x and D)"; string _generator_home="http://www.sisudoc.org"; string o; - o = format(q"¶<!-- SiSU header metadata --> + o = format(q"¶<!-- DocReform header metadata --> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="dc.title" content="%s" /> <meta name="dc.author" content="%s" /> @@ -132,7 +132,7 @@ template outputXHTMLs() { <meta name="dc.rights" content="%s" /> <meta name="generator" content="%s" /> <link rel="generator" href="%s" /> - <!-- SiSU header metadata -->¶", + <!-- DocReform header metadata -->¶", _title, _author, _publisher, @@ -163,7 +163,7 @@ template outputXHTMLs() { .replaceAll( rgx.br_nl, ""); } else { - _locations = "<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">SiSU</a></p>\n<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">www.sisudoc.org</a></p>\n<p class=\"tiny_left\"><a href=\"http://git.sisudoc.org/gitweb/\">sources / git</a></p>"; + _locations = "<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">DocReform</a></p>\n<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">www.sisudoc.org</a></p>\n<p class=\"tiny_left\"><a href=\"http://git.sisudoc.org/gitweb/\">sources / git</a></p>"; } string o; o = format(q"¶<div class="flex-menu-option"> @@ -177,7 +177,7 @@ template outputXHTMLs() { M doc_matters, ) { string _action="http://www.sisudoc.org/cgi-bin/search.cgi"; - string _db="SiSU.7a.manual"; + string _db="DocReform.7a.manual"; string o; o = format(q"¶<div class="flex-menu-option"> <a name="search"></a> @@ -275,7 +275,7 @@ template outputXHTMLs() { <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="dc.title" content="%s" /> <meta name="dc.author" content="%s" /> - <meta name="dc.publisher" content="SiSU http://www.jus.uio.no/sisu (this copy)" /> + <meta name="dc.publisher" content="DocReform http://www.jus.uio.no/sisu (this copy)" /> <meta name="dc.date" content="year" /> <meta name="dc.date.created" content="year" /> <meta name="dc.date.issued" content="year" /> @@ -284,7 +284,7 @@ template outputXHTMLs() { <meta name="dc.date.modified" content="year" /> <meta name="dc.language" content="US" /> <meta name="dc.rights" content="Copyright: Copyright (C) year holder" /> - <meta name="generator" content="doc_reform [SiSU 7.1.8 of 2016w08/5 (2016-02-26)] (n*x and D)" /> + <meta name="generator" content="doc_reform [DocReform 7.1.8 of 2016w08/5 (2016-02-26)] (n*x and D)" /> <link rel="generator" href="http://www.sisudoc.org/" /> <link rel="shortcut icon" href="../_sisu/image/rb7.ico" /> <link rel="stylesheet" href="css/epub.css" type="text/css" id="main-css" /> diff --git a/src/doc_reform/output/xmls_css.d b/src/doc_reform/output/xmls_css.d index f3c0545..01c114d 100644 --- a/src/doc_reform/output/xmls_css.d +++ b/src/doc_reform/output/xmls_css.d @@ -2,8 +2,8 @@ default css settings +/ module doc_reform.output.xmls_css; -template SiSUcss() { - auto SiSUcss() { +template DocReformCss() { + auto DocReformCss() { string _css_html_seg=" *{ padding: 0px; @@ -2854,15 +2854,15 @@ template SiSUcss() { "; struct _css { auto html_seg_css() { - string _css = "/* SiSU css html seg stylesheet */\n" ~ _css_html_seg; + string _css = "/* DocReform css html seg stylesheet */\n" ~ _css_html_seg; return _css; } auto html_scroll_css() { - string _css = "/* SiSU css html scroll stylesheet */\n" ~ _css_html_scroll; + string _css = "/* DocReform css html scroll stylesheet */\n" ~ _css_html_scroll; return _css; } auto epub_css() { - string _css = "/* SiSU css epub stylesheet */\n" ~ _css_epub; + string _css = "/* DocReform css epub stylesheet */\n" ~ _css_epub; return _css; } } diff --git a/src/doc_reform/source/paths_source.d b/src/doc_reform/source/paths_source.d index dc2928f..1131b20 100644 --- a/src/doc_reform/source/paths_source.d +++ b/src/doc_reform/source/paths_source.d @@ -12,7 +12,7 @@ import std.array, std.conv : to; import doc_reform.meta.rgx; template PodManifest() { - mixin SiSUrgxInit; + mixin DocReformRgxInit; static auto rgx = Rgx(); auto PodManifest(P)( P _pth @@ -59,7 +59,7 @@ template PodManifest() { } } template PathMatters() { - mixin SiSUrgxInit; + mixin DocReformRgxInit; static auto rgx = Rgx(); auto PathMatters(O,E)( O _opt_actions, @@ -383,7 +383,7 @@ template PathMatters() { } } template ConfigFilePaths() { - mixin SiSUrgxInit; + mixin DocReformRgxInit; static auto rgx = Rgx(); auto ConfigFilePaths(M,E)( M _manifest, @@ -491,10 +491,10 @@ template ConfigFilePaths() { return ConfFilePaths(); } } -template SiSUpathsSRC() { - mixin SiSUrgxInit; +template DocReformPathsSRC() { + mixin DocReformRgxInit; static auto rgx = Rgx(); - auto SiSUpathsSRC(D,Fn)( + auto DocReformPathsSRC(D,Fn)( D _pwd, Fn _fn_src_and_path, ) { @@ -542,11 +542,11 @@ template SiSUpathsSRC() { } -template SiSUpathsSisupods() { - mixin SiSUrgxInit; +template DocReformPathsSisupods() { + mixin DocReformRgxInit; static auto rgx = Rgx(); string _suffix = ".zip"; - auto SiSUpathsSisupods(Dm)(Dm doc_matters) { + auto DocReformPathsSisupods(Dm)(Dm doc_matters) { string _base_dir_pod = (doc_matters.output_path.length > 0) ? doc_matters.output_path ~ "/sisupod" : "/sisupod"; diff --git a/src/doc_reform/source/read_source_files.d b/src/doc_reform/source/read_source_files.d index 294b081..374c113 100644 --- a/src/doc_reform/source/read_source_files.d +++ b/src/doc_reform/source/read_source_files.d @@ -4,7 +4,7 @@ - if master file scan for addional files to import/insert +/ module doc_reform.source.read_source_files; -static template SiSUrawMarkupContent() { +static template DocReformRawMarkupContent() { import doc_reform.meta.rgx; import @@ -12,7 +12,7 @@ static template SiSUrawMarkupContent() { doc_reform.source.paths_source, std.file, std.path; - mixin SiSUrgxInit; + mixin DocReformRgxInit; static auto rgx = Rgx(); string[] _images=[]; auto _extract_images(S)(S content_block) { @@ -24,7 +24,7 @@ static template SiSUrawMarkupContent() { return images_; } auto rawsrc = RawMarkupContent(); - auto SiSUrawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) { + auto DocReformRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) { auto _0_header_1_body_content_2_insert_filelist_tuple = rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); return _0_header_1_body_content_2_insert_filelist_tuple; @@ -157,7 +157,7 @@ static template SiSUrawMarkupContent() { char[][] markup_sourcefile_insert_content, string fn_src ) { - mixin SiSUrgxInitFlags; + mixin DocReformRgxInitFlags; char[][] contents_insert; auto type1 = flags_type_init; auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); @@ -255,7 +255,7 @@ static template SiSUrawMarkupContent() { string fn_src ) { import std.algorithm; - mixin SiSUrgxInitFlags; + mixin DocReformRgxInitFlags; char[][] contents; auto type = flags_type_init; auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); |