orange / install-scripts / doc /

from xml.dom import minidom
import re

re_parenth = re.compile(r"\(.*\)")

widgets = {}
people = {}

dom1 = minidom.parse(open("../../OrangeCanvas/widgetregistry.xml", "rt"))
for categoryNode in dom1.getElementsByTagName("category"):
    category = categoryNode.getAttribute("name")
    for widgetNode in categoryNode.getElementsByTagName("widget"):
        widget = widgetNode.getAttribute("name")
        contact = re_parenth.sub("", widgetNode.getAttribute("contact")).strip()
        people.setdefault(contact, {}).setdefault(category, []).append(widget)
        widgets.setdefault(category, []).append((widget, contact))

def sorted(d):
    return d

print "*** WIDGETS by AUTHORS\n"

for contact in sorted(people.keys()):
    print contact or "<no contact>"
    work = people[contact]
    for category in sorted(work.keys()):
        print "    %s: %s" % (category, ", ".join(sorted(work[category])))

print "\n\n\n*** AUTHORS by WIDGETS\n"

for category in sorted(widgets.keys()):
    print category
    categoryWidgets = widgets[category]
    for widget in sorted(categoryWidgets):
        print "    %s: %s" % widget
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.