aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dub.sdl2
-rw-r--r--dub.selections.json1
-rw-r--r--maker.org24
-rw-r--r--org/imports.org94
-rw-r--r--org/output_hub.org9
-rw-r--r--org/sdp.org43
-rw-r--r--src/sdp/abstraction.d31
-rw-r--r--src/sdp/imports_for_ao.d41
-rw-r--r--src/sdp/imports_for_output.d28
-rw-r--r--src/sdp/output_hub.d9
-rwxr-xr-xsrc/sisu_d_parser.d31
11 files changed, 188 insertions, 125 deletions
diff --git a/dub.sdl b/dub.sdl
index 6feb4ce..2b55dd0 100644
--- a/dub.sdl
+++ b/dub.sdl
@@ -5,9 +5,11 @@ authors "Ralph Amissah"
copyright "Copyright © 2016 Ralph Amissah"
license "AGPL-3+"
targetPath "./bin"
+sourcePath "./src"
stringImportPaths "./views"
buildRequirements "allowWarnings"
dependency "sdlang-d" version="~>0.10.0"
+dependency "archive" version="~>0.6.0"
configuration "sdp-release" {
name "release"
targetType "executable"
diff --git a/dub.selections.json b/dub.selections.json
index dba534e..d0f8e44 100644
--- a/dub.selections.json
+++ b/dub.selections.json
@@ -1,6 +1,7 @@
{
"fileVersion": 1,
"versions": {
+ "archive": "0.6.0",
"libinputvisitor": "1.2.2",
"sdlang-d": "0.10.1",
"taggedalgebraic": "0.10.4",
diff --git a/maker.org b/maker.org
index 5e6a3c7..ff7509d 100644
--- a/maker.org
+++ b/maker.org
@@ -485,9 +485,11 @@ authors "Ralph Amissah"
copyright "Copyright © 2016 Ralph Amissah"
license "AGPL-3+"
targetPath "./bin"
+sourcePath "./src"
stringImportPaths "./views"
buildRequirements "allowWarnings"
dependency "sdlang-d" version="~>0.10.0"
+dependency "archive" version="~>0.6.0"
#+END_SRC
**** generic :generic:
@@ -843,17 +845,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/sdp.d
-dmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sdp.d
-dmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sdp.d
+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
#+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/sdp.d
-ldc2 -de -w -J./views -I./src/sdp -of=./bin/sdp ./src/sdp.d
-ldc2 -de -w -J./views -I./src/sdp -O4 -release -of=./bin/sdp ./src/sdp.d
+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
#+END_SRC
*** gdc (not done) [#F] :gdc:
@@ -875,15 +877,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/sdp.d
-rdmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sdp.d
-rdmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sdp.d
+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
#dmd
-rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sdp.d
+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
#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/sdp.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/sisu_d_parser.d
#+END_SRC
*** dub [#A] :dub:
diff --git a/org/imports.org b/org/imports.org
new file mode 100644
index 0000000..17819b8
--- /dev/null
+++ b/org/imports.org
@@ -0,0 +1,94 @@
+#+TITLE: sdp hub
+#+AUTHOR: Ralph Amissah
+#+EMAIL: ralph.amissah@gmail.com
+#+STARTUP: indent
+#+LANGUAGE: en
+#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
+#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
+#+OPTIONS: author:nil email:nil creator:nil timestamp:nil
+#+PROPERTY: header-args :padline no :exports code :noweb yes
+#+EXPORT_SELECT_TAGS: export
+#+EXPORT_EXCLUDE_TAGS: noexport
+#+FILETAGS: :sdp:rel:imports:
+#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
+
+* 1. imports for ao
+
+#+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 +/
+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;
+#+END_SRC
+
+* 2. imports for output
+
+#+NAME: version_txt
+#+BEGIN_SRC d :tangle ../src/sdp/imports_for_output.d
+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;
+#+END_SRC
diff --git a/org/output_hub.org b/org/output_hub.org
index e83b36d..4e66c59 100644
--- a/org/output_hub.org
+++ b/org/output_hub.org
@@ -55,14 +55,7 @@ private import
std.uni,
std.utf;
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.imports_for_output;
#+END_SRC
** output options
diff --git a/org/sdp.org b/org/sdp.org
index 827a00f..e34c57b 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -87,19 +87,7 @@ unittest {
#+NAME: imports_sdp
#+BEGIN_SRC d
/+ sdp: sisu document parser, see http://sisudoc.org +/
-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;
+import sdp.imports_for_ao;
#+END_SRC
****** notes
@@ -121,43 +109,14 @@ import
[[./output.org][output]]
[[./sdp.org][sdp]]
-***** sdlang :sdlang:
keep up to date, configuration in ../maker.org
check:
- http://github.com/Abscissa/SDLang-D
- https://github.com/abscissa/libInputVisitor
-#+NAME: imports_sdlang
-#+BEGIN_SRC d
-/+ sdlang http://sdlang.org +/
-import sdlang;
-#+END_SRC
-
-****** notes
-
sdlang.parser,
sdlang.exceptions;
-***** std :std:
-
-#+NAME: imports_std
-#+BEGIN_SRC d
-/+ std +/
-private import
- std.array,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.utf,
- std.conv : to;
-#+END_SRC
-
-****** notes
std.conv,
std.variant,
diff --git a/src/sdp/abstraction.d b/src/sdp/abstraction.d
index 40cf4d3..351fd1f 100644
--- a/src/sdp/abstraction.d
+++ b/src/sdp/abstraction.d
@@ -1,34 +1,9 @@
module sdp.abstraction;
template SiSUabstraction() {
/+ sdp: sisu document parser, see http://sisudoc.org +/
- 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 +/
- import sdlang;
- /+ std +/
- private import
- std.array,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.utf,
- std.conv : to;
+ import sdp.imports_for_ao;
+
+
mixin SiSUrgxInit;
mixin SiSUregisters;
mixin SiSUheaderExtractSDLang;
diff --git a/src/sdp/imports_for_ao.d b/src/sdp/imports_for_ao.d
new file mode 100644
index 0000000..34aa1e1
--- /dev/null
+++ b/src/sdp/imports_for_ao.d
@@ -0,0 +1,41 @@
+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
new file mode 100644
index 0000000..20b3ba1
--- /dev/null
+++ b/src/sdp/imports_for_output.d
@@ -0,0 +1,28 @@
+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/output_hub.d b/src/sdp/output_hub.d
index ef8156c..0ed1653 100644
--- a/src/sdp/output_hub.d
+++ b/src/sdp/output_hub.d
@@ -23,14 +23,7 @@ template outputHub() {
std.uni,
std.utf;
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.imports_for_output;
void outputHub(D,I)(D doc_abstraction, I doc_matters) {
mixin SiSUoutputRgxInit;
auto rgx = Rgx();
diff --git a/src/sisu_d_parser.d b/src/sisu_d_parser.d
index 87b25e9..96e1359 100755
--- a/src/sisu_d_parser.d
+++ b/src/sisu_d_parser.d
@@ -6,34 +6,9 @@ import
sdp.compile_time_info,
sdp.abstraction;
/+ sdp: sisu document parser, see http://sisudoc.org +/
-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 +/
-import sdlang;
-/+ std +/
-private import
- std.array,
- std.exception,
- std.getopt,
- std.process,
- std.stdio,
- std.regex,
- std.string,
- std.traits,
- std.typecons,
- std.utf,
- std.conv : to;
+import sdp.imports_for_ao;
+
+
mixin(import("version.txt"));
mixin CompileTimeInfo;