diff -r 044383f39525 -r be27ed110b50 buildframework/helium/tools/common/docs.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/common/docs.ant.xml Wed Oct 28 14:39:48 2009 +0000 @@ -0,0 +1,876 @@ + + + + + Documentation generation targets. + + + + + + + + + + + + + + + doc: xml(${helium.doc.dir}/src/helium_overview.xml) + + + + + + + + + + + + + + + + + + + + + + + + doc: xml(${helium.build.dir}/doc/ivy/tool-dependencies-ido.xml) + + + + + + + + + + + + + + + + + + + + doc: xml(${database.file}) + + + + + + + + + + + + Python modules path: ${epydoc.python.modules.path} + + + + + + + + + + + + + + + + + + + + + API Documentation]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + doc: xml(${database.file}) + + + + + + Processing dot file: @{dot.file} + + + + + + + + + + + + + + + + + + + + + + + + + ant: antProperties() + doc: xml(${database.file}) + data: xml(${helium.build.dir}/helium_data_model.xml_parsed) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ant: antProperties() + + + + + + + project: antProject() + + + + + ant: antProperties() + + + + + ant: antProperties() + + + + + ant: antProperties() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import html2rest +import os +import codecs +#import traceback +for root, dirs, files in os.walk(r'${helium.build.dir}/doc/api', topdown=False): + for fname in files: + if '.html' in fname: + filename = os.path.abspath(os.path.join(root, fname)) + rstfilename = filename.replace('.html', '.rst') + try: + out = open(rstfilename, 'w') + html2rest.html2rest(html2rest.readsoup(filename), out) + except: + #traceback.print_exc() + print filename + ' failed to be converted to rst' + finally: + out.close() + + try: + rstfile = codecs.open(rstfilename, 'r', 'utf8') + rstfile.read() + except: + print rstfilename + ' has invalid unicode' + rstfile.close() + os.remove(rstfilename) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import urllib +import helium.documentation + +old_db_file = urllib.urlopen(r'${last.major.release.database.url}') +writer = helium.documentation.APIDeltaWriter(old_db_file, r'${database.file}') +writer.write(r'${helium.build.dir}/doc/api_changes.xml') + + + + doc: xml(${helium.build.dir}/doc/api_changes.xml) + old_release: ${last.major.helium.version} + new_release: ${helium.version} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Building doc: @{document} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Building doc: @{document} + + + + + + + + + + + + + + + + + + + + +from __future__ import with_statement +import re +import os +import string +import amara +import codecs +import ant + +setpath = r'${helium.dir}'+'/tools' + +print "Searching under "+setpath + +dbPath = r'${database.file}' +dbPath = 'file:///'+ dbPath.replace('\\','/') +dbPrj = amara.parse(dbPath) + +for root, dirs, files in os.walk(setpath, topdown=False): + for fname in files: + filePattern = re.compile('.ant.xml$') + fileMatch = filePattern.search(fname) + modulelist = [] + if (fileMatch): + filePath = os.path.abspath(os.path.join(root, fname)) + with open(filePath) as f: + filePathAmara = 'file:///'+ filePath.replace('\\','/') + curPrj=amara.parse(filePathAmara) + for line in f: + linePattern = re.compile('^import') + lineMatch = linePattern.search(line) + if ((lineMatch) and (line.find('.')==-1)): + newLine = line.replace('import','') + newLine = newLine.replace(',','') + moduleArray = newLine.split() + for curModule in moduleArray: + try: + importModule = __import__(curModule) + modulePath=importModule.__file__ + if (modulePath.find('\\helium\\tools')!= -1): + for projectList in dbPrj.antDatabase.project: + if (projectList.name==curPrj.project.name): + if not (curModule in modulelist): + print " Python module : " +curModule + moduleElement = projectList.pythonDependency.xml_create_element(u'module', content=u''+curModule) + projectList.pythonDependency.xml_append(moduleElement) + modulelist = modulelist + [curModule] + except Exception, e: + error ="yes" + + +file_object = codecs.open(r'${database.file}', 'w', "utf_8") +file_object.write(dbPrj.xml(indent=u"yes")) +file_object.close() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import os +import dependancygraph + +dependancygraph.createGraph(r'${ivy.xml.file}', r'${dependency.grph}', r'${python.dir}', r'${python.internal.dir}', r'${subcon}') + + + + + + + + + + + + + +import os +import dependancygraph + +dependancygraph.externalDependancies(r'${database.file}.parsed', r'${dependency.external.grph}') + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import os +import dependancygraph + +dependancygraph.findLogFiles(r'${database.file}.parsed', r'${dependency.external.grph}') + + + + + + + + + + + + + + + + + + + + + ant: antProperties() + + + + + + Processing dot file: @{dot.file} + + + + + + + + + + + + + +