From 7da8a09e378350383cf4de2104b72e5916434ce3 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Tue, 12 Jan 2016 19:04:55 +0100 Subject: [PATCH] Fix traversing of DocuBlocks directory. --- Documentation/Makefile.files | 12 +++--------- Documentation/Scripts/generateExamples.py | 3 ++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Documentation/Makefile.files b/Documentation/Makefile.files index 243f21f8a0..1479cddf86 100644 --- a/Documentation/Makefile.files +++ b/Documentation/Makefile.files @@ -62,20 +62,14 @@ swagger: 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@/js/actions \ - @srcdir@/js/client \ - @srcdir@/js/common \ - @srcdir@/js/server \ - @srcdir@/js/apps/system/_api/gharial/APP \ - @srcdir@/Documentation/Books/Users \ - @srcdir@/arangod/RestHandler \ - @srcdir@/arangod/V8Server + @srcdir@/Documentation/DocuBlocks \ + @srcdir@/Documentation/Books/Users if test -z "$(server.endpoint)"; then \ $(MAKE) start-server PID=$(PID) \ diff --git a/Documentation/Scripts/generateExamples.py b/Documentation/Scripts/generateExamples.py index b5fb2a1a1d..abab4e1f81 100644 --- a/Documentation/Scripts/generateExamples.py +++ b/Documentation/Scripts/generateExamples.py @@ -464,7 +464,7 @@ def loopDirectories(): if os.path.isdir(filename): for root, dirs, files in os.walk(filename): for file in files: - if (file.endswith(".mdpp") or file.endswith(".js") or file.endswith(".cpp")): + if (file.endswith(".md") or file.endswith(".mdpp") or file.endswith(".js") or file.endswith(".cpp")): filenames.append(os.path.join(root, file)) else: filenames.append(filename) @@ -490,6 +490,7 @@ def loopDirectories(): fstate = OPTION_NORMAL sys.stdout = open(filename, 'w') + print >> sys.stderr, repr(filenames) for filename in filenames: if (filename.find("#") < 0): f = open(filename, "r")