aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-05-09 13:01:06 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit60d6073bcfc4fa91253428094813de0dac41a2b4 (patch)
treecef8e223469724d9e42dea81d6ded5ffc75a9be2
parentmodules, collective imports (diff)
0.16.0 files/modules re-arrangeddoc-reform_v0.0.16
-rw-r--r--makefile3
-rw-r--r--maker.org26
-rw-r--r--org/ao_conf_make_meta.org40
-rw-r--r--org/ao_debugs.org11
-rw-r--r--org/ao_doc_abstraction.org33
-rw-r--r--org/ao_read_source_files.org137
-rw-r--r--org/compile_time_info.org4
-rw-r--r--org/default_misc.org12
-rw-r--r--org/default_paths.org12
-rw-r--r--org/default_regex.org12
-rw-r--r--org/imports.org79
-rw-r--r--org/output_hub.org31
-rw-r--r--org/output_sisupod.org30
-rw-r--r--org/output_xmls.org40
-rw-r--r--org/output_xmls_css.org4
-rw-r--r--org/output_zip.org4
-rw-r--r--org/sdp.org58
-rw-r--r--src/sdp/ao/abstract_doc_source.d (renamed from src/sdp/ao_abstract_doc_source.d)27
-rw-r--r--src/sdp/ao/abstraction.d (renamed from src/sdp/abstraction.d)20
-rw-r--r--src/sdp/ao/abstraction_summary.d (renamed from src/sdp/abstraction_summary.d)24
-rw-r--r--src/sdp/ao/conf_make_meta.d (renamed from src/sdp/ao_conf_make_meta.d)14
-rw-r--r--src/sdp/ao/conf_make_meta_native.d (renamed from src/sdp/ao_conf_make_meta_native.d)10
-rw-r--r--src/sdp/ao/conf_make_meta_sdlang.d (renamed from src/sdp/ao_conf_make_meta_sdlang.d)10
-rw-r--r--src/sdp/ao/defaults.d (renamed from src/sdp/ao_defaults.d)4
-rw-r--r--src/sdp/ao/doc_debugs.d (renamed from src/sdp/ao_doc_debugs.d)9
-rw-r--r--src/sdp/ao/object_setter.d (renamed from src/sdp/ao_object_setter.d)2
-rw-r--r--src/sdp/ao/package.d17
-rw-r--r--src/sdp/ao/read_config_files.d (renamed from src/sdp/ao_read_config_files.d)57
-rw-r--r--src/sdp/ao/read_source_files.d (renamed from src/sdp/ao_read_source_files.d)28
-rw-r--r--src/sdp/ao/rgx.d (renamed from src/sdp/ao_rgx.d)4
-rw-r--r--src/sdp/conf/compile_time_info.d (renamed from src/sdp/compile_time_info.d)2
-rw-r--r--src/sdp/imports_for_ao.d41
-rw-r--r--src/sdp/imports_for_output.d28
-rw-r--r--src/sdp/output/create_zip_file.d (renamed from src/sdp/create_zip_file.d)2
-rw-r--r--src/sdp/output/defaults.d (renamed from src/sdp/defaults.d)2
-rw-r--r--src/sdp/output/epub3.d (renamed from src/sdp/output_epub3.d)30
-rw-r--r--src/sdp/output/html.d (renamed from src/sdp/output_html.d)30
-rw-r--r--src/sdp/output/hub.d (renamed from src/sdp/output_hub.d)29
-rw-r--r--src/sdp/output/package.d20
-rw-r--r--src/sdp/output/paths_output.d (renamed from src/sdp/paths_output.d)4
-rw-r--r--src/sdp/output/paths_source.d (renamed from src/sdp/paths_source.d)4
-rw-r--r--src/sdp/output/rgx.d (renamed from src/sdp/output_rgx.d)4
-rw-r--r--src/sdp/output/source_sisupod.d (renamed from src/sdp/source_sisupod.d)28
-rw-r--r--src/sdp/output/xmls.d (renamed from src/sdp/output_xmls.d)30
-rw-r--r--src/sdp/output/xmls_css.d (renamed from src/sdp/output_xmls_css.d)2
-rwxr-xr-xsrc/sdp/sisu_d_parser.d (renamed from src/sisu_d_parser.d)22
-rw-r--r--views/version.txt2
47 files changed, 413 insertions, 629 deletions
diff --git a/makefile b/makefile
index 2f63b04..f4225eb 100644
--- a/makefile
+++ b/makefile
@@ -154,6 +154,9 @@ release_rdmd: distclean tangle $(PRG_SRCDIR)/$(PRG_SRC)
$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)
skel:
+ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/ao; \
+ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/conf; \
+ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/output; \
mkdir -p $(PRG_SRCDIR)/$(PRG_NAME); \
mkdir -p $(PRG_BINDIR);
diff --git a/maker.org b/maker.org
index ff7509d..62fa07d 100644
--- a/maker.org
+++ b/maker.org
@@ -379,6 +379,9 @@ release_rdmd: distclean tangle $(PRG_SRCDIR)/$(PRG_SRC)
#+BEGIN_SRC makefile :tangle makefile
skel:
+ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/ao; \
+ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/conf; \
+ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/output; \
mkdir -p $(PRG_SRCDIR)/$(PRG_NAME); \
mkdir -p $(PRG_BINDIR);
@@ -845,17 +848,17 @@ time dub --compiler=ldc2 -v --force
*** dmd [#A] :dmd:
#+BEGIN_SRC sh
-dmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc -of./bin/sdp ./src/sisu_d_parser.d
-dmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sisu_d_parser.d
-dmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sisu_d_parser.d
+dmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc -of./bin/sdp ./src/sdp/sisu_d_parser.d
+dmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sdp/sisu_d_parser.d
+dmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sdp/sisu_d_parser.d
#+END_SRC
*** ldc2 [#A] :ldc2:
#+BEGIN_SRC sh
-ldc2 -de -w -J./views -I./src/sdp -unittest -d-debug=checkdoc -d-debug=summary -d-debug=dumpdoc -of=./bin/sdp ./src/sisu_d_parser.d
-ldc2 -de -w -J./views -I./src/sdp -of=./bin/sdp ./src/sisu_d_parser.d
-ldc2 -de -w -J./views -I./src/sdp -O4 -release -of=./bin/sdp ./src/sisu_d_parser.d
+ldc2 -de -w -J./views -I./src/sdp -unittest -d-debug=checkdoc -d-debug=summary -d-debug=dumpdoc -of=./bin/sdp ./src/sdp/sisu_d_parser.d
+ldc2 -de -w -J./views -I./src/sdp -of=./bin/sdp ./src/sdp/sisu_d_parser.d
+ldc2 -de -w -J./views -I./src/sdp -O4 -release -of=./bin/sdp ./src/sdp/sisu_d_parser.d
#+END_SRC
*** gdc (not done) [#F] :gdc:
@@ -877,15 +880,15 @@ re: dmd "one can easily get 2x (and even more) speedup by simply switching to gd
flags similar to dmd
#+BEGIN_SRC sh
-rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc -of./bin/sdp ./src/sisu_d_parser.d
-rdmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sisu_d_parser.d
-rdmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sisu_d_parser.d
+rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc -of./bin/sdp ./src/sdp/sisu_d_parser.d
+rdmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sdp/sisu_d_parser.d
+rdmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sdp/sisu_d_parser.d
#dmd
-rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sisu_d_parser.d
+rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sdp/sisu_d_parser.d
#ldc
-rdmd -de -w -J./views -I./src/sdp -unittest -d-debug=checkdoc -d-debug=summary -d-debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sisu_d_parser.d
+rdmd -de -w -J./views -I./src/sdp -unittest -d-debug=checkdoc -d-debug=summary -d-debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sdp/sisu_d_parser.d
#+END_SRC
*** dub [#A] :dub:
@@ -979,6 +982,7 @@ debugVersions "checkdoc"
debugVersions "code"
debugVersions "comment"
debugVersions "configfile"
+debugVersions "dom"
debugVersions "dumpdoc"
debugVersions "endnotes"
debugVersions "endnotes_build"
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org
index 471d233..f66b597 100644
--- a/org/ao_conf_make_meta.org
+++ b/org/ao_conf_make_meta.org
@@ -16,7 +16,7 @@
* 0. Header Hub :module:sdp:ao_conf_make_meta:
** module template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/conf_make_meta.d
/++
extract native/orig header return associative array<BR>
@@ -27,9 +27,9 @@
converting the metadata and make instructions to a common json format used by
program internally. Moved to associative array.
+/
-module sdp.ao_conf_make_meta;
+module sdp.ao.conf_make_meta;
template SiSUheaderExtractHub() {
- private import
+ import
std.exception,
std.regex,
std.stdio,
@@ -37,11 +37,11 @@ template SiSUheaderExtractHub() {
std.typecons,
std.utf,
std.conv : to;
- private import sdlang;
- private import
- sdp.ao_rgx,
- sdp.ao_conf_make_meta_native,
- sdp.ao_conf_make_meta_sdlang;
+ import sdlang;
+ import
+ sdp.ao.conf_make_meta_native,
+ sdp.ao.conf_make_meta_sdlang,
+ sdp.ao.rgx;
mixin SiSUrgxInit;
mixin SiSUheaderExtractNative;
mixin SiSUheaderExtractSDLang;
@@ -70,14 +70,14 @@ template SiSUheaderExtractHub() {
** module template
** extract sdlang header
-#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta_sdlang.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/conf_make_meta_sdlang.d
/++
sdlang headers<BR>
extract sdlang header return sdlang
+/
-module sdp.ao_conf_make_meta_sdlang;
+module sdp.ao.conf_make_meta_sdlang;
template SiSUheaderExtractSDLang() {
- private import
+ import
std.exception,
std.regex,
std.stdio,
@@ -86,9 +86,9 @@ template SiSUheaderExtractSDLang() {
std.typecons,
std.utf,
std.conv : to;
- private import
- sdp.ao_rgx,
- sdp.ao_defaults;
+ import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
struct HeaderExtractSDL {
mixin SiSUregisters;
mixin SiSUrgxInit;
@@ -270,14 +270,14 @@ private auto headerSDLangToAA(Hs,Ma)(Hs header_sdlang_src, Ma conf_doc_make_aa)
* B. header native :module:sdp:ao_conf_make_meta_native:
** Header Native :header:native:markup_header_extract_native:
-#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta_native.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/conf_make_meta_native.d
/++
native headers using<br>@title:<BR>:subtitle:<BR>type tags<BR>
extract native/orig header return associative array
+/
-module sdp.ao_conf_make_meta_native;
+module sdp.ao.conf_make_meta_native;
template SiSUheaderExtractNative() {
- private import
+ import
std.exception,
std.regex,
std.stdio,
@@ -286,9 +286,9 @@ template SiSUheaderExtractNative() {
std.typecons,
std.utf,
std.conv : to;
- private import
- sdp.ao_rgx,
- sdp.ao_defaults;
+ import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
struct HeaderDocMetadataAndMakeNativeToAA {
mixin SiSUregisters;
mixin SiSUrgxInitFlags;
diff --git a/org/ao_debugs.org b/org/ao_debugs.org
index 838d7cf..52172fb 100644
--- a/org/ao_debugs.org
+++ b/org/ao_debugs.org
@@ -16,11 +16,11 @@
* 1. abstraction debugs :module:sdp:ao_doc_debugs:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_doc_debugs.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/doc_debugs.d
/++
output debugs
+/
-module sdp.ao_doc_debugs;
+module sdp.ao.doc_debugs;
template SiSUdebugs() {
<<debug_imports>>
auto SiSUdebugs(S,T)(
@@ -46,9 +46,9 @@ template SiSUdebugs() {
#+name: debug_imports
#+BEGIN_SRC d
import
- sdp.ao_defaults,
- sdp.ao_rgx;
-private import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
+import
std.algorithm,
std.array,
std.container,
@@ -62,7 +62,6 @@ private import
std.string,
std.traits,
std.typecons,
- std.uni,
std.utf,
std.conv : to;
#+END_SRC
diff --git a/org/ao_doc_abstraction.org b/org/ao_doc_abstraction.org
index 75ed2a6..cd178aa 100644
--- a/org/ao_doc_abstraction.org
+++ b/org/ao_doc_abstraction.org
@@ -107,13 +107,13 @@ Process markup document, create document abstraction.
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_abstract_doc_source.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/abstract_doc_source.d
/++
document abstraction:
abstraction of sisu markup for downstream processing
ao_abstract_doc_source.d
+/
-module sdp.ao_abstract_doc_source;
+module sdp.ao.abstract_doc_source;
template SiSUdocAbstraction() {
/+ ↓ abstraction imports +/
<<abs_top_imports>>
@@ -233,30 +233,17 @@ template SiSUdocAbstraction() {
#+name: abs_top_imports
#+BEGIN_SRC d
+import sdp.ao;
import
- sdp.ao_defaults,
- sdp.ao_object_setter,
- sdp.ao_rgx,
- sdp.output_hub;
-private import
std.algorithm,
- std.array,
std.container,
- std.exception,
std.file,
- std.getopt,
std.json,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
+ std.path;
+import
+ sdp.ao.defaults,
+ sdp.ao.object_setter,
+ sdp.ao.rgx;
#+END_SRC
*** mixins :mixins:
@@ -6872,13 +6859,13 @@ set abstracted objects for downstream processing
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_object_setter.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/object_setter.d
/++
object setter:
setting of sisu objects for downstream processing
ao_object_setter.d
+/
-module sdp.ao_object_setter;
+module sdp.ao.object_setter;
template ObjectSetter() {
/+ structs +/
<<ao_structs_init>>
diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org
index 9b9e863..b53fdc5 100644
--- a/org/ao_read_source_files.org
+++ b/org/ao_read_source_files.org
@@ -13,65 +13,77 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
[[./sdp.org][sdp]] [[./][org/]]
+* imports
+
+#+name: imports_std
+#+BEGIN_SRC d
+import
+ sdp.ao,
+ std.file,
+ std.path;
+#+END_SRC
+
* 1. get config file (read in) :module:sdp:ao_read_config_files:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_read_config_files.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/read_config_files.d
/++
read configuration files<BR>
- read config files<BR>
ao_config_files.d
+/
-module sdp.ao_read_config_files;
-template ConfigIn() {
- <<imports_std>>
- import std.file;
- <<ao_config_file_in>>
-}
+module sdp.ao.read_config_files;
+<<ao_config_file_in>>
+<<ao_config_file_sdl>>
+<<ao_config_file_hub>>
#+END_SRC
-** read config file, (conf.sdl & sisu_document_make) :file:config:
+** 1. read config file, (conf.sdl & sisu_document_make) :file:config:
#+name: ao_config_file_in
#+BEGIN_SRC d
-final string ConfigIn(C,E)(C conf_sdl, E env) {
- string dot_pwd = chainPath(to!string(env["pwd"]), ".sisu").array;
- string underscore_pwd = chainPath(to!string(env["pwd"]), "_sisu").array;
- string dot_home = chainPath(to!string(env["home"]), ".sisu").array;
- string[] possible_config_path_locations = [
- dot_pwd,
- underscore_pwd,
- dot_home,
- "/etc/sisu"
- ];
- string config_file_str;
- foreach(pth; possible_config_path_locations) {
- auto conf_file = format(
- "%s/%s",
- pth,
- conf_sdl,
- );
- try {
- if (exists(conf_file)) {
- debug(configfile) {
- writeln(conf_file);
+template ConfigIn() {
+ <<imports_std>>
+ final string ConfigIn(C,E)(C conf_sdl, E env) {
+ string dot_pwd = chainPath(to!string(env["pwd"]), ".sisu").array;
+ string underscore_pwd = chainPath(to!string(env["pwd"]), "_sisu").array;
+ string dot_home = chainPath(to!string(env["home"]), ".sisu").array;
+ string[] possible_config_path_locations = [
+ dot_pwd,
+ underscore_pwd,
+ dot_home,
+ "/etc/sisu"
+ ];
+ string config_file_str;
+ foreach(pth; possible_config_path_locations) {
+ auto conf_file = format(
+ "%s/%s",
+ pth,
+ conf_sdl,
+ );
+ try {
+ if (exists(conf_file)) {
+ debug(configfile) {
+ writeln(conf_file);
+ }
+ config_file_str = conf_file.readText;
+ break;
}
- config_file_str = conf_file.readText;
- break;
+ }
+ catch (ErrnoException ex) {
+ }
+ catch (FileException ex) {
}
}
- catch (ErrnoException ex) {
- }
- catch (FileException ex) {
- }
+ return config_file_str;
}
- return config_file_str;
}
#+END_SRC
-** 0. config files get sdlang root tag
-
-#+BEGIN_SRC d :tangle ../src/sdp/ao_read_config_files.d
+** 2. config files get sdlang root tag
+*** 0. template
+#+name: ao_config_file_sdl
+#+BEGIN_SRC d
/+
+/
@@ -82,7 +94,7 @@ template ConfigSDLang() {
}
#+END_SRC
-** config file get sdl root tag :file:conf:sdlang:
+*** config file get sdl root tag :file:conf:sdlang:
#+name: ao_config_file_sdlang
#+BEGIN_SRC d
@@ -106,10 +118,11 @@ auto ConfigSDLang(string configuration, string conf_sdl_filename) {
}
#+END_SRC
-** config file (conf.sdl & sisu_document_make) :file:config:hub:
-*** config hub template
+** 3. config file (conf.sdl & sisu_document_make) :file:config:hub:
+*** 0. template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_read_config_files.d
+#+name: ao_config_file_hub
+#+BEGIN_SRC d
/+
+/
template ConfigHub() {
@@ -119,32 +132,10 @@ template ConfigHub() {
}
#+END_SRC
-*** imports
-
-#+name: imports_std
-#+BEGIN_SRC d
-private import
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.stdio,
- std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
-#+END_SRC
-
*** config hub import sdlang
#+name: ao_config_file_import_mixin
#+BEGIN_SRC d
-private import sdlang;
+import sdlang;
#+END_SRC
*** config hub function
@@ -159,19 +150,18 @@ final auto ConfigHub(C,E)(C conf_sdl, E env) {
#+END_SRC
* 2. get markup source, read file :module:sdp:ao_read_source_files:
-
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/ao_read_source_files.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/read_source_files.d
/++
module ao_read_source_files;<BR>
- open markup files<BR>
- if master file scan for addional files to import/insert
+/
-module sdp.ao_read_source_files;
+module sdp.ao.read_source_files;
template SiSUrawMarkupContent() {
- private import
- sdp.ao_rgx;
+ import
+ sdp.ao.rgx;
<<imports_std>>
mixin SiSUrgxInit;
auto rgx = Rgx();
@@ -213,7 +203,7 @@ template SiSUrawMarkupContent() {
}
}
struct MarkupRawUnit {
- private import std.file;
+ import std.file;
<<ao_markup_source_raw_read_file_source_string>>
<<ao_markup_source_raw_doc_header_and_content_split>>
<<ao_markup_source_raw_source_line_array>>
@@ -222,7 +212,7 @@ template SiSUrawMarkupContent() {
<<ao_markup_source_raw_get_insert_source_line_array>>
}
struct Inserts {
- private import sdp.ao_defaults;
+ import sdp.ao.defaults;
auto scan_subdoc_source(
char[][] markup_sourcefile_insert_content,
string fn_src
@@ -559,4 +549,3 @@ auto t = tuple(
return t;
#+END_SRC
-* 3. config files (conf.sdl & sisu_document_make) :ao_config_files:
diff --git a/org/compile_time_info.org b/org/compile_time_info.org
index 5da7e04..e29ede1 100644
--- a/org/compile_time_info.org
+++ b/org/compile_time_info.org
@@ -22,11 +22,11 @@ version(Windows) {} else { ... }
** 0. module template
-#+begin_src d :tangle ../src/sdp/compile_time_info.d
+#+begin_src d :tangle ../src/sdp/conf/compile_time_info.d
/++
compile_time_info
+/
-module sdp.compile_time_info;
+module sdp.conf.compile_time_info;
template CompileTimeInfo() {
<<sdp_compile_time_info>>
}
diff --git a/org/default_misc.org b/org/default_misc.org
index 84b9076..f4adc70 100644
--- a/org/default_misc.org
+++ b/org/default_misc.org
@@ -17,11 +17,11 @@
** 0. module template
#+name: tangle_defaults
-#+BEGIN_SRC d :tangle ../src/sdp/ao_defaults.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/defaults.d
/++
default settings
+/
-module sdp.ao_defaults;
+module sdp.ao.defaults;
template SiSUregisters() {
<<ao_defaults_imports>>
<<ao_defaults_template_registers>>
@@ -37,7 +37,7 @@ template SiSUregisters() {
#+name: ao_defaults_imports
#+BEGIN_SRC d
-private import
+import
std.algorithm,
std.array,
std.container,
@@ -536,11 +536,11 @@ template SiSUbiblio() {
** 0. module template
#+name: tangle_defaults
-#+BEGIN_SRC d :tangle ../src/sdp/defaults.d
+#+BEGIN_SRC d :tangle ../src/sdp/output/defaults.d
/++
default settings
+/
-module sdp.defaults;
+module sdp.output.defaults;
<<defaults_template_init_flags>>
<<defaults_template_markup>>
<<defaults_template_language_codes>>
@@ -550,7 +550,7 @@ module sdp.defaults;
#+name: defaults_imports
#+BEGIN_SRC d
-private import
+import
std.algorithm,
std.array,
std.container,
diff --git a/org/default_paths.org b/org/default_paths.org
index 597f162..043bc25 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -16,18 +16,18 @@
* 0. source paths :module:sdp:paths_source:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/paths_source.d
+#+BEGIN_SRC d :tangle ../src/sdp/output/paths_source.d
/++
read configuration files<BR>
- read config files<BR>
ao_config_files.d
+/
-module sdp.paths_source;
+module sdp.output.paths_source;
import std.array,
std.path,
std.regex,
std.stdio;
-import sdp.ao_rgx;
+import sdp.ao.rgx;
template SiSUpathsSRC() {
mixin SiSUrgxInit;
auto rgx = Rgx();
@@ -82,16 +82,16 @@ template SiSUpathsSRC() {
* 1. output paths :module:sdp:paths_output:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/paths_output.d
+#+BEGIN_SRC d :tangle ../src/sdp/output/paths_output.d
/++
default settings
+/
-module sdp.paths_output;
+module sdp.output.paths_output;
import std.array,
std.path,
std.regex,
std.stdio;
-import sdp.ao_rgx;
+import sdp.ao.rgx;
<<template_paths_sisupod>>
<<template_paths_sisupod_zipped_archive>>
<<template_paths_sisupod_unzipped_filesystem>>
diff --git a/org/default_regex.org b/org/default_regex.org
index 4c126a2..3d291fe 100644
--- a/org/default_regex.org
+++ b/org/default_regex.org
@@ -23,13 +23,13 @@ http://dlang.org/phobos/std_regex.html
** 0. module template
#+name: tangle_ao_rgx
-#+BEGIN_SRC d :tangle ../src/sdp/ao_rgx.d
+#+BEGIN_SRC d :tangle ../src/sdp/ao/rgx.d
/++
regex: regular expressions used in sisu document parser
+/
-module sdp.ao_rgx;
+module sdp.ao.rgx;
template SiSUrgxInit() {
- private import sdp.ao_defaults;
+ import sdp.ao.defaults;
struct Rgx {
<<ao_rgx>>
<<prgmkup_rgx>>
@@ -353,13 +353,13 @@ http://dlang.org/phobos/std_regex.html
** 0. module template
#+name: tangle_ao_rgx
-#+BEGIN_SRC d :tangle ../src/sdp/output_rgx.d
+#+BEGIN_SRC d :tangle ../src/sdp/output/rgx.d
/++
regex: regular expressions used in sisu document parser
+/
-module sdp.output_rgx;
+module sdp.output.rgx;
template SiSUoutputRgxInit() {
- private import sdp.defaults;
+ import sdp.output.defaults;
struct Rgx {
<<prgmkup_rgx>>
<<sp_ch_xhtml_rgx>>
diff --git a/org/imports.org b/org/imports.org
index 17819b8..05f5dc9 100644
--- a/org/imports.org
+++ b/org/imports.org
@@ -13,82 +13,65 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
* 1. imports for ao
+** package dir
-#+NAME: version_txt
-#+BEGIN_SRC d :tangle ../src/sdp/imports_for_ao.d
-module sdp.imports_for_ao;
-public import
- sdp.abstraction_summary,
- sdp.ao_abstract_doc_source,
- sdp.ao_conf_make_meta,
- sdp.ao_conf_make_meta_native,
- sdp.ao_conf_make_meta_sdlang,
- sdp.ao_defaults,
- sdp.ao_doc_debugs,
- sdp.ao_read_config_files,
- sdp.ao_read_source_files,
- sdp.ao_rgx,
- sdp.output_hub,
- sdp.paths_source;
-/+ sdlang http://sdlang.org +/
-public import sdlang;
-/+ aarchive https://github.com/rcythr/archive +/
+#+BEGIN_SRC d :tangle ../src/sdp/ao/package.d
+module sdp.ao;
+<<imports_for_ao_general>>
+#+END_SRC
+
+** import list
+
+#+NAME: imports_for_ao_general
+#+BEGIN_SRC d
public import
- archive.core,
- archive.zip;
+ sdp.ao.defaults,
+ sdp.ao.rgx;
/+ std +/
public import
- // std.algorithm,
std.array,
- // std.container,
- std.digest.sha,
std.exception,
- std.getopt,
- std.process,
- std.stdio,
- // std.file,
- // std.path,
std.range,
- // std.range,
std.regex,
+ std.stdio,
std.string,
std.traits,
std.typecons,
- std.uni,
+ // std.uni,
std.utf,
std.conv : to;
#+END_SRC
* 2. imports for output
-#+NAME: version_txt
-#+BEGIN_SRC d :tangle ../src/sdp/imports_for_output.d
-module sdp.imports_for_output;
+** package dir
+
+#+BEGIN_SRC d :tangle ../src/sdp/output/package.d
+module sdp.output;
+<<imports_for_output_general>>
+#+END_SRC
+
+** import list
+
+#+NAME: imports_for_output_general
+#+BEGIN_SRC d
public import
- std.regex,
std.algorithm,
std.array,
std.container,
std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.file,
std.path,
+ std.process,
std.range,
std.regex,
+ std.stdio,
std.string,
std.traits,
std.typecons,
- std.uni,
+ // std.uni,
std.utf;
public import
- sdp.defaults,
- sdp.output_epub3,
- sdp.output_html,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.source_sisupod,
- sdp.create_zip_file,
- sdp.paths_output;
+ sdp.output.defaults,
+ sdp.output.paths_output,
+ sdp.output.rgx;
#+END_SRC
diff --git a/org/output_hub.org b/org/output_hub.org
index 4e66c59..d17d3c5 100644
--- a/org/output_hub.org
+++ b/org/output_hub.org
@@ -16,12 +16,12 @@
* 0. output hub [#A] :module:sdp:output_hub:
** module template
-#+BEGIN_SRC d :tangle ../src/sdp/output_hub.d
+#+BEGIN_SRC d :tangle ../src/sdp/output/hub.d
/++
output hub<BR>
check & generate output types requested
+/
-module sdp.output_hub;
+module sdp.output.hub;
template outputHub() {
<<output_imports>>
void outputHub(D,I)(D doc_abstraction, I doc_matters) {
@@ -36,26 +36,13 @@ template outputHub() {
#+name: output_imports
#+BEGIN_SRC d
-private import
- std.regex,
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf;
-import
- sdp.imports_for_output;
+import sdp.output,
+ sdp.output.epub3,
+ sdp.output.html,
+ sdp.output.xmls,
+ sdp.output.source_sisupod,
+ sdp.output.create_zip_file,
+ sdp.output.paths_output;
#+END_SRC
** output options
diff --git a/org/output_sisupod.org b/org/output_sisupod.org
index f768176..c706746 100644
--- a/org/output_sisupod.org
+++ b/org/output_sisupod.org
@@ -17,8 +17,8 @@
* sisupod :module:sdp:source_sisupod:
** module template
-#+BEGIN_SRC d :tangle ../src/sdp/source_sisupod.d
-module sdp.source_sisupod;
+#+BEGIN_SRC d :tangle ../src/sdp/output/source_sisupod.d
+module sdp.output.source_sisupod;
template SiSUpod() {
<<output_imports>>
void SiSUpod(T)(T doc_matters) {
@@ -39,34 +39,16 @@ template SiSUpod() {
#+name: output_imports
#+BEGIN_SRC d
-private import
- std.algorithm,
- std.array,
- std.container,
+import sdp.output;
+import
std.digest.sha,
- std.exception,
std.file,
- std.getopt,
- std.json,
std.outbuffer,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
std.zip,
std.conv : to;
import
- sdp.create_zip_file,
- sdp.defaults,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.paths_output;
+ sdp.output.create_zip_file,
+ sdp.output.xmls;
#+END_SRC
** mkdir
diff --git a/org/output_xmls.org b/org/output_xmls.org
index 4ee8074..4b20157 100644
--- a/org/output_xmls.org
+++ b/org/output_xmls.org
@@ -18,8 +18,8 @@
** format xhtml objects :format:
*** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/output_xmls.d
-module sdp.output_xmls;
+#+BEGIN_SRC d :tangle ../src/sdp/output/xmls.d
+module sdp.output.xmls;
template outputXHTMLs() {
<<output_imports>>
mixin SiSUoutputRgxInit;
@@ -35,35 +35,17 @@ template outputXHTMLs() {
#+name: output_imports
#+BEGIN_SRC d
-private import
- std.algorithm,
- std.array,
- std.container,
+import sdp.output;
+import
std.digest.sha,
- std.exception,
std.file,
- std.getopt,
- std.json,
std.outbuffer,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
std.zip,
std.conv : to;
import
- sdp.create_zip_file,
- sdp.defaults,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.output_xmls_css,
- sdp.paths_output;
+ sdp.output.create_zip_file,
+ sdp.output.xmls,
+ sdp.output.xmls_css;
#+END_SRC
*** misc
@@ -1079,8 +1061,8 @@ auto endnote(O)(
* _html_ [#A] :module:sdp:output_html:
** module template
-#+BEGIN_SRC d :tangle ../src/sdp/output_html.d
-module sdp.output_html;
+#+BEGIN_SRC d :tangle ../src/sdp/output/html.d
+module sdp.output.html;
template outputHTML() {
<<output_imports>>
mixin outputXHTMLs;
@@ -1574,8 +1556,8 @@ void css(M)(
** module template
-#+BEGIN_SRC d :tangle ../src/sdp/output_epub3.d
-module sdp.output_epub3;
+#+BEGIN_SRC d :tangle ../src/sdp/output/epub3.d
+module sdp.output.epub3;
template outputEPub3() {
<<output_imports>>
mixin InternalMarkup;
diff --git a/org/output_xmls_css.org b/org/output_xmls_css.org
index 8fd2c6b..27063b2 100644
--- a/org/output_xmls_css.org
+++ b/org/output_xmls_css.org
@@ -16,11 +16,11 @@
* 0. ao css defaults :module:sdp:output_xmls_css:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/output_xmls_css.d
+#+BEGIN_SRC d :tangle ../src/sdp/output/xmls_css.d
/++
default css settings
+/
-module sdp.output_xmls_css;
+module sdp.output.xmls_css;
template SiSUcss() {
auto SiSUcss() {
string css_shared="
diff --git a/org/output_zip.org b/org/output_zip.org
index 98aede6..7798579 100644
--- a/org/output_zip.org
+++ b/org/output_zip.org
@@ -16,8 +16,8 @@
* _zip_ :module:sdp:create_zip_file:
** module template
-#+BEGIN_SRC d :tangle ../src/sdp/create_zip_file.d
-module sdp.create_zip_file;
+#+BEGIN_SRC d :tangle ../src/sdp/output/create_zip_file.d
+module sdp.output.create_zip_file;
template createZipFile() {
import std.file;
import std.outbuffer;
diff --git a/org/sdp.org b/org/sdp.org
index e34c57b..2f93812 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -23,7 +23,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 15, 0);
+enum ver = Version(0, 16, 0);
#+END_SRC
* 1. sdp (sisu document parser) :sdp:
@@ -37,15 +37,15 @@ enum ver = Version(0, 15, 0);
- process file
- output
-** 0. sdp src/sdp.d :template:
+** 0. sdp src/sdp :template:
-#+BEGIN_SRC d :tangle ../src/sisu_d_parser.d :shebang #!/usr/bin/env rdmd
+#+BEGIN_SRC d :tangle ../src/sdp/sisu_d_parser.d :shebang #!/usr/bin/env rdmd
/+
sdp
+/
import
- sdp.compile_time_info,
- sdp.abstraction;
+ sdp.conf.compile_time_info,
+ sdp.ao.abstraction;
<<imports_sdp>>
<<imports_sdlang>>
<<imports_std>>
@@ -87,7 +87,23 @@ unittest {
#+NAME: imports_sdp
#+BEGIN_SRC d
/+ sdp: sisu document parser, see http://sisudoc.org +/
-import sdp.imports_for_ao;
+import sdp.ao;
+import
+ std.getopt,
+ std.process;
+import
+ sdp.ao.abstraction_summary,
+ sdp.ao.abstract_doc_source,
+ sdp.ao.conf_make_meta,
+ // sdp.ao.conf_make_meta_native,
+ sdp.ao.conf_make_meta_sdlang,
+ sdp.ao.defaults,
+ sdp.ao.doc_debugs,
+ sdp.ao.read_config_files,
+ sdp.ao.read_source_files,
+ sdp.ao.rgx,
+ sdp.output.hub,
+ sdp.output.paths_source;
#+END_SRC
****** notes
@@ -402,8 +418,8 @@ break; // terminate, stop
* 2. _document abstraction functions_ :module:sdp:abstraction:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/abstraction.d
-module sdp.abstraction;
+#+BEGIN_SRC d :tangle ../src/sdp/ao/abstraction.d
+module sdp.ao.abstraction;
template SiSUabstraction() {
<<imports_sdp>>
<<imports_sdlang>>
@@ -578,8 +594,8 @@ auto doc_matters = DocumentMatters();
* 3. document abstraction _summary_ :module:sdp:abstraction_summary:
** 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/abstraction_summary.d
-module sdp.abstraction_summary;
+#+BEGIN_SRC d :tangle ../src/sdp/ao/abstraction_summary.d
+module sdp.ao.abstraction_summary;
template SiSUabstractionSummary() {
auto SiSUabstractionSummary(S,T)(
auto return ref const S doc_abstraction,
@@ -601,8 +617,8 @@ template SiSUabstractionSummary() {
#+name: abstraction_summary_imports
#+BEGIN_SRC d
import
- sdp.ao_defaults,
- sdp.ao_rgx;
+ sdp.ao.defaults,
+ sdp.ao.rgx;
import
std.array,
std.exception,
@@ -652,35 +668,35 @@ char_repeat_number = (char_repeat_number > min_repeat_number)
? char_repeat_number
: min_repeat_number;
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n(%s: %s)\n%s",
+ "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n(%s: %s)\n%s",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.dochead_meta["title"]["full"],
doc_matters.dochead_meta["creator"]["author"],
doc_matters.source_filename,
markup.repeat_character_by_number_provided("-", char_repeat_number),
- "length toc arr: ",
+ "length toc arr:",
to!int(doc_abstraction["toc_seg"].length),
- "length doc_abstraction arr: ",
+ "length doc_abstraction arr:",
to!int(doc_abstraction["body"].length),
- "last obj_cite_number: ",
+ "last obj_cite_number:",
to!int(check["last_obj_cite_number"]),
- "length endnotes: ",
+ "length endnotes:",
(doc_abstraction["endnotes"].length > 1)
? (to!int(doc_abstraction["endnotes"].length))
: 0,
- "length glossary: ",
+ "length glossary:",
(doc_abstraction["glossary"].length > 1)
? (to!int(doc_abstraction["glossary"].length))
: 0,
- "length biblio: ",
+ "length biblio:",
(doc_abstraction["bibliography"].length > 1)
? (to!int(doc_abstraction["bibliography"].length))
: 0,
- "length bookindex: ",
+ "length bookindex:",
(doc_abstraction["bookindex_seg"].length > 1)
? (to!int(doc_abstraction["bookindex_seg"].length))
: 0,
- "length blurb: ",
+ "length blurb:",
(doc_abstraction["blurb"].length > 1)
? (to!int(doc_abstraction["blurb"].length))
: 0,
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao/abstract_doc_source.d
index ab7cc99..9fee954 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao/abstract_doc_source.d
@@ -3,33 +3,20 @@
abstraction of sisu markup for downstream processing
ao_abstract_doc_source.d
+/
-module sdp.ao_abstract_doc_source;
+module sdp.ao.abstract_doc_source;
template SiSUdocAbstraction() {
/+ ↓ abstraction imports +/
+ import sdp.ao;
import
- sdp.ao_defaults,
- sdp.ao_object_setter,
- sdp.ao_rgx,
- sdp.output_hub;
- private import
std.algorithm,
- std.array,
std.container,
- std.exception,
std.file,
- std.getopt,
std.json,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
+ std.path;
+ import
+ sdp.ao.defaults,
+ sdp.ao.object_setter,
+ sdp.ao.rgx;
/+ ↓ abstraction mixins +/
mixin ObjectSetter;
mixin InternalMarkup;
diff --git a/src/sdp/abstraction.d b/src/sdp/ao/abstraction.d
index 351fd1f..17b1dff 100644
--- a/src/sdp/abstraction.d
+++ b/src/sdp/ao/abstraction.d
@@ -1,7 +1,23 @@
-module sdp.abstraction;
+module sdp.ao.abstraction;
template SiSUabstraction() {
/+ sdp: sisu document parser, see http://sisudoc.org +/
- import sdp.imports_for_ao;
+ import sdp.ao;
+ import
+ std.getopt,
+ std.process;
+ import
+ sdp.ao.abstraction_summary,
+ sdp.ao.abstract_doc_source,
+ sdp.ao.conf_make_meta,
+ // sdp.ao.conf_make_meta_native,
+ sdp.ao.conf_make_meta_sdlang,
+ sdp.ao.defaults,
+ sdp.ao.doc_debugs,
+ sdp.ao.read_config_files,
+ sdp.ao.read_source_files,
+ sdp.ao.rgx,
+ sdp.output.hub,
+ sdp.output.paths_source;
mixin SiSUrgxInit;
diff --git a/src/sdp/abstraction_summary.d b/src/sdp/ao/abstraction_summary.d
index 9532fc7..2cc6967 100644
--- a/src/sdp/abstraction_summary.d
+++ b/src/sdp/ao/abstraction_summary.d
@@ -1,12 +1,12 @@
-module sdp.abstraction_summary;
+module sdp.ao.abstraction_summary;
template SiSUabstractionSummary() {
auto SiSUabstractionSummary(S,T)(
auto return ref const S doc_abstraction,
auto return ref T doc_matters,
) {
import
- sdp.ao_defaults,
- sdp.ao_rgx;
+ sdp.ao.defaults,
+ sdp.ao.rgx;
import
std.array,
std.exception,
@@ -40,35 +40,35 @@ template SiSUabstractionSummary() {
? char_repeat_number
: min_repeat_number;
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n(%s: %s)\n%s",
+ "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n(%s: %s)\n%s",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.dochead_meta["title"]["full"],
doc_matters.dochead_meta["creator"]["author"],
doc_matters.source_filename,
markup.repeat_character_by_number_provided("-", char_repeat_number),
- "length toc arr: ",
+ "length toc arr:",
to!int(doc_abstraction["toc_seg"].length),
- "length doc_abstraction arr: ",
+ "length doc_abstraction arr:",
to!int(doc_abstraction["body"].length),
- "last obj_cite_number: ",
+ "last obj_cite_number:",
to!int(check["last_obj_cite_number"]),
- "length endnotes: ",
+ "length endnotes:",
(doc_abstraction["endnotes"].length > 1)
? (to!int(doc_abstraction["endnotes"].length))
: 0,
- "length glossary: ",
+ "length glossary:",
(doc_abstraction["glossary"].length > 1)
? (to!int(doc_abstraction["glossary"].length))
: 0,
- "length biblio: ",
+ "length biblio:",
(doc_abstraction["bibliography"].length > 1)
? (to!int(doc_abstraction["bibliography"].length))
: 0,
- "length bookindex: ",
+ "length bookindex:",
(doc_abstraction["bookindex_seg"].length > 1)
? (to!int(doc_abstraction["bookindex_seg"].length))
: 0,
- "length blurb: ",
+ "length blurb:",
(doc_abstraction["blurb"].length > 1)
? (to!int(doc_abstraction["blurb"].length))
: 0,
diff --git a/src/sdp/ao_conf_make_meta.d b/src/sdp/ao/conf_make_meta.d
index 52cc98d..0f6d27d 100644
--- a/src/sdp/ao_conf_make_meta.d
+++ b/src/sdp/ao/conf_make_meta.d
@@ -8,9 +8,9 @@
converting the metadata and make instructions to a common json format used by
program internally. Moved to associative array.
+/
-module sdp.ao_conf_make_meta;
+module sdp.ao.conf_make_meta;
template SiSUheaderExtractHub() {
- private import
+ import
std.exception,
std.regex,
std.stdio,
@@ -18,11 +18,11 @@ template SiSUheaderExtractHub() {
std.typecons,
std.utf,
std.conv : to;
- private import sdlang;
- private import
- sdp.ao_rgx,
- sdp.ao_conf_make_meta_native,
- sdp.ao_conf_make_meta_sdlang;
+ import sdlang;
+ import
+ sdp.ao.conf_make_meta_native,
+ sdp.ao.conf_make_meta_sdlang,
+ sdp.ao.rgx;
mixin SiSUrgxInit;
mixin SiSUheaderExtractNative;
mixin SiSUheaderExtractSDLang;
diff --git a/src/sdp/ao_conf_make_meta_native.d b/src/sdp/ao/conf_make_meta_native.d
index 899b59f..8954c9a 100644
--- a/src/sdp/ao_conf_make_meta_native.d
+++ b/src/sdp/ao/conf_make_meta_native.d
@@ -2,9 +2,9 @@
native headers using<br>@title:<BR>:subtitle:<BR>type tags<BR>
extract native/orig header return associative array
+/
-module sdp.ao_conf_make_meta_native;
+module sdp.ao.conf_make_meta_native;
template SiSUheaderExtractNative() {
- private import
+ import
std.exception,
std.regex,
std.stdio,
@@ -13,9 +13,9 @@ template SiSUheaderExtractNative() {
std.typecons,
std.utf,
std.conv : to;
- private import
- sdp.ao_rgx,
- sdp.ao_defaults;
+ import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
struct HeaderDocMetadataAndMakeNativeToAA {
mixin SiSUregisters;
mixin SiSUrgxInitFlags;
diff --git a/src/sdp/ao_conf_make_meta_sdlang.d b/src/sdp/ao/conf_make_meta_sdlang.d
index 1fb8993..567853e 100644
--- a/src/sdp/ao_conf_make_meta_sdlang.d
+++ b/src/sdp/ao/conf_make_meta_sdlang.d
@@ -2,9 +2,9 @@
sdlang headers<BR>
extract sdlang header return sdlang
+/
-module sdp.ao_conf_make_meta_sdlang;
+module sdp.ao.conf_make_meta_sdlang;
template SiSUheaderExtractSDLang() {
- private import
+ import
std.exception,
std.regex,
std.stdio,
@@ -13,9 +13,9 @@ template SiSUheaderExtractSDLang() {
std.typecons,
std.utf,
std.conv : to;
- private import
- sdp.ao_rgx,
- sdp.ao_defaults;
+ import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
struct HeaderExtractSDL {
mixin SiSUregisters;
mixin SiSUrgxInit;
diff --git a/src/sdp/ao_defaults.d b/src/sdp/ao/defaults.d
index 6363fdc..aa9fc2c 100644
--- a/src/sdp/ao_defaults.d
+++ b/src/sdp/ao/defaults.d
@@ -1,9 +1,9 @@
/++
default settings
+/
-module sdp.ao_defaults;
+module sdp.ao.defaults;
template SiSUregisters() {
- private import
+ import
std.algorithm,
std.array,
std.container,
diff --git a/src/sdp/ao_doc_debugs.d b/src/sdp/ao/doc_debugs.d
index 2c78c76..d42d903 100644
--- a/src/sdp/ao_doc_debugs.d
+++ b/src/sdp/ao/doc_debugs.d
@@ -1,12 +1,12 @@
/++
output debugs
+/
-module sdp.ao_doc_debugs;
+module sdp.ao.doc_debugs;
template SiSUdebugs() {
import
- sdp.ao_defaults,
- sdp.ao_rgx;
- private import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
+ import
std.algorithm,
std.array,
std.container,
@@ -20,7 +20,6 @@ template SiSUdebugs() {
std.string,
std.traits,
std.typecons,
- std.uni,
std.utf,
std.conv : to;
auto SiSUdebugs(S,T)(
diff --git a/src/sdp/ao_object_setter.d b/src/sdp/ao/object_setter.d
index a5ddb4a..b05ac98 100644
--- a/src/sdp/ao_object_setter.d
+++ b/src/sdp/ao/object_setter.d
@@ -3,7 +3,7 @@
setting of sisu objects for downstream processing
ao_object_setter.d
+/
-module sdp.ao_object_setter;
+module sdp.ao.object_setter;
template ObjectSetter() {
/+ structs +/
struct HeadingAttrib {
diff --git a/src/sdp/ao/package.d b/src/sdp/ao/package.d
new file mode 100644
index 0000000..63b4f3e
--- /dev/null
+++ b/src/sdp/ao/package.d
@@ -0,0 +1,17 @@
+module sdp.ao;
+public import
+ sdp.ao.defaults,
+ sdp.ao.rgx;
+/+ std +/
+public import
+ std.array,
+ std.exception,
+ std.range,
+ std.regex,
+ std.stdio,
+ std.string,
+ std.traits,
+ std.typecons,
+ // std.uni,
+ std.utf,
+ std.conv : to;
diff --git a/src/sdp/ao_read_config_files.d b/src/sdp/ao/read_config_files.d
index b8d9890..57213c4 100644
--- a/src/sdp/ao_read_config_files.d
+++ b/src/sdp/ao/read_config_files.d
@@ -3,25 +3,12 @@
- read config files<BR>
ao_config_files.d
+/
-module sdp.ao_read_config_files;
+module sdp.ao.read_config_files;
template ConfigIn() {
- private import
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.stdio,
+ import
+ sdp.ao,
std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
- import std.file;
+ std.path;
final string ConfigIn(C,E)(C conf_sdl, E env) {
string dot_pwd = chainPath(to!string(env["pwd"]), ".sisu").array;
string underscore_pwd = chainPath(to!string(env["pwd"]), "_sisu").array;
@@ -61,22 +48,10 @@ template ConfigIn() {
+/
template ConfigSDLang() {
import sdlang;
- private import
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.stdio,
+ import
+ sdp.ao,
std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
+ std.path;
auto ConfigSDLang(string configuration, string conf_sdl_filename) {
Tag sdl_root_conf;
try {
@@ -99,22 +74,10 @@ template ConfigSDLang() {
/+
+/
template ConfigHub() {
- private import
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.stdio,
+ import
+ sdp.ao,
std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
+ std.path;
final auto ConfigHub(C,E)(C conf_sdl, E env) {
auto configuration = ConfigIn!()(conf_sdl, env);
diff --git a/src/sdp/ao_read_source_files.d b/src/sdp/ao/read_source_files.d
index b6ad942..3b348f3 100644
--- a/src/sdp/ao_read_source_files.d
+++ b/src/sdp/ao/read_source_files.d
@@ -3,26 +3,14 @@
- open markup files<BR>
- if master file scan for addional files to import/insert
+/
-module sdp.ao_read_source_files;
+module sdp.ao.read_source_files;
template SiSUrawMarkupContent() {
- private import
- sdp.ao_rgx;
- private import
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.stdio,
+ import
+ sdp.ao.rgx;
+ import
+ sdp.ao,
std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
+ std.path;
mixin SiSUrgxInit;
auto rgx = Rgx();
auto rawsrc = RawMarkupContent();
@@ -63,7 +51,7 @@ template SiSUrawMarkupContent() {
}
}
struct MarkupRawUnit {
- private import std.file;
+ import std.file;
final private string readInMarkupSource(in char[] fn_src) {
enforce(
exists(fn_src)!=0,
@@ -140,7 +128,7 @@ template SiSUrawMarkupContent() {
}
}
struct Inserts {
- private import sdp.ao_defaults;
+ import sdp.ao.defaults;
auto scan_subdoc_source(
char[][] markup_sourcefile_insert_content,
string fn_src
diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao/rgx.d
index 29a96af..3f74329 100644
--- a/src/sdp/ao_rgx.d
+++ b/src/sdp/ao/rgx.d
@@ -1,9 +1,9 @@
/++
regex: regular expressions used in sisu document parser
+/
-module sdp.ao_rgx;
+module sdp.ao.rgx;
template SiSUrgxInit() {
- private import sdp.ao_defaults;
+ import sdp.ao.defaults;
struct Rgx {
/+ misc +/
static true_dollar = ctRegex!(`\$`, "gm");
diff --git a/src/sdp/compile_time_info.d b/src/sdp/conf/compile_time_info.d
index cf4d0a5..80f6e33 100644
--- a/src/sdp/compile_time_info.d
+++ b/src/sdp/conf/compile_time_info.d
@@ -1,7 +1,7 @@
/++
compile_time_info
+/
-module sdp.compile_time_info;
+module sdp.conf.compile_time_info;
template CompileTimeInfo() {
version(Windows) {
pragma(msg, "[ Windows compilation ]");
diff --git a/src/sdp/imports_for_ao.d b/src/sdp/imports_for_ao.d
deleted file mode 100644
index 34aa1e1..0000000
--- a/src/sdp/imports_for_ao.d
+++ /dev/null
@@ -1,41 +0,0 @@
-module sdp.imports_for_ao;
-public import
- sdp.abstraction_summary,
- sdp.ao_abstract_doc_source,
- sdp.ao_conf_make_meta,
- sdp.ao_conf_make_meta_native,
- sdp.ao_conf_make_meta_sdlang,
- sdp.ao_defaults,
- sdp.ao_doc_debugs,
- sdp.ao_read_config_files,
- sdp.ao_read_source_files,
- sdp.ao_rgx,
- sdp.output_hub,
- sdp.paths_source;
-/+ sdlang http://sdlang.org +/
-public import sdlang;
-/+ aarchive https://github.com/rcythr/archive +/
-public import
- archive.core,
- archive.zip;
-/+ std +/
-public import
- // std.algorithm,
- std.array,
- // std.container,
- std.digest.sha,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- // std.file,
- // std.path,
- std.range,
- // std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
- std.conv : to;
diff --git a/src/sdp/imports_for_output.d b/src/sdp/imports_for_output.d
deleted file mode 100644
index 20b3ba1..0000000
--- a/src/sdp/imports_for_output.d
+++ /dev/null
@@ -1,28 +0,0 @@
-module sdp.imports_for_output;
-public import
- std.regex,
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf;
-public import
- sdp.defaults,
- sdp.output_epub3,
- sdp.output_html,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.source_sisupod,
- sdp.create_zip_file,
- sdp.paths_output;
diff --git a/src/sdp/create_zip_file.d b/src/sdp/output/create_zip_file.d
index 93e85ee..5380744 100644
--- a/src/sdp/create_zip_file.d
+++ b/src/sdp/output/create_zip_file.d
@@ -1,4 +1,4 @@
-module sdp.create_zip_file;
+module sdp.output.create_zip_file;
template createZipFile() {
import std.file;
import std.outbuffer;
diff --git a/src/sdp/defaults.d b/src/sdp/output/defaults.d
index a344f7f..82a8d1a 100644
--- a/src/sdp/defaults.d
+++ b/src/sdp/output/defaults.d
@@ -1,7 +1,7 @@
/++
default settings
+/
-module sdp.defaults;
+module sdp.output.defaults;
template InternalMarkup() {
struct InlineMarkup {
diff --git a/src/sdp/output_epub3.d b/src/sdp/output/epub3.d
index 6cc496c..0f91c86 100644
--- a/src/sdp/output_epub3.d
+++ b/src/sdp/output/epub3.d
@@ -1,34 +1,16 @@
-module sdp.output_epub3;
+module sdp.output.epub3;
template outputEPub3() {
- private import
- std.algorithm,
- std.array,
- std.container,
+ import sdp.output;
+ import
std.digest.sha,
- std.exception,
std.file,
- std.getopt,
- std.json,
std.outbuffer,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
std.zip,
std.conv : to;
import
- sdp.create_zip_file,
- sdp.defaults,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.output_xmls_css,
- sdp.paths_output;
+ sdp.output.create_zip_file,
+ sdp.output.xmls,
+ sdp.output.xmls_css;
mixin InternalMarkup;
mixin outputXHTMLs;
string epub3_mimetypes() {
diff --git a/src/sdp/output_html.d b/src/sdp/output/html.d
index 41d68dd..6712469 100644
--- a/src/sdp/output_html.d
+++ b/src/sdp/output/html.d
@@ -1,34 +1,16 @@
-module sdp.output_html;
+module sdp.output.html;
template outputHTML() {
- private import
- std.algorithm,
- std.array,
- std.container,
+ import sdp.output;
+ import
std.digest.sha,
- std.exception,
std.file,
- std.getopt,
- std.json,
std.outbuffer,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
std.zip,
std.conv : to;
import
- sdp.create_zip_file,
- sdp.defaults,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.output_xmls_css,
- sdp.paths_output;
+ sdp.output.create_zip_file,
+ sdp.output.xmls,
+ sdp.output.xmls_css;
mixin outputXHTMLs;
void scroll(D,I)(
diff --git a/src/sdp/output_hub.d b/src/sdp/output/hub.d
index 0ed1653..79b8996 100644
--- a/src/sdp/output_hub.d
+++ b/src/sdp/output/hub.d
@@ -2,28 +2,15 @@
output hub<BR>
check & generate output types requested
+/
-module sdp.output_hub;
+module sdp.output.hub;
template outputHub() {
- private import
- std.regex,
- std.algorithm,
- std.array,
- std.container,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.file,
- std.path,
- std.range,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf;
- import
- sdp.imports_for_output;
+ import sdp.output,
+ sdp.output.epub3,
+ sdp.output.html,
+ sdp.output.xmls,
+ sdp.output.source_sisupod,
+ sdp.output.create_zip_file,
+ sdp.output.paths_output;
void outputHub(D,I)(D doc_abstraction, I doc_matters) {
mixin SiSUoutputRgxInit;
auto rgx = Rgx();
diff --git a/src/sdp/output/package.d b/src/sdp/output/package.d
new file mode 100644
index 0000000..58a6ae8
--- /dev/null
+++ b/src/sdp/output/package.d
@@ -0,0 +1,20 @@
+module sdp.output;
+public import
+ std.algorithm,
+ std.array,
+ std.container,
+ std.exception,
+ std.path,
+ std.process,
+ std.range,
+ std.regex,
+ std.stdio,
+ std.string,
+ std.traits,
+ std.typecons,
+ // std.uni,
+ std.utf;
+public import
+ sdp.output.defaults,
+ sdp.output.paths_output,
+ sdp.output.rgx;
diff --git a/src/sdp/paths_output.d b/src/sdp/output/paths_output.d
index ea68567..3edcb67 100644
--- a/src/sdp/paths_output.d
+++ b/src/sdp/output/paths_output.d
@@ -1,12 +1,12 @@
/++
default settings
+/
-module sdp.paths_output;
+module sdp.output.paths_output;
import std.array,
std.path,
std.regex,
std.stdio;
-import sdp.ao_rgx;
+import sdp.ao.rgx;
template SiSUpathsSisupod() {
mixin SiSUrgxInit;
auto rgx = Rgx();
diff --git a/src/sdp/paths_source.d b/src/sdp/output/paths_source.d
index b5a60e8..7658df5 100644
--- a/src/sdp/paths_source.d
+++ b/src/sdp/output/paths_source.d
@@ -3,12 +3,12 @@
- read config files<BR>
ao_config_files.d
+/
-module sdp.paths_source;
+module sdp.output.paths_source;
import std.array,
std.path,
std.regex,
std.stdio;
-import sdp.ao_rgx;
+import sdp.ao.rgx;
template SiSUpathsSRC() {
mixin SiSUrgxInit;
auto rgx = Rgx();
diff --git a/src/sdp/output_rgx.d b/src/sdp/output/rgx.d
index af0751e..6fdc876 100644
--- a/src/sdp/output_rgx.d
+++ b/src/sdp/output/rgx.d
@@ -1,9 +1,9 @@
/++
regex: regular expressions used in sisu document parser
+/
-module sdp.output_rgx;
+module sdp.output.rgx;
template SiSUoutputRgxInit() {
- private import sdp.defaults;
+ import sdp.output.defaults;
struct Rgx {
static newline = ctRegex!("\n", "mg");
static strip_br = ctRegex!("^<br>\n|<br>\n*$");
diff --git a/src/sdp/source_sisupod.d b/src/sdp/output/source_sisupod.d
index 7babba3..6c326ac 100644
--- a/src/sdp/source_sisupod.d
+++ b/src/sdp/output/source_sisupod.d
@@ -1,33 +1,15 @@
-module sdp.source_sisupod;
+module sdp.output.source_sisupod;
template SiSUpod() {
- private import
- std.algorithm,
- std.array,
- std.container,
+ import sdp.output;
+ import
std.digest.sha,
- std.exception,
std.file,
- std.getopt,
- std.json,
std.outbuffer,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
std.zip,
std.conv : to;
import
- sdp.create_zip_file,
- sdp.defaults,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.paths_output;
+ sdp.output.create_zip_file,
+ sdp.output.xmls;
void SiSUpod(T)(T doc_matters) {
debug(asserts) {
// static assert(is(typeof(doc_matters) == tuple));
diff --git a/src/sdp/output_xmls.d b/src/sdp/output/xmls.d
index 373a871..7a057ad 100644
--- a/src/sdp/output_xmls.d
+++ b/src/sdp/output/xmls.d
@@ -1,34 +1,16 @@
-module sdp.output_xmls;
+module sdp.output.xmls;
template outputXHTMLs() {
- private import
- std.algorithm,
- std.array,
- std.container,
+ import sdp.output;
+ import
std.digest.sha,
- std.exception,
std.file,
- std.getopt,
- std.json,
std.outbuffer,
- std.path,
- std.process,
- std.range,
- std.regex,
- std.stdio,
- std.string,
- std.traits,
- std.typecons,
- std.uni,
- std.utf,
std.zip,
std.conv : to;
import
- sdp.create_zip_file,
- sdp.defaults,
- sdp.output_rgx,
- sdp.output_xmls,
- sdp.output_xmls_css,
- sdp.paths_output;
+ sdp.output.create_zip_file,
+ sdp.output.xmls,
+ sdp.output.xmls_css;
mixin SiSUoutputRgxInit;
struct outputXHTMLs {
auto rgx = Rgx();
diff --git a/src/sdp/output_xmls_css.d b/src/sdp/output/xmls_css.d
index eb1ab2b..6bb493a 100644
--- a/src/sdp/output_xmls_css.d
+++ b/src/sdp/output/xmls_css.d
@@ -1,7 +1,7 @@
/++
default css settings
+/
-module sdp.output_xmls_css;
+module sdp.output.xmls_css;
template SiSUcss() {
auto SiSUcss() {
string css_shared="
diff --git a/src/sisu_d_parser.d b/src/sdp/sisu_d_parser.d
index 96e1359..748ba12 100755
--- a/src/sisu_d_parser.d
+++ b/src/sdp/sisu_d_parser.d
@@ -3,10 +3,26 @@
sdp
+/
import
- sdp.compile_time_info,
- sdp.abstraction;
+ sdp.conf.compile_time_info,
+ sdp.ao.abstraction;
/+ sdp: sisu document parser, see http://sisudoc.org +/
-import sdp.imports_for_ao;
+import sdp.ao;
+import
+ std.getopt,
+ std.process;
+import
+ sdp.ao.abstraction_summary,
+ sdp.ao.abstract_doc_source,
+ sdp.ao.conf_make_meta,
+ // sdp.ao.conf_make_meta_native,
+ sdp.ao.conf_make_meta_sdlang,
+ sdp.ao.defaults,
+ sdp.ao.doc_debugs,
+ sdp.ao.read_config_files,
+ sdp.ao.read_source_files,
+ sdp.ao.rgx,
+ sdp.output.hub,
+ sdp.output.paths_source;
diff --git a/views/version.txt b/views/version.txt
index ded3634..d5b64a1 100644
--- a/views/version.txt
+++ b/views/version.txt
@@ -4,4 +4,4 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 15, 0);
+enum ver = Version(0, 16, 0);