aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/sdp.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-12-02 18:23:00 -0500
committerRalph Amissah <ralph@amissah.com>2015-12-02 18:23:00 -0500
commit6d0b245927779e68c2554880ad46d4299d4b11d4 (patch)
tree915ebf04752ac852f483a55a611708bfff907143 /org/sdp.org
parentorg babel block delimiters (diff)
sorting
Diffstat (limited to 'org/sdp.org')
-rw-r--r--org/sdp.org90
1 files changed, 58 insertions, 32 deletions
diff --git a/org/sdp.org b/org/sdp.org
index 70b68f5..885f022 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -1,4 +1,4 @@
-#+TITLE: Emacs config file written in org-mode
+#+TITLE: sdp hub
#+AUTHOR: Ralph Amissah
#+EMAIL: ralph.amissah@gmail.com
#+STARTUP: indent
@@ -9,48 +9,62 @@
#+OPTIONS: ^:nil _:nil
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
-#+TAGS: Amissah(A) Class(c) WEB(W) noexport(n)
-#+FILETAGS: :sdp:
+#+FILETAGS: :sdp:hub:
+#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
-* sdp.d :sdp.d:
+* sdp.d sisu document parser :sdp.d:
+[[../maker.org][maker.org makefile]]
Deal with imports.
Take command line instructions and process files as instructed.
-** imports
+
+** imports :import:
+[[./ao_abstract_doc_source.org][ao_abstract_doc_source]]
+[[./ao_assertions.org][ao_assertions]]
+[[./ao_defaults.org][ao_defaults]]
+[[./ao_emitters_and_interfaces.org][ao_emitters_and_interfaces: ao_emitter; ao_interface]]
+[[./ao_markup_source_raw.org][ao_markup_source_raw]]
+[[./ao_object_setter.org][ao_object_setter]]
+[[./ao_output_debugs.org][ao_output_debugs]]
+[[./ao_rgx.org][ao_rgx]]
+[[./ao_scan_inserts.org][ao_scan_inserts]]
+[[./ao_utils.org][ao_utils]]
+
#+name: sdp_imports
#+BEGIN_SRC d :exports none
+/+ sdp sisu document parser +/
import
- std.stdio,
+ std.algorithm,
+ std.array,
+ std.container,
std.file,
std.exception,
- // std.path,
- std.regex,
- std.utf,
- std.string,
- std.array,
std.json,
+ // std.path,
std.process,
- std.typecons,
- std.algorithm,
std.range,
- std.container,
+ std.regex,
+ std.stdio,
+ std.string,
std.traits,
+ std.typecons,
+ std.utf,
// std.variant,
- lib.sdp.ao_output_debugs, // sdp/ao_output_debugs.d ao_output_debugs.org
- lib.sdp.ao_defaults, // sdp/ao_defaults.d ao_defaults.arg
- lib.sdp.ao_rgx, // sdp/ao_rgx.d ao_rgx.org
- lib.sdp.ao_interface, // sdp/ao_interface.d ao_interface.arg
- lib.sdp.ao_emitter, // sdp/ao_emitter.d ao_emitter.org
- lib.sdp.ao_scan_inserts, // sdp/ao_scan_inserts.d ao_scan_inserts.org
- lib.sdp.ao_markup_source_raw, // sdp/ao_markup_source_raw.d ao_markup_source_raw.org
- lib.sdp.ao_abstract_doc_source, // sdp/ao_abstract_doc_source.d ao_abstract_doc_source.org
- lib.sdp.ao_assertions, // sdp/ao_assertions.d ao_assertions.org
- lib.sdp.ao_object_setter, // sdp/ao_object_setter.d ao_object_setter.org
- lib.sdp.ao_utils; // sdp/ao_utils.d ao_utils.org
+ lib.sdp.ao_abstract_doc_source, // sdp/ao_abstract_doc_source.d
+ lib.sdp.ao_assertions, // sdp/ao_assertions.d
+ lib.sdp.ao_defaults, // sdp/ao_defaults.d
+ lib.sdp.ao_emitter, // sdp/ao_emitter.d
+ lib.sdp.ao_interface, // sdp/ao_interface.d
+ lib.sdp.ao_markup_source_raw, // sdp/ao_markup_source_raw.d
+ lib.sdp.ao_object_setter, // sdp/ao_object_setter.d
+ lib.sdp.ao_output_debugs, // sdp/ao_output_debugs.d
+ lib.sdp.ao_rgx, // sdp/ao_rgx.d
+ lib.sdp.ao_scan_inserts, // sdp/ao_scan_inserts.d
+ lib.sdp.ao_utils; // sdp/ao_utils.d
// std.conv;
import std.conv : to;
#+END_SRC
-** argv [+3]
-*** argv mixins
+** argv [+3] :argv:
+*** argv mixins & init
#+name: sdp_argv
#+BEGIN_SRC d :exports none
mixin SiSUheader;
@@ -115,9 +129,9 @@ foreach(cmdlnins; argv) {
}
}
#+END_SRC
-*** each file [+2]
+*** each file [+2] :file:
**** filename provided [+1]
-***** scope
+***** scope :scope:
#+name: sdp_each_file_do
#+BEGIN_SRC d :exports none
scope(success) {
@@ -147,7 +161,9 @@ enforce(
"not a sisu markup filename"
);
#+END_SRC
-***** send for processing
+***** read file :file:read:
+[[./ao_markup_source_raw.org][ao_markup_source_raw]]
+
#+name: sdp_each_file_do
#+BEGIN_SRC d :exports none
auto markup_sourcefile_content =
@@ -163,8 +179,14 @@ debug(insert) {
writeln("markup source file path: ", markup_src_file_path); // writeln(m.captures[1]);
writeln(m.captures[2]);
}
+#+END_SRC
+****** incorporate any inserts
+[[./ao_scan_inserts.org][ao_scan_inserts]]
+
+#+name: sdp_each_file_do
+#+BEGIN_SRC d :exports none
if (match(fn_src, rgx.src_fn_master)) {
-/* if master file scan document source for document imports (inserted sub-documents) */
+/+ if master file scan document source for document imports (inserted sub-documents) +/
auto ins = new Inserts();
auto markup_master_sourcefile_content =
ins.scan_doc_source(markup_sourcefile_content, fn_src);
@@ -179,7 +201,11 @@ debug(raw) {
writeln(line);
}
}
-/* process document ao_abstract_doc_source SiSUdocAbstraction::Abstraction return abstraction as tuple */
+#+END_SRC
+***** send for processing :processing:
+#+name: sdp_each_file_do
+#+BEGIN_SRC d :exports none
+/+ process document ao_abstract_doc_source SiSUdocAbstraction::Abstraction return abstraction as tuple +/
auto t =
abs.abstract_doc_source(msc);
static assert(!isTypeTuple!(t));