Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added known issues and workarounds. Identified international characte…

…r encoding issues with later versions of Cheetah; updated installation instructions with advice for the version of Cheetah to install.
  • Loading branch information...
commit 2affa9a64119afcf158b5e387d144cac3c5b6241 1 parent 8a1b2a3
Adam Moore authored
View
5 CHANGES
@@ -1,5 +1,10 @@
ChangeLog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Next
+ * added multi-language support
+ * improved international character support
+ * added known issues and workarounds
+
1.0.0b1
* Initial release
View
14 INSTALL
@@ -25,6 +25,20 @@ Unix (including cygwin):
easy_install pygments
easy_install Cheetah
+
+ *****************************************************************************
+ *****************************************************************************
+ ***
+ *** NOTE: recent versions of Cheetah are sometimes throwing errors when
+ *** encountering international characters. Until this is resolved, you must
+ *** use Cheetah 2.1.0 or below if you are experiencing a unicode error
+ *** when parsing your files.
+ ***
+ *** easy_install http://downloads.sourceforge.net/sourceforge/cheetahtemplate/Cheetah-2.1.0.tar.gz?use_mirror=superb-west
+ ***
+ *****************************************************************************
+ *****************************************************************************
+
easy_install simplejson
View
36 KNOWN_ISSUES
@@ -0,0 +1,36 @@
+**************************************************************************
+Unicode Errors:
+
+Recent versions of Cheetah are sometimes throwing errors when
+encountering international characters. Until this is resolved, you must
+use Cheetah 2.1.0 or below if you are experiencing unicode errors
+when parsing your files.
+
+easy_install http://downloads.sourceforge.net/sourceforge/cheetahtemplate/Cheetah-2.1.0.tar.gz?use_mirror=superb-west
+
+**************************************************************************
+Mapping Files to Modules:
+
+Because a single @module is supported for a set of files, the parser expects that all files in
+the input directory belong to the same module. If multiple modules exist either in the source
+directory or in any subdirectory, files may get mapped to modules incorrectly.
+
+For example:
+
+sourcedir/
+ module1.js
+ module2.js
+
+sourcedir/
+ module1/
+ foo.js
+ module2/
+ bar.js
+
+$ yuidoc.py sourcedir
+
+The workaround is to use the second pattern and pass the source directory for each module to yuidoc
+
+$ yuidoc.py module1 module2
+
+**************************************************************************
View
3  README
@@ -33,6 +33,9 @@ CHANGES
INSTALL
Installation instructions
+KNOWN_ISSUES
+ Known issues and workarounds.
+
TAGS
Supported tags
View
12 bin/yuidoc_generate.py
@@ -105,6 +105,8 @@ def cleanseStr(self, strg):
def write(self, filename, data):
out = open(os.path.join(self.outpath, filename), "w")
out.writelines(str(data))
+ # out.writelines(unicode(data))
+ # out.writelines(unicode(data, 'utf-8', 'xmlcharrefreplace'))
out.close()
def process(self):
@@ -147,7 +149,7 @@ def assignGlobalProperties(template):
def transferToTemplate(prop, dict, template, valOverride=''):
val = ""
if prop in dict:
- val = unicode(dict[prop])
+ val = dict[prop]
if valOverride:
val = valOverride
@@ -157,7 +159,7 @@ def transferToTemplate(prop, dict, template, valOverride=''):
def transferToDict(prop, dict1, dict2, default="", skipOverrideIfNoMatch=False):
val = ""
if prop in dict1:
- val = unicode(dict1[prop])
+ val = dict1[prop]
if not val:
val = default
else:
@@ -332,7 +334,7 @@ def allprop_sort(x, y):
# class API view
#for i in classes:
for i in m[CLASS_LIST]:
- self.classname = unicode(i)
+ self.classname = i
c = classes[i]
if shouldShowClass(c):
log.info("Generating API page for " + i)
@@ -525,7 +527,7 @@ def allprop_sort(x, y):
# get inherited data
inherited = t.inherited = {PROPERTIES:{}, METHODS:{}, EVENTS:{}, CONFIGS:{}, SUPERCLASS: {} }
if EXTENDS in c:
- supercname = t.extends = unicode(c[EXTENDS])
+ supercname = t.extends = c[EXTENDS]
if supercname in classes:
superc = classes[supercname]
getPropsFromSuperclass(superc, classes, inherited)
@@ -601,7 +603,7 @@ def allprop_sort(x, y):
# class source view
for i in m[FILE_LIST]:
log.info("Generating source view for " + i)
- self.filename = unicode(i)
+ self.filename = i
assignGlobalProperties(t)
self.write("%s.html" %(self.filename), t)
View
16 bin/yuidoc_parse.py
@@ -42,7 +42,7 @@ def parseFile(path, file):
f=open(os.path.join(path, file))
#adding a return to the beginning of the line allows for:
# #!/usr/bin/foo
- # MOVED to the fil marker
+ # MOVED to the file marker
# fileStr = StringIO("\n%s" % f.read()).getvalue()
fileStr = StringIO("%s" % f.read()).getvalue()
log.info("parsing " + file)
@@ -313,9 +313,9 @@ def parseParams(tokenMap, dict, srctag=PARAM, desttag=PARAMS):
if match:
if match.group(4):
- type, description = "", unicode(match.group(4) + match.group(5), 'utf-8', 'xmlcharrefreplace')
+ type, description = "", match.group(4) + match.group(5)
else:
- type, description = unicode(match.group(2), 'utf-8', 'xmlcharrefreplace'), unicode((match.group(1) + match.group(3)).strip(), 'utf-8', 'xmlcharrefreplace')
+ type, description = match.group(2), (match.group(1) + match.group(3)).strip()
else:
type, description = "", ""
@@ -356,9 +356,9 @@ def parseReturn(tokenMap, dict):
if match:
if match.group(4):
- type, description = "", unicode(match.group(4) + match.group(5), 'utf-8', 'xmlcharrefreplace')
+ type, description = "", match.group(4) + match.group(5)
else:
- type, description = unicode(match.group(2), 'utf-8', 'xmlcharrefreplace'), unicode((match.group(1) + match.group(3)).strip(), 'utf-8', 'xmlcharrefreplace')
+ type, description = match.group(2), (match.group(1) + match.group(3)).strip()
else:
type, description = "", ""
@@ -436,8 +436,8 @@ def defineClass(name):
# for the block
if token and DESCRIPTION not in tokenMap:
- token = unicode(token, 'utf-8', 'xmlcharrefreplace')
- # token.encode('utf-8', 'xmlcharrefreplace')
+ # token = unicode(token, 'utf-8', 'xmlcharrefreplace')
+ ############################ token.encode('utf-8', 'xmlcharrefreplace')
tokenMap[DESCRIPTION] = [token]
else: pass # I don't think this can happen any longer
@@ -541,7 +541,7 @@ def parseModule(tokenMap):
return target, tokenMap
- print "DAV: %s" % tokenMap
+ # print "DAV: %s" % tokenMap
if FILE_MARKER in tokenMap:
if not FILE_MAP in self.data: self.data[FILE_MAP] = {}
self.currentFile = desc
View
2  test/intl.sh
@@ -26,5 +26,5 @@ version="localtest"
##############################################################################
-$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
+python $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
Please sign in to comment.
Something went wrong with that request. Please try again.