X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/5b1dcc7d247996752fa566c7150a45037b068565..ff2a09e9ecd8e9bede2d3572942bcd32f66f6198:/librarian/picture.py diff --git a/librarian/picture.py b/librarian/picture.py index 7b98ff1..5a0c47b 100644 --- a/librarian/picture.py +++ b/librarian/picture.py @@ -32,6 +32,7 @@ class PictureInfo(WorkInfo): Field(DCNS('subject.period'), 'epochs', salias='epoch', multiple=True), Field(DCNS('subject.type'), 'kinds', salias='kind', multiple=True), Field(DCNS('subject.genre'), 'genres', salias='genre', multiple=True, required=False), + Field(DCNS('subject.style'), 'styles', salias='style', multiple=True, required=False), Field(DCNS('format.dimensions'), 'dimensions', required=False), Field(DCNS('format.checksum.sha1'), 'sha1', required=True), @@ -156,7 +157,7 @@ class WLPicture(object): area = sem.find("div[@type='rect']") if area is None: area = sem.find("div[@type='whole']") - return ((0, 0), (-1, -1)) + return [[0, 0], [-1, -1]] def has_all_props(node, props): return reduce(and_, map(lambda prop: prop in node.attrib, props)) @@ -165,7 +166,7 @@ class WLPicture(object): return None def n(prop): return int(area.get(prop)) - return ((n('x1'), n('y1')), (n('x2'), n('y2'))) + return [[n('x1'), n('y1')], [n('x2'), n('y2')]] def partiter(self):