aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/default_paths.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-05-20 10:11:57 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-10-17 19:07:20 -0400
commit2e720c5cbf12b988265f014f569ac64b65038f95 (patch)
treecb4d3304012aa3c3c1cb3f0662828e4e68e2bec3 /org/default_paths.org
parentmeta_abstraction, ultimately cosmetic (diff)
0.7.1 odt (initial stub)doc-reform_v0.7.1
Diffstat (limited to 'org/default_paths.org')
-rw-r--r--org/default_paths.org74
1 files changed, 74 insertions, 0 deletions
diff --git a/org/default_paths.org b/org/default_paths.org
index eeed332..5e4f958 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -925,6 +925,7 @@ import doc_reform.meta.rgx;
<<template_paths_url>>
<<template_paths_html>>
<<template_paths_epub>>
+<<template_paths_odf>>
<<template_paths_sqlite>>
#+END_SRC
@@ -1223,6 +1224,79 @@ template DocReformPathsEPUB() {
}
#+END_SRC
+** _odt_ :odt:
+
+#+name: template_paths_odf
+#+BEGIN_SRC d
+template DocReformPathsODT() {
+ mixin DocReformRgxInit;
+ static auto rgx = Rgx();
+ auto DocReformPathsODT(M)(
+ M doc_matters,
+ ) {
+ auto out_pth = DocReformOutPaths!()( 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)
+ return asNormalizedPath((out_pth.output_base).chainPath(base_dir)).array;
+ }
+ // string base_filename() {
+ // return doc_matters.src.filename_base;
+ // }
+ string odt_file() {
+ return asNormalizedPath(base_pth.chainPath(doc_matters.src.filename_base ~ ".odt")).array;
+ }
+ string dirtop(string type) {
+ return (type == "zip")
+ ? "".chainPath("").array
+ : asNormalizedPath(base_pth.chainPath(doc_matters.src.filename_base)).array;
+ }
+ string mimetype(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("mimetype")).array;
+ }
+ string manifest_rdf(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("manifest.rdf")).array;
+ }
+ string settings_xml(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("settings.xml")).array;
+ }
+ string styles_xml(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("styles.xml")).array;
+ }
+ string image_dir(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("Pictures")).array;
+ }
+ string image(string image_fn_src, string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(image_dir(type).chainPath(image_fn_src)).array;
+ }
+ string content_xml(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("content.xml")).array;
+ }
+ string meta_inf_dir(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("META-INF")).array;
+ }
+ string manifest_xml(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(meta_inf_dir(type).chainPath("manifest.xml")).array;
+ }
+ string meta_xml(string type="fs") {
+ assert(type == "zip" || "fs");
+ return asNormalizedPath(dirtop(type).chainPath("meta.xml")).array;
+ }
+ }
+ return _PathsStruct();
+ }
+}
+#+END_SRC
+
** _sqlite_ :sqlite:
*** discrete