Skip to content

Commit 87b225d

Browse files
committed
Fix for Issue #504, fixing splat-ing for publicdomain licenses.
1 parent 1ed3a91 commit 87b225d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/cc/image_tools/imgsplat.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ def splat(license_graph):
7474

7575
for uri in license_graph.subjects(NS_RDF.type, NS_CC.License):
7676
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)
77+
m = re.search('http://creativecommons.org/(?P<group>licenses|publicdomain)/(?P<code>.*?)/((?P<version>.*?)/((?P<jurisdiction>.*?)/)?)?', str(uri))
78+
code = m.group('code')
79+
version = m.group('version')
80+
jurisdiction = m.group('jurisdiction')
8181

82-
dest = os.path.join(checkout_base(), 'www', 'l', code)
82+
dest = os.path.join(checkout_base(), 'www', m.group('group')[0], code)
8383

8484
code2 = code
8585
size = '88x31'

0 commit comments

Comments
 (0)