diff options
Diffstat (limited to 'src/sisudoc')
| -rw-r--r-- | src/sisudoc/io_out/latex.d | 8 | ||||
| -rw-r--r-- | src/sisudoc/io_out/odt.d | 3 | ||||
| -rw-r--r-- | src/sisudoc/io_out/source_pod.d | 55 | ||||
| -rw-r--r-- | src/sisudoc/io_out/sqlite.d | 28 | ||||
| -rw-r--r-- | src/sisudoc/meta/metadoc_from_src_functions.d | 1 |
5 files changed, 61 insertions, 34 deletions
diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d index 39dc932..8a1ae3e 100644 --- a/src/sisudoc/io_out/latex.d +++ b/src/sisudoc/io_out/latex.d @@ -679,7 +679,7 @@ template outputLaTeX() { \pagenumbering{alph} \setcounter{page}{1} \markboth{%s}{%s} -\br\linebreak Copyright {\begin{small}{\copyright\end{small}} %s \br\linebreak +\br\linebreak Copyright \begin{small}\copyright\end{small} %s \br\linebreak %s \clearpage┃"; _txt = format(_tex_para, @@ -1518,7 +1518,7 @@ template outputLaTeXstyStatic() { \usepackage{multicol} \setlength{\marginparsep}{4mm} \setlength{\marginparwidth}{8mm} -\usepackage[scaled]{dejavu} +\usepackage{dejavu} \renewcommand*\familydefault{\sfdefault} \usepackage{inconsolata} \usepackage[T1]{fontenc} @@ -1682,8 +1682,8 @@ template outputLaTeXstyStatic() { } \newcommand{\spaces}[1]{{\hspace*{#1ex}}} \newcommand{\s}{\hspace*{1ex}} -\renewcommand{\hardspace}{\hspace*{1ex}} -\newcommand{\-}{\hspace*{1ex}} +\newcommand{\hardspace}{\hspace*{1ex}} +\renewcommand{\-}{\hspace*{1ex}} \newcommand{\caret}{{\^{~}}} \newcommand{\pipe}{{\textbar}} \newcommand{\curlyOpen}{{} diff --git a/src/sisudoc/io_out/odt.d b/src/sisudoc/io_out/odt.d index 1d0e647..7a85bfb 100644 --- a/src/sisudoc/io_out/odt.d +++ b/src/sisudoc/io_out/odt.d @@ -892,7 +892,7 @@ template outputODT() { } return doc_odt; } - + ; string odt_tail() { string _odt_tail = format(q"┃<text:p text:style-name="P_normal">spine: <<text:a xl:type="simple" xl:href="https://www.sisudoc.org">www.sisudoc.org</text:a>> and <<text:a xl:type="simple" xl:href="https://www.sisudoc.org">www.sisudoc.org</text:a>></text:p> </office:text></office:body></office:document-content>┃",); @@ -2117,7 +2117,6 @@ template outputODT() { pth_odt.manifest_rdf("fs"); /+ (manifest.rdf) +/ pth_odt.settings_xml("fs"); /+ (settings.xml) +/ pth_odt.styles_xml("fs"); /+ (styles_xml) +/ - pth_odt.content_xml("fs"); pth_odt.manifest_xml("fs"); pth_odt.meta_xml("fs"); diff --git a/src/sisudoc/io_out/source_pod.d b/src/sisudoc/io_out/source_pod.d index 138f105..b015a04 100644 --- a/src/sisudoc/io_out/source_pod.d +++ b/src/sisudoc/io_out/source_pod.d @@ -195,29 +195,38 @@ template spinePod() { } } { // bundle abstraction .ssp file (only for --pod2) if (doc_matters.opt.action.pod2) { - import sisudoc.io_out.paths_output; - auto out_pth = spineOutPaths!()(doc_matters.output_path, doc_matters.src.language); - string abstraction_dir = ((out_pth.output_base.chainPath("abstraction")).asNormalizedPath).array; - string ssp_filename = doc_matters.src.doc_uid_out ~ ".ssp"; - string fn_src_in = ((abstraction_dir.chainPath(ssp_filename)).asNormalizedPath).array.to!string; - auto fn_src_out_pod_zip_base - = pths_pod.abstraction_root(doc_matters.src.filename).zpod.to!string - ~ "/" ~ ssp_filename; - auto fn_src_out_filesystem - = pths_pod.abstraction_root(doc_matters.src.filename).filesystem_open_zpod.to!string - ~ "/" ~ ssp_filename; - if (exists(fn_src_in)) { - debug(io) { writeln("(io debug) src out found: ", fn_src_in); } - { // take DIGEST write to pod file digests.txt - auto data = (cast(byte[]) (fn_src_in).read); - _digests[doc_matters.src.language]["ssp"] ~= data.sha256Of.toHexString - ~ "::" ~ data.length.to!string ~ " - " ~ ssp_filename ~ "\n"; - } - fn_src_in.copy(fn_src_out_filesystem); - zip = podArchive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip); - } else { - if (doc_matters.opt.action.debug_do_pod && doc_matters.opt.action.vox_gt_2) { - writeln("WARNING (io) src out NOT found (abstraction): ", fn_src_in); + if (doc_matters.src.language == doc_matters.pod.manifest_list_of_languages[$-1]) { // wait until all language versions of .ssp generated + import sisudoc.io_out.paths_output; + /+ doc_uid_out for any language follows the same pattern, differing + only in the trailing ".{lng}". Strip the current language to + reuse the base across all languages. +/ + string _doc_uid_base + = doc_matters.src.doc_uid_out[0 .. $ - doc_matters.src.lng.length]; + foreach (_lang; doc_matters.pod.manifest_list_of_languages) { // do for all language versions + auto out_pth_lng = spineOutPaths!()(doc_matters.output_path, _lang); + string abstraction_dir = ((out_pth_lng.output_base.chainPath("abstraction")).asNormalizedPath).array; + string ssp_filename = _doc_uid_base ~ _lang ~ ".ssp"; + string fn_src_in = ((abstraction_dir.chainPath(ssp_filename)).asNormalizedPath).array.to!string; + auto fn_src_out_pod_zip_base + = pths_pod.abstraction_root(doc_matters.src.filename).zpod.to!string + ~ "/" ~ ssp_filename; + auto fn_src_out_filesystem + = pths_pod.abstraction_root(doc_matters.src.filename).filesystem_open_zpod.to!string + ~ "/" ~ ssp_filename; + if (exists(fn_src_in)) { + debug(io) { writeln("(io debug) src out found: ", fn_src_in); } + { // take DIGEST write to pod file digests.txt + auto data = (cast(byte[]) (fn_src_in).read); + _digests[_lang]["ssp"] ~= data.sha256Of.toHexString + ~ "::" ~ data.length.to!string ~ " - " ~ ssp_filename ~ "\n"; + } + fn_src_in.copy(fn_src_out_filesystem); + zip = podArchive("file_path_text", fn_src_in, fn_src_out_pod_zip_base, zip); + } else { + if (doc_matters.opt.action.debug_do_pod && doc_matters.opt.action.vox_gt_2) { + writeln("WARNING (io) src out NOT found (abstraction): ", fn_src_in); + } + } } } } diff --git a/src/sisudoc/io_out/sqlite.d b/src/sisudoc/io_out/sqlite.d index b5c0f47..4ce5e0d 100644 --- a/src/sisudoc/io_out/sqlite.d +++ b/src/sisudoc/io_out/sqlite.d @@ -71,7 +71,12 @@ template SQLiteHubBuildTablesAndPopulate() { } else { try { pth_sqlite.base.mkdirRecurse; - } catch (FileException ex) { } + } catch (FileException ex) { + stderr.writeln("FATAL: cannot create --sqlite-db-path directory: ", pth_sqlite.base); + stderr.writeln(" (", ex.msg, ")"); + import core.runtime; + core.runtime.Runtime.terminate(); + } } template SQLiteDbStatementComposite() { void SQLiteDbStatementComposite(Db,D)( @@ -85,7 +90,12 @@ template SQLiteHubBuildTablesAndPopulate() { } else { try { pth_sqlite.base.mkdirRecurse; - } catch (FileException ex) { } + } catch (FileException ex) { + stderr.writeln("FATAL: cannot create --sqlite-db-path directory: ", pth_sqlite.base); + stderr.writeln(" (", ex.msg, ")"); + import core.runtime; + core.runtime.Runtime.terminate(); + } } _db_statement ~= SQLiteTablesReCreate!()(); SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE"); @@ -154,7 +164,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { } else { try { pth_sqlite.base.mkdirRecurse; - } catch (FileException ex) { } + } catch (FileException ex) { + stderr.writeln("FATAL: cannot create --sqlite-db-path directory: ", pth_sqlite.base); + stderr.writeln(" (", ex.msg, ")"); + import core.runtime; + core.runtime.Runtime.terminate(); + } } auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { @@ -1671,7 +1686,12 @@ template SQLiteTablesCreate() { } else { try { pth_sqlite.base.mkdirRecurse; - } catch (FileException ex) { } + } catch (FileException ex) { + stderr.writeln("FATAL: cannot create --sqlite-db-path directory: ", pth_sqlite.base); + stderr.writeln(" (", ex.msg, ")"); + import core.runtime; + core.runtime.Runtime.terminate(); + } } auto db = Database(pth_sqlite.sqlite_file); { diff --git a/src/sisudoc/meta/metadoc_from_src_functions.d b/src/sisudoc/meta/metadoc_from_src_functions.d index e633ca1..bb3cd4e 100644 --- a/src/sisudoc/meta/metadoc_from_src_functions.d +++ b/src/sisudoc/meta/metadoc_from_src_functions.d @@ -1929,7 +1929,6 @@ template docAbstractionFunctions() { return ret; } // ↑ - table - @system ST_flow_block_flag_line_empty flow_block_flag_line_empty_(B,CMM,Ts)( char[] line, string[string] an_object, |
