if parent.tag == 'sem':
if parent.get('type') == 'theme':
pd['themes'] += map(unicode.strip, unicode(parent.get('theme')).split(','))
- elif parent.get('type') == 'object' and not pd['object']:
- pd['object'] = parent.get('name')
+ elif parent.get('type') == 'object' and pd['object'] is None:
+ pd['object'] = parent.get('object')
yield pd
<dc:date.pd xml:lang="pl">1940</dc:date.pd>
<dc:type>Image</dc:type>
<dc:format xml:lang="pl">image/png</dc:format>
- <dc:format.dimensions.digital xml:lang="pl">1645 x 2000 px</dc:format.dimensions.digital>
+ <dc:format.dimensions xml:lang="pl">1645 x 2000 px</dc:format.dimensions>
+ <dc:format.checksum.sha1 xml:lang="pl">d9ead48f3442ac4e1add602aacdffa4638ae8e21</dc:format.checksum.sha1>
<dc:date xml:lang="pl">1920</dc:date>
<dc:language xml:lang="pl" xmlns:dc="http://purl.org/dc/elements/1.1/">lat</dc:language>
</rdf:Description>
assert len(parts) == 5, "there should be %d parts of the picture" % 5
motifs = set()
names = set()
-
+
+ print parts
for p in parts:
- for m in p['motifs']:
+ for m in p['themes']:
motifs.add(m)
for p in parts:
if p['object']: