diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | scripts/runtohtml.sh | 8 | ||||
-rw-r--r-- | scripts/tohtml.py | 6 |
3 files changed, 8 insertions, 8 deletions
@@ -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] = '<a class="function" href="%s#%s">%s</a>' % (os.path.basename(file), line, ident) + tags[ident] = '<a class="function" href="%s#%s">%s</a>' % ("/docs/browse/" + file, line, ident) if type == 'typedef' or type == 'struct': - tags[ident] = '<a class="typedef" href="%s#%s">%s</a>' % (os.path.basename(file), line, ident) + tags[ident] = '<a class="typedef" href="%s#%s">%s</a>' % ("/docs/browse/" + file, line, ident) return tags tags = load_tags() @@ -48,7 +48,7 @@ for line in sys.stdin.readlines(): line = line.replace("/*", '<span class="comment">/*') line = line.replace("*/", '*/</span>') - line = re.sub('^#include "([a-z-]*\.h)"', '#include "<a href="\\1">\\1</a>"', line) + line = re.sub('^#include "([a-z-/]*\.h)"', '#include "<a href="/docs/browse/include/\\1">\\1</a>"', line) # find identifiers and hyperlink to their definitions words = re.split("(\W+)", line) |