aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/defaults.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-04-20 13:57:03 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit9cf470e69b2d579701ee607f796de612dc600565 (patch)
treeff16c8b547767e4b441655df39511c1757f819c3 /src/sdp/defaults.d
parentsection keys sequence (diff)
0.14.0 reorganized files, and paths
Diffstat (limited to 'src/sdp/defaults.d')
-rw-r--r--src/sdp/defaults.d186
1 files changed, 0 insertions, 186 deletions
diff --git a/src/sdp/defaults.d b/src/sdp/defaults.d
index 537b4ba..bbfd8d8 100644
--- a/src/sdp/defaults.d
+++ b/src/sdp/defaults.d
@@ -2,192 +2,6 @@
default settings
+/
-template SiSUpaths() {
- struct DirPaths {
- string base_filename(string fn_src) {
- return baseName(stripExtension(fn_src));
- }
- }
- struct SiSUpodPaths {
- string base_filename(string fn_src) {
- return baseName(stripExtension(fn_src));
- }
- string sisupod_filename(string fn_src) {
- return "sisupod".chainPath(base_filename(fn_src) ~ ".zip").array;
- }
- string base(string fn_src) {
- return "sisupod".chainPath(base_filename(fn_src)).array;
- }
- }
- struct SiSUpodPathsZipped {
- auto spod_pths = SiSUpodPaths();
- string base_filename(string fn_src) {
- return spod_pths.base_filename(fn_src);
- }
- string sisupod_filename(string fn_src) {
- return spod_pths.sisupod_filename(fn_src);
- }
- string base(string fn_src) {
- return spod_pths.base(fn_src);
- }
- auto doc_root(string fn_src) {
- return "doc";
- }
- auto doc(string fn_src) {
- return doc_root(fn_src);
- }
- auto doc_lng(string fn_src, string lng) {
- return doc_root(fn_src).chainPath(lng).array;
- }
- auto conf(string fn_src) {
- return doc_root(fn_src).chainPath("_sisu").array;
- }
- auto image(string fn_src) {
- return conf(fn_src).chainPath("image").array;
- }
- auto css(string fn_src) {
- return conf(fn_src).chainPath("css").array;
- }
- auto fn_doc(string fn_src, string lng) {
- return (doc_lng(fn_src, lng)).chainPath(baseName(fn_src)).array;
- }
- auto fn_doc_insert(string fn_src, string fn_insert, string lng) {
- return (doc_lng(fn_src, lng)).chainPath(baseName(fn_insert)).array;
- }
- }
- struct SiSUpodPathsFilesystemArchive {
- auto spod_pths = SiSUpodPaths();
- string base_filename(string fn_src) {
- return spod_pths.base_filename(fn_src);
- }
- string sisupod_filename(string fn_src) {
- return spod_pths.sisupod_filename(fn_src);
- }
- string base(string fn_src) {
- return spod_pths.base(fn_src);
- }
- auto doc_root(string fn_src) {
- return base(fn_src).chainPath("doc").array;
- }
- auto doc(string fn_src) {
- return doc_root(fn_src);
- }
- auto doc_lng(string fn_src, string lng) {
- return doc_root(fn_src).chainPath(lng).array;
- }
- auto conf(string fn_src) {
- return doc_root(fn_src).chainPath("_sisu").array;
- }
- auto image(string fn_src) {
- return conf(fn_src).chainPath("image").array;
- }
- auto css(string fn_src) {
- return conf(fn_src).chainPath("css").array;
- }
- auto fn_doc(string fn_src, string lng) {
- return (doc_lng(fn_src, lng)).chainPath(baseName(fn_src)).array;
- }
- auto fn_doc_insert(string fn_src, string fn_insert, string lng) {
- return (doc_lng(fn_src, lng)).chainPath(baseName(fn_insert)).array;
- }
- }
- struct HtmlPaths {
- string base_filename(string fn_src) {
- return baseName(stripExtension(fn_src));
- }
- string base() {
- return "en".chainPath("html").array;
- }
- string seg(string fn_src) {
- return base.chainPath(base_filename(fn_src)).array;
- }
- string fn_scroll(string fn_src) {
- return base.chainPath(base_filename(fn_src) ~ ".html").array;
- }
- string fn_seg(string fn_src, string seg_filename) {
- return seg(fn_src).chainPath(seg_filename ~ ".html").array;
- }
- }
- struct Epub3paths {
- string dirtop() {
- return "".chainPath("").array;
- }
- string base_filename(string fn_src) {
- return baseName(stripExtension(fn_src));
- }
- string base() {
- return "en".chainPath("epub3").array;
- }
- string epub_file(string fn_src) {
- return base.chainPath(base_filename(fn_src) ~ ".epub").array;
- }
- string docdir(string fn_src) {
- return base.chainPath(base_filename(fn_src)).array;
- }
- string doc_meta_inf(string fn_src) {
- return dirtop.chainPath("META-INF").array;
- }
- string doc_oebps(string fn_src) {
- return dirtop.chainPath("OEBPS").array;
- }
- string doc_oebps_css(string fn_src) {
- return doc_oebps(fn_src).chainPath("css").array;
- }
- string doc_oebps_image(string fn_src) {
- return doc_oebps(fn_src).chainPath("image").array;
- }
- string fn_mimetypes(string fn_src) {
- return dirtop.chainPath("mimetypes").array;
- }
- string fn_dmi_container_xml(string fn_src) {
- return doc_meta_inf(fn_src).chainPath("container.xml").array;
- }
- string fn_oebps_toc_nav_xhtml(string fn_src) {
- return doc_oebps(fn_src).chainPath("toc_nav.xhtml").array;
- }
- string fn_oebps_toc_ncx(string fn_src) {
- return doc_oebps(fn_src).chainPath("toc.ncx").array;
- }
- string fn_oebps_content_opf(string fn_src) {
- return doc_oebps(fn_src).chainPath("content.opf").array;
- }
- string fn_oebps_content_xhtml(string fn_src, string seg_filename) {
- return doc_oebps(fn_src).chainPath(seg_filename ~ ".xhtml").array;
- }
- debug(epub_output) {
- string dbg_doc_meta_inf(string fn_src) {
- return docdir(fn_src).chainPath("META-INF").array;
- }
- string dbg_doc_oebps(string fn_src) {
- return docdir(fn_src).chainPath("OEBPS").array;
- }
- string dbg_doc_oebps_css(string fn_src) {
- return doc_oebps(fn_src).chainPath("css").array;
- }
- string dbg_doc_oebps_image(string fn_src) {
- return doc_oebps(fn_src).chainPath("image").array;
- }
- string dbg_fn_mimetypes(string fn_src) {
- return docdir(fn_src).chainPath("mimetypes").array;
- }
- string dbg_fn_dmi_container_xml(string fn_src) {
- return doc_meta_inf(fn_src).chainPath("container.xml").array;
- }
- string dbg_fn_oebps_toc_nav_xhtml(string fn_src) {
- return doc_oebps(fn_src).chainPath("toc_nav.xhtml").array;
- }
- string dbg_fn_oebps_toc_ncx(string fn_src) {
- return doc_oebps(fn_src).chainPath("toc.ncx").array;
- }
- string dbg_fn_oebps_content_opf(string fn_src) {
- return doc_oebps(fn_src).chainPath("content.opf").array;
- }
- string dbg_fn_oebps_content_xhtml(string fn_src, string seg_filename) {
- return doc_oebps(fn_src).chainPath(seg_filename ~ ".xhtml").array;
- }
- }
- }
-}
template InternalMarkup() {
struct InlineMarkup {
auto en_a_o = "【"; auto en_a_c = "】"; // endnote en_a_o: '~{'; en_a_c: '}~';