summaryrefslogtreecommitdiffstats
path: root/static/img/scripts/credits.py
diff options
context:
space:
mode:
Diffstat (limited to 'static/img/scripts/credits.py')
-rw-r--r--static/img/scripts/credits.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/static/img/scripts/credits.py b/static/img/scripts/credits.py
new file mode 100644
index 0000000..7e0a0ae
--- /dev/null
+++ b/static/img/scripts/credits.py
@@ -0,0 +1,21 @@
+#! /usr/bin/env python
+
+import xml.etree.ElementTree as ET
+import os
+
+print '<ul>'
+for filepath in sorted(os.listdir('sources')):
+ if not filepath.endswith('.svg'):
+ continue
+ tree = ET.fromstring(file('sources/' + filepath).read())
+ author = None
+ for elem in tree.getchildren():
+ if elem.tag == '{http://www.w3.org/2000/svg}text' and elem.text.startswith('Created by'):
+ author = elem.text[len('Created by')+1:]
+ tree.remove(elem)
+ break
+ else:
+ continue
+ print '<li>%s, par %s de <a href="http://thenounproject.com/">The Noun Project</a></li>' % (
+ filepath.split('.')[0].title(), author)
+print '</ul>'