diff options
Diffstat (limited to 'org/sdp.org')
-rw-r--r-- | org/sdp.org | 129 |
1 files changed, 66 insertions, 63 deletions
diff --git a/org/sdp.org b/org/sdp.org index fad6f12..e359c65 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -13,8 +13,8 @@ #+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n) [[../maker.org][maker.org makefile]] [[./][org/]] - -* TODO version.txt: set version (sisu document parser) :version: +* 0. Code Outline / Structure (tangles) :tangle: +** TODO version.txt: set version (sisu document parser) :version: #+NAME: version_txt #+BEGIN_SRC d :tangle ../views/version.txt @@ -24,10 +24,52 @@ struct Version { int minor; int patch; } -enum ver = Version(0, 9, 4); +enum ver = Version(0, 9, 6); +#+END_SRC + +** TODO sdp src/sdp.d :sdp.d: + +#+BEGIN_SRC d :tangle ../src/sdp.d :shebang #!/usr/bin/env rdmd +/+ + sdp ++/ +<<imports_sdp>> +<<imports_sdlang>> +<<imports_std>> +<<sdp_output_selection>> +<<sdp_version_mixin>> +<<std_mixins>> +/++ A SiSU document parser writen in D. +/ +void main(string[] args) { + <<sdp_mixin>> + <<sdp_args>> + <<sdp_conf_files>> + foreach(fn_src; fns_src) { + if (!empty(fn_src)) { + <<sdp_each_file_do_scope>> + <<sdp_each_file_do_read_sisu_markup_file>> + <<sdp_each_file_do_split_sisu_markup_file_content_into_header_and_body>> + <<sdp_each_file_do_split_sisu_markup_file_header_into_make_and_meta>> + <<sdp_each_file_do_document_abstraction>> + <<sdp_each_file_do_debugs_checkdoc>> + <<sdp_each_file_do_selected_output>> + <<sdp_each_file_do_scope_exit>> + } else { + <<sdp_no_filename_provided>> + } + } +} +unittest { + /++ + name "sdp" + description "A SiSU document parser writen in D." + homepage "http://sisudoc.org" + +/ +} #+END_SRC * sdp.d sisu document parser :sdp.d: + - deal with imports - get options - get command line instructions @@ -494,47 +536,8 @@ writeln("no recognized filename"); break; #+END_SRC -* tangles (code structure) :tangle: -** TODO sdp src/sdp.d :sdp.d: - -#+BEGIN_SRC d :tangle ../src/sdp.d :shebang #!/usr/bin/env rdmd -/+ - sdp -+/ -<<imports_sdp>> -<<imports_sdlang>> -<<imports_std>> -<<sdp_output_selection>> -<<sdp_version_mixin>> -<<std_mixins>> -/++ A SiSU document parser writen in D. +/ -void main(string[] args) { - <<sdp_mixin>> - <<sdp_args>> - <<sdp_conf_files>> - foreach(fn_src; fns_src) { - if (!empty(fn_src)) { - <<sdp_each_file_do_scope>> - <<sdp_each_file_do_read_sisu_markup_file>> - <<sdp_each_file_do_split_sisu_markup_file_content_into_header_and_body>> - <<sdp_each_file_do_split_sisu_markup_file_header_into_make_and_meta>> - <<sdp_each_file_do_document_abstraction>> - <<sdp_each_file_do_debugs_checkdoc>> - <<sdp_each_file_do_selected_output>> - <<sdp_each_file_do_scope_exit>> - } else { - <<sdp_no_filename_provided>> - } - } -} -unittest { - /++ - name "sdp" - description "A SiSU document parser writen in D." - homepage "http://sisudoc.org" - +/ -} -#+END_SRC +* Notes +** directory structure, program file arrangement ├── src │ ├── sdp.d @@ -554,11 +557,11 @@ unittest { ├── views │ └── version.txt -* TODO work on -** program dir structure +** TODO work on +*** program dir structure figure out best program dir structure for dub and compilers, issue with rdmd -** sisu document structure +*** sisu document structure |---------------------+------------------------------------------+------------------------+------------------------+--------| | | | | links | | @@ -615,16 +618,16 @@ figure out best program dir structure for dub and compilers, issue with rdmd - seg ../[fn]/#[ocn] - metadata -** config :config: +*** config :config: using sdlang in sdp -*** sdp config and header? file format? sdl ? yml ? json ? :sdl:sdlang: +**** sdp config and header? file format? sdl ? yml ? json ? :sdl:sdlang: [[https://sdlang.org/][SDL: Simple Declarative Language]] [[http://sdl4r.rubyforge.org/syntaxhighlighter_brush.html][highlighter]] https://github.com/Abscissa/SDLang-D https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md -**** build/ compile +***** build/ compile The recommended way to use SDLang-D is via DUB. Just add a dependency to sdlang-d in your project's dub.json or dub.sdl file as shown here. Then simply @@ -647,7 +650,7 @@ git clone https://github.com/abscissa/libInputVisitor -I{path to SDLang-D}/src -I{path to libInputVisitor}/src #+END_SRC -**** Importing +***** Importing To use SDL, first import the module sdlang: @@ -661,15 +664,15 @@ If you're not using DUB, then you must also include the path the SDLang-D source rdmd --build-only -I{path to sdlang}/src -I{path to libInputVisitor}/src {other flags} yourProgram.d #+END_SRC -**** misc +***** misc http://forum.dlang.org/thread/hphtqkkmrfnlcipnxzai@forum.dlang.org http://forum.dlang.org/thread/gnfctbuhiemidetngrzi@forum.dlang.org?page=23#post-rlxlfveyyzgewhkxhhta:40forum.dlang.org -*** other links +**** other links http://semitwist.com/sdlang-d-docs/v0.9.3/sdlang.html http://semitwist.com/sdlang-d-docs/ -** markup -*** code +*** markup +**** code #+BEGIN_SRC txt :tangle no code.ruby{ @@ -693,7 +696,7 @@ code.d{ }code #+END_SRC -** src dir structure & files +*** src dir structure & files #+BEGIN_SRC txt :tangle no tree /home/ralph/sisu_www/current/src/democratizing_innovation.eric_von_hippel.sst @@ -715,13 +718,13 @@ democratizing_innovation.eric_von_hippel.sst #+END_SRC -** read markup files -*** regular .sst +*** read markup files +**** regular .sst relatively straight forward -*** master .ssm +**** master .ssm master files have been able to read in inser files .ssi and regular files .sst -**** reading in .ssi files is straightforward -**** reading in .sst files is more problematic +***** reading in .ssi files is straightforward +***** reading in .sst files is more problematic .sst files have their own root (structure) either - the root needs to be disabled - not used @@ -735,8 +738,8 @@ or file would have to read and available for use in its header A that is demoted to B -** processing files, currently using utf8 -** check +*** processing files, currently using utf8 +*** check #+BEGIN_SRC text ./.sisu ./_sisu ~/.sisu /etc/.sisu |