Last active
February 23, 2019 16:51
-
-
Save lcrs/0036a84a6465d53167b34ed1447461c2 to your computer and use it in GitHub Desktop.
List matchbox shaders and their descriptions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os, glob, xml.etree.ElementTree as et | |
html = open('/tmp/matchboxlist.html', 'w') | |
xmls = glob.glob('/opt/Autodesk/presets/2019.2.1/matchbox/shaders/LOGIK/*.xml') | |
xmls.sort() | |
for xml in xmls: | |
name = os.path.basename(xml)[:-4] | |
tree = et.parse(xml) | |
desc = '' | |
try: | |
desc = tree.getroot().attrib['Description'] | |
except: | |
desc = '(no description in xml)' | |
html.write('<h1>%s</h1>\n<p>%s</p>\n\n' % (name, desc.encode('utf-8'))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment