summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-04-07 14:37:27 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-04-13 14:13:31 +0200
commitc3400385a878c71ab9e60b7cfb88b437234ac353 (patch)
tree3d930e35501d4122c5b554064cf3b7a9328c1e08 /scripts
parentee39a8939ee668ee192313ed32eae53f6c2bc427 (diff)
downloadmupdf-c3400385a878c71ab9e60b7cfb88b437234ac353.tar.xz
Remove obsolete script to create browsable source files.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/runtohtml.sh18
-rw-r--r--scripts/tohtml.py69
2 files changed, 0 insertions, 87 deletions
diff --git a/scripts/runtohtml.sh b/scripts/runtohtml.sh
deleted file mode 100644
index 918eb652..00000000
--- a/scripts/runtohtml.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-rm -rf docs/browse
-
-FILES=$(find include source platform -name '*.[chm]')
-
-echo running ctags to make xref
-ctags -x $FILES > tags-xref
-
-for input in $FILES
-do
- output=docs/browse/$input.html
- mkdir -p $(dirname $output)
- echo $input $output
- python scripts/tohtml.py $input < $input > $output
-done
-
-rm tags-xref
diff --git a/scripts/tohtml.py b/scripts/tohtml.py
deleted file mode 100644
index b6cb548e..00000000
--- a/scripts/tohtml.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import sys, os, re
-
-HEADER="""<!DOCTYPE html>
-<html>
-<head>
-<style>
-body { background-color:white; color:black; margin:16pt; }
-a { text-decoration:none; color:darkblue; }
-a.line { position:relative; padding-top:300px; }
-.comment { color:green; font-style:italic; }
-.comment a { color:darkgreen; }
-</style>
-</head>
-<body>
-<pre>"""
-
-FOOTER="""</pre></body>"""
-
-prefixes = [ 'fz_', 'pdf_', 'xps_', 'cbz_', 'html_', 'epub_', 'svg_', 'ui_', 'pdfapp_' ]
-
-def is_public(s):
- for prefix in prefixes:
- if s.startswith(prefix):
- return True
- return False
-
-def load_tags(curfile):
- tags = {}
- for line in open("tags-xref").readlines():
- ident, type, line, file, text = line.split(None, 4)
- if not is_public(ident) and file != curfile:
- continue
- if type == 'function' or type == 'macro':
- tags[ident] = '<a class="function" href="%s#%s">%s</a>' % ("/docs/browse/" + file, line, ident)
- if type == 'typedef':
- tags[ident] = '<a class="typedef" href="%s#%s">%s</a>' % ("/docs/browse/" + file, line, ident)
- return tags
-
-tags = load_tags(sys.argv[1])
-
-def quote(s):
- return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
-
-print HEADER
-
-N = 1
-for line in sys.stdin.readlines():
- # expand tabs, html-quote special characters and colorize comments
- line = line.replace('\t', ' ').rstrip()
- line = quote(line)
- line = line.replace("/*", '<span class="comment">/*')
- line = line.replace("*/", '*/</span>')
-
- 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)
- line = ""
- for word in words:
- if word in tags:
- word = tags[word]
- line += word
-
- #print('<a class="line" name="%d">%4d</a> %s' % (N, N, line))
- print('<a class="line" name="%d"></a>%s' % (N, line))
-
- N = N + 1
-
-print FOOTER