From kde-panel-devel Wed Mar 28 22:58:44 2012 From: =?utf-8?q?Sebastian=20K=C3=BCgler?= Date: Wed, 28 Mar 2012 22:58:44 +0000 To: kde-panel-devel Subject: quality/apidox/src Message-Id: <20120328225844.2733AAC899 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=133297562422411 SVN commit 1287531 by sebas: Plasma QML apidox script works recursively now This script now takes a base path, walks into it and generates a flat list of html files, just like for the plasma components previously. The script should be run from kde-runtime/plasma/declarativeimports/ like so: qmlapigenerator.py -v "Plasma Quick master" \ -t /home/sebas/kdesvn/src/apidox/data \ -i /home/sebas/kdesvn/src/kde-runtime/plasma/declarativeimports/ \ -o out/ CCMAIL:winter@kde.org CCMAIL:plasma-devel@kde.org M +12 -15 qmlapigenerator.py --- trunk/quality/apidox/src/qmlapigenerator.py #1287530:1287531 @@ -9,6 +9,7 @@ class File: def __init__(self,string): self.qmlFile = string + ".qml" + self.fullPath = "" self.className = string self.properties = {} self.inherits = [] @@ -21,7 +22,7 @@ self.errorLine = 0 def createApi(self): print self.className - f = open(qmlPath + '/' + self.qmlFile, "r") + f = open(self.fullPath, "r") self.apiFlags = {"Inherits:" : False, "Imports:" : False, "Description:" : False, "Properties:" : False, "Signals:" : False, "Methods:": False} insideApi = False inherits = {} @@ -58,9 +59,6 @@ self.error = True self.errorLine = i - - - def retrieveInherits(self,string): if self.apiFlags["Inherits:"] == True: self.inherits.append(string) @@ -202,8 +200,6 @@ contentsString += ('
  • ' + self.signalsList()[key]["name"] + "
  • ") contentsString += '' - - if len(self.propertyList()) > 0: contentsString += ("

    Properties

    ") for key in range(len(self.propertyList())): @@ -258,10 +254,18 @@ templateFile.close() linksHtml = '\n' outFile = open(outPath + '/index.html',"w") @@ -269,12 +273,5 @@ outFile.write(templateString.format(*varg)) outFile.close() -for fileName in os.listdir(qmlPath): - if '.qml' in fileName: - className = fileName.replace(".qml", "") - parser = File(className) - parser.createApi() - parser.writeHtml() - _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel