|
@ -262,11 +262,17 @@ def processApiDoc(doc, testrefs, used_tags): |
|
|
res.append('<h1 id="%s" class="apih1">' % doc['name']) |
|
|
res.append('<h1 id="%s" class="apih1">' % doc['name']) |
|
|
res.append('<a href="#%s"><span class="hidechar">.</span>%s()</a>' % (doc['name'], doc['name'])) |
|
|
res.append('<a href="#%s"><span class="hidechar">.</span>%s()</a>' % (doc['name'], doc['name'])) |
|
|
if floating_list_tags and len(doc['tags']) > 0: |
|
|
if floating_list_tags and len(doc['tags']) > 0: |
|
|
p = sorted(doc['tags'], reverse=True) # reversed because floated to right (which reverses DOM order) |
|
|
# Sort, reverse order because tags are floated to right |
|
|
|
|
|
# (visual order is reverse of DOM order). Sort version |
|
|
|
|
|
# number tags last. |
|
|
|
|
|
|
|
|
# For now, add the introduced version as a tag |
|
|
def mycmp(a,b): |
|
|
if doc.has_key('introduced'): |
|
|
return cmp( (a[0].isdigit(), a), (b[0].isdigit(), b) ) |
|
|
p = [ doc['introduced'] ] + p |
|
|
p = sorted(doc['tags'], reverse=True, cmp=mycmp) |
|
|
|
|
|
|
|
|
|
|
|
# 'introduced' is automatically added as a tag now |
|
|
|
|
|
#if doc.has_key('introduced'): |
|
|
|
|
|
# p = [ doc['introduced'] ] + p |
|
|
if doc.has_key('deprecated'): |
|
|
if doc.has_key('deprecated'): |
|
|
# XXX: must mark deprecation |
|
|
# XXX: must mark deprecation |
|
|
pass |
|
|
pass |
|
@ -746,6 +752,10 @@ def generateApiDoc(apidocdir, apitestdir): |
|
|
apidoc['tags'] = [] # ensures tags is present |
|
|
apidoc['tags'] = [] # ensures tags is present |
|
|
apidoc['name'] = funcname # add funcname automatically |
|
|
apidoc['name'] = funcname # add funcname automatically |
|
|
|
|
|
|
|
|
|
|
|
# add 'introduced' version to tag list automatically |
|
|
|
|
|
if apidoc.has_key('introduced'): |
|
|
|
|
|
apidoc['tags'].insert(0, apidoc['introduced']) |
|
|
|
|
|
|
|
|
if 'omit' in apidoc['tags']: |
|
|
if 'omit' in apidoc['tags']: |
|
|
print 'Omit API doc: ' + str(funcname) |
|
|
print 'Omit API doc: ' + str(funcname) |
|
|
continue |
|
|
continue |
|
|