From c8c5e2205b80f79590af55e91776085b5acd0490 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 19 Aug 2013 15:14:40 +0200 Subject: Update source code browser html generation scripts for new layout. --- .gitignore | 2 +- scripts/runtohtml.sh | 8 ++++---- scripts/tohtml.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f3e5994a..9dff3859 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,4 @@ platform/android/local.properties platform/android/.classpath platform/android/.project platform/android/.settings -docs/source +docs/browse diff --git a/scripts/runtohtml.sh b/scripts/runtohtml.sh index 9b94e22b..cd1fee90 100644 --- a/scripts/runtohtml.sh +++ b/scripts/runtohtml.sh @@ -1,16 +1,16 @@ #!/bin/bash -mkdir -p doc/source -rm doc/source/*.html +rm -rf docs/browse -FILES="fitz/*.[ch] draw/*.[ch] pdf/*.[ch] xps/*.[ch] cbz/*.[ch] apps/*.[ch]" +FILES=$(find include source platform -name '*.[ch]') echo running ctags to make xref ctags -x $FILES > tags-xref for input in $FILES do - output=doc/source/$(basename $input).html + output=docs/browse/$input.html + mkdir -p $(dirname $output) echo $input $output python scripts/tohtml.py < $input > $output done diff --git a/scripts/tohtml.py b/scripts/tohtml.py index 6ad22ecd..3dd1c759 100644 --- a/scripts/tohtml.py +++ b/scripts/tohtml.py @@ -28,9 +28,9 @@ def load_tags(): if not is_public(ident): continue if type == 'function': - tags[ident] = '%s' % (os.path.basename(file), line, ident) + tags[ident] = '%s' % ("/docs/browse/" + file, line, ident) if type == 'typedef' or type == 'struct': - tags[ident] = '%s' % (os.path.basename(file), line, ident) + tags[ident] = '%s' % ("/docs/browse/" + file, line, ident) return tags tags = load_tags() @@ -48,7 +48,7 @@ for line in sys.stdin.readlines(): line = line.replace("/*", '/*') line = line.replace("*/", '*/') - line = re.sub('^#include "([a-z-]*\.h)"', '#include "\\1"', line) + line = re.sub('^#include "([a-z-/]*\.h)"', '#include "\\1"', line) # find identifiers and hyperlink to their definitions words = re.split("(\W+)", line) -- cgit v1.2.3