[qooxdoo-commit] SF.net SVN: qooxdoo:[26964] trunk/qooxdoo/tool
Brought to you by:
ecker,
martinwittemann
From: <th...@us...> - 2011-04-29 15:26:08
|
Revision: 26964 http://qooxdoo.svn.sourceforge.net/qooxdoo/?rev=26964&view=rev Author: thron7 Date: 2011-04-29 15:26:01 +0000 (Fri, 29 Apr 2011) Log Message: ----------- [BUG #3659] switched config.json to use generator_api.py Modified Paths: -------------- trunk/qooxdoo/tool/bin/generator_api.py trunk/qooxdoo/tool/config.json Modified: trunk/qooxdoo/tool/bin/generator_api.py =================================================================== --- trunk/qooxdoo/tool/bin/generator_api.py 2011-04-29 14:30:19 UTC (rev 26963) +++ trunk/qooxdoo/tool/bin/generator_api.py 2011-04-29 15:26:01 UTC (rev 26964) @@ -80,12 +80,12 @@ levels = apipackage.split('.') curr = apidata['children'][0]['children'] for pos,level in enumerate(levels): - if level not in curr: + if level not in (x['attributes']['name'] for x in curr if 'name' in x['attributes']): newentry = { "children" : [], "type" : "packages" if pos % 2 else "package", "attributes" : { - "packageName" : level, + "packageName" : ".".join(levels[:pos]), "name" : level, "fullName" : ".".join(levels[:pos+1]) } @@ -93,10 +93,12 @@ if pos==len(levels)-1: newentry["externalRef"] = True #del newentry['children'] + #newentry["type"] = "classes" + pass curr.append(newentry) curr = newentry['children'] else: - curr = [x for x in curr if x[name]==level][0] + curr = [x['children'] for x in curr if x['attributes']['name']==level][0] # store apidata Modified: trunk/qooxdoo/tool/config.json =================================================================== --- trunk/qooxdoo/tool/config.json 2011-04-29 14:30:19 UTC (rev 26963) +++ trunk/qooxdoo/tool/config.json 2011-04-29 15:26:01 UTC (rev 26964) @@ -48,50 +48,25 @@ "apiconf::build-resources", "apiconf::build-script", "apiconf::build-files"/*, - "api-data" + "tool-api-data" */ ] } - ,"api-data" : + ,"tool-api-data" : { "desc" : "create api doc json data files" + ,"extend" : ["cache"] ,"let" : { "API_SCRIPT" : "${BUILD_PATH}/script" ,"XSLTPROC" : "xsltproc" } - ,"run" : - [ - "run-pythondoc", - "run-xml-transform", - "run-json-transform" - ] - } - - ,"run-pythondoc" : - { - "shell" : + ,"shell" : { - "command" : "${PYTHON_CMD} admin/bin/pythondoc.py -x pylib/generator > ${API_SCRIPT}/pydoc.xml" + "command" : "${PYTHON_CMD} bin/generator_api.py pylib/generator ${API_SCRIPT}" } } - - ,"run-xml-transform" : - { - "shell" : - { - "command" : "${XSLTPROC} data/apidoc/pydoc2qx-xml.xsl ${API_SCRIPT}/pydoc.xml > ${API_SCRIPT}/qx.xml" - } - } - - ,"run-json-transform" : - { - "shell" : - { - "command" : "${XSLTPROC} data/apidoc/qx-xml2qx-json.xsl ${API_SCRIPT}/qx.xml > ${API_SCRIPT}/apidata.json" - } - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |