Closed mwetter closed 8 years ago
Cleaned up various html errors using
import os, fnmatch
def find_files(directory, pattern):
for root, dirs, files in os.walk(directory):
for basename in files:
if fnmatch.fnmatch(basename, pattern):
filename = os.path.join(root, basename)
yield filename
di = { '<CODE>binStr.length > length</CODE>':
'<CODE>binStr.length > length</CODE>',
'<CODE>n < 0</CODE>':
'<CODE>n < 0</CODE>',
'<CODE>x0<CODE>': '<CODE>x0</CODE>',
'<d>': '<br/>',
'<code>max <= 0</code>': '<code>max ≤ 0</code>',
'<code>x <': '<code>x <',
'<CODE>secondDelimiter</CODE><LI>': '<CODE>secondDelimiter</CODE><p>',
'a section occurs or until end-of-file occurs.<LI>': 'a section occurs or until end-of-file occurs.<p>',
'All found keywords are written into sk.<LI>': 'All found keywords are written into sk.<p>',
'whereas the last occured value is written into sk.<LI>': 'whereas the last occured value is written into sk.<p>',
'<code>l <= x <= u</code>': '<code>l ≤ x ≤ u</code>',
' mapping key -> value': ' mapping key to value',
'*@param': '* @param',
'*@exception': '* @exception',
'*@return': '* @return',
'<CODE>-1</CODE> if o1 > o2': '<CODE>-1</CODE> if o1 < o2',
'dy (dy >= dx)': 'dy (dy ≥ dx)',
'<CODE> n=binStr.length < length </CODE>': '<CODE> n=binStr.length ≤ length </CODE>',
'detail message.<br/>': 'detail message.<p>',
'or not.<br/>': 'or not.<p>',
'is written into sk.</LI>': 'is written into sk.',
'menu ->': 'menu →'
}
for filename in find_files('src', '*.java'):
# Read in the file
filedata = None
with open(filename, 'r') as file :
filedata = file.read()
# Replace the target string
for key in di:
filedata = filedata.replace(key, di[key])
# Write the file out again
with open(filename, 'w') as file:
file.write(filedata)
Then, disabled doclint in Makefile
to be able to generate javadoc.
This is now on the master
Various files have wrong html syntax that lead to errors when running
make