diff options
Diffstat (limited to 'org/default_paths.org')
-rw-r--r-- | org/default_paths.org | 126 |
1 files changed, 103 insertions, 23 deletions
diff --git a/org/default_paths.org b/org/default_paths.org index 3cdb909..f73a9ef 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -9,7 +9,7 @@ #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code #+PROPERTY: header-args+ :noweb yes -#+PROPERTY: header-args+ :results no +#+PROPERTY: header-args+ :results output none #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no #+PROPERTY: header-args+ :mkdirp yes @@ -31,16 +31,14 @@ +/ module sisudoc.io_in.paths_source; @safe: -import - std.array, - std.file, - std.path, - std.regex, - std.stdio, - std.conv : to; -import - sisudoc.meta.defaults, - sisudoc.meta.rgx_files; +import std.array; +import std.file; +import std.path; +import std.regex; +import std.stdio; +import std.conv : to; +import sisudoc.meta.defaults; +import sisudoc.meta.rgx_files; <<template_paths_src_0>> <<template_paths_src_1>> <<template_paths_src_2>> @@ -80,8 +78,10 @@ template PodManifest() { _manifest_path = m.captures["podpath"]; } } else { - if (_opt_action.vox_gt1 || _opt_action.debug_do) { - writeln("WARNING, src is not a pod, issue with manifest_path: ", _pth); // remove? unless can distinguish pod + if (_opt_action.vox_gt_3 || _opt_action.debug_do) { + if (exists(_pth) == 0 && (_pth.isFile)) { + writeln("WARNING, src file is not .sst or .ssm (nor is it a pod directory): ", _pth); // remove? unless can distinguish pod + } } _manifest_path = ""; } @@ -98,7 +98,7 @@ template PodManifest() { _k = pod_manifest_path; } if (exists(_k)==0) { - writeln("ERROR >> Processing Skipped! Manifest not found: ", _k); + // writeln("ERROR >> Processing Skipped! Manifest not found: ", _k); _k = null; } return _k; @@ -974,13 +974,11 @@ template spinePathsPods() { +/ module sisudoc.io_out.paths_output; @safe: -import - std.array, - std.path, - std.regex, - std.stdio; -import - sisudoc.meta.rgx_files; +import std.array; +import std.path; +import std.regex; +import std.stdio; +import sisudoc.meta.rgx_files; <<template_paths_out_0>> <<template_paths_out_1>> <<template_paths_url>> @@ -995,6 +993,8 @@ import <<template_paths_sqlite_0>> <<template_paths_sqlite_1>> <<template_paths_sqlite_2>> +<<template_paths_text>> +<<template_paths_skel>> #+END_SRC ** shared out path, base directory :out: @@ -1459,7 +1459,7 @@ template spinePathsODT() { auto spinePathsODT(M)( M doc_matters, ) { - auto out_pth = spineOutPaths!()( doc_matters.output_path, doc_matters.src.language); + auto out_pth = spineOutPaths!()(doc_matters.output_path, doc_matters.src.language); string base_dir = "odf"; struct _PathsStruct { string base_pth() { // dir will contain odt document file (also debug file tree) @@ -1520,6 +1520,7 @@ template spinePathsODT() { #+END_SRC ** _latex_ :latex: +*** latex #+NAME: template_paths_latex #+BEGIN_SRC d @@ -1569,6 +1570,8 @@ template spinePathsLaTeX() { } #+END_SRC +*** latex_sty + #+NAME: template_paths_latex_sty #+BEGIN_SRC d template spinePathsLaTeXsty() { @@ -1687,7 +1690,84 @@ template spinePathsSQLite() { } #+END_SRC -* document header including copyright & license +** _text_ :text: + +#+NAME: template_paths_text +#+BEGIN_SRC d +template spinePathsText() { + import std.conv; + auto spinePathsText(M)( + M doc_matters, + ) { + auto out_pth = spineOutPaths!()(doc_matters.output_path, doc_matters.src.language); + string base_dir = "text"; + struct _PathsStruct { + string base_pth() { + return (((out_pth.output_base).chainPath(base_dir)).asNormalizedPath).array; + } + string base_filename(string fn_src) { + return fn_src.baseName.stripExtension; + } + string text_file() { + return ((base_pth.chainPath(doc_matters.src.doc_uid_out ~ ".txt")).asNormalizedPath).array; + } + string dirtop() { + return "".chainPath("").array; + } + } + return _PathsStruct(); + } +} +#+END_SRC + +** _skel_ :skel: + +#+NAME: template_paths_skel +#+BEGIN_SRC d +template spinePathsSkel() { + import std.conv; + auto spinePathsSkel(M)( + M doc_matters, + ) { + auto out_pth = spineOutPaths!()(doc_matters.output_path, doc_matters.src.language); + string base_dir = "skel"; + struct _PathsStruct { + string base_pth() { + return (((out_pth.output_base).chainPath(base_dir)).asNormalizedPath).array; + } + string base_filename(string fn_src) { + return fn_src.baseName.stripExtension; + } + string skel_file() { + return ((base_pth.chainPath(doc_matters.src.doc_uid_out ~ ".skel")).asNormalizedPath).array; + } + string dirtop() { + return "".chainPath("").array; + } + } + return _PathsStruct(); + } +} +#+END_SRC + +* org includes +** project version + +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> +#+END_SRC + +** year + +#+NAME: year +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:year()>> +#+END_SRC + +** document header including copyright & license #+NAME: doc_header_including_copyright_and_license #+HEADER: :noweb yes |