diff --git a/Documentation/Makefile.files b/Documentation/Makefile.files index 1479cddf86..79368b0cef 100644 --- a/Documentation/Makefile.files +++ b/Documentation/Makefile.files @@ -50,55 +50,6 @@ swagger: @srcdir@/Documentation/DocuBlocks/Rest/ \ ) > @srcdir@/js/apps/system/_admin/aardvark/APP/api-docs.json -## ----------------------------------------------------------------------------- -## --SECTION-- EXAMPLES -## ----------------------------------------------------------------------------- - -################################################################################ -### @brief generate examples -################################################################################ - -.PHONY: examples - -examples: - @rm -f /tmp/arangodb.examples - rm -rf @srcdir@/Documentation/Books/ppbooks - python @srcdir@/Documentation/Scripts/generateExamples.py \ - --outputDir @builddir@/Documentation/Examples \ - --onlyThisOne "$(FILTER_EXAMPLE)" \ - --outputFile /tmp/arangosh.examples.js \ - --arangoshSetup @srcdir@/Documentation/Examples/setup-arangosh.js \ - @srcdir@/Documentation/DocuBlocks \ - @srcdir@/Documentation/Books/Users - - if test -z "$(server.endpoint)"; then \ - $(MAKE) start-server PID=$(PID) \ - SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" \ - PROTO=http ;\ - @builddir@/bin/arangosh \ - -s \ - -c @srcdir@/etc/relative/arangosh.conf \ - --server.password "" \ - --server.endpoint tcp://$(VOCHOST):$(VOCPORT) \ - --javascript.execute /tmp/arangosh.examples.js ;\ - else \ - @builddir@/bin/arangosh \ - -s \ - -c @srcdir@/etc/relative/arangosh.conf \ - --server.password "" \ - --server.endpoint $(server.endpoint) \ - --javascript.execute /tmp/arangosh.examples.js ;\ - fi - -examples-inspect-file: - @echo "generating /tmp/allExamples.html" - @(printf "
\n"; \
-	   for thisExample in Documentation/Examples/*.generated; do \
-		printf "
\n

$$thisExample

\n"; \ - cat $$thisExample; \ - done; \ - printf "
") > /tmp/allExamples.html - ## ----------------------------------------------------------------------------- ## --SECTION-- END-OF-FILE ## ----------------------------------------------------------------------------- diff --git a/Documentation/Scripts/allExamples.sh b/Documentation/Scripts/allExamples.sh new file mode 100755 index 0000000000..aa882f11e3 --- /dev/null +++ b/Documentation/Scripts/allExamples.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo "generating /tmp/allExamples.html" +(printf "
\n";
+ for thisExample in Documentation/Examples/*.generated; do 
+     printf "
\n

$thisExample

\n"; + cat $thisExample; + done; + printf "
") > /tmp/allExamples.html diff --git a/README_maintainers.md b/README_maintainers.md index 51b229275f..7f045a18f3 100644 --- a/README_maintainers.md +++ b/README_maintainers.md @@ -447,18 +447,17 @@ Where to add new... generate -------- - - `make examples` - on top level to generate Documentation/Examples - - `make examples FILTER_EXAMPLE=geoIndexSelect` will only produce one example - *geoIndexSelect* - - `make examples FILTER_EXAMPLE='MOD.*'` will only produce the examples matching that regex; Note that + - `./scripts/generateExamples --onlyThisOne geoIndexSelect` will only produce one example - *geoIndexSelect* + - `./scripts/generateExamples --onlyThisOne 'MOD.*'` will only produce the examples matching that regex; Note that examples with enumerations in their name may base on others in their series - so you should generate the whole group. - - `make examples server.endpoint=tcp://127.0.0.1:8529` will utilize an existing arangod instead of starting a new one. + - `./scripts/generateExamples --server.endpoint tcp://127.0.0.1:8529` will utilize an existing arangod instead of starting a new one. this does seriously cut down the execution time. - alternatively you can use generateExamples (i.e. on windows since the make target is not portable) like that: `./scripts/generateExamples --server.endpoint 'tcp://127.0.0.1:8529' --withPython 3rdParty/V8-4.3.61/third_party/python_26/python26.exe --onlyThisOne 'MOD.*'` - - `make examples-inspect-file` generates a file where you can inspect all examples for readability. + - `./Documentation/Scripts/allExamples.sh` generates a file where you can inspect all examples for readability. - `make swagger` - on top level to generate the documentation interactively with the server; you may use [the swagger editor](https://github.com/swagger-api/swagger-editor) to revalidate whether *js/apps/system/_admin/aardvark/APP/api-docs.json* is accurate.