We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ed3a91 commit 87b225dCopy full SHA for 87b225d
scripts/cc/image_tools/imgsplat.py
@@ -74,12 +74,12 @@ def splat(license_graph):
74
75
for uri in license_graph.subjects(NS_RDF.type, NS_CC.License):
76
print uri
77
- m = re.search('http://creativecommons.org/licenses/(.*?)/((.*?)/((.*?)/)?)?', str(uri))
78
- code = m.group(1)
79
- version = m.group(3)
80
- jurisdiction = m.group(5)
+ m = re.search('http://creativecommons.org/(?P<group>licenses|publicdomain)/(?P<code>.*?)/((?P<version>.*?)/((?P<jurisdiction>.*?)/)?)?', str(uri))
+ code = m.group('code')
+ version = m.group('version')
+ jurisdiction = m.group('jurisdiction')
81
82
- dest = os.path.join(checkout_base(), 'www', 'l', code)
+ dest = os.path.join(checkout_base(), 'www', m.group('group')[0], code)
83
84
code2 = code
85
size = '88x31'
0 commit comments