migrate to new config
This commit is contained in:
parent
887f09464b
commit
2b8e2e8219
1 changed files with 6 additions and 2 deletions
|
@ -136,11 +136,15 @@ def item_data(data):
|
||||||
value = value.replace('\r\n', '\n').strip()
|
value = value.replace('\r\n', '\n').strip()
|
||||||
d[{
|
d[{
|
||||||
u'id': u'oldId',
|
u'id': u'oldId',
|
||||||
u'categories': u'category',
|
u'categories': u'topic',
|
||||||
|
u'source': u'project',
|
||||||
|
u'collection': u'source',
|
||||||
u'languages': u'language',
|
u'languages': u'language',
|
||||||
}.get(key, key)] = value
|
}.get(key, key)] = value
|
||||||
if 'director' in d:
|
if 'director' in d:
|
||||||
d['director'] = unicode(d['director']).strip().split(', ')
|
d['director'] = unicode(d['director']).replace(' and ', ', ').strip().split(', ')
|
||||||
|
d['director'] = filter(lambda x: x.strip().lower() not in ('none', 'n/a', '', 'various'),
|
||||||
|
d['director'])
|
||||||
for key in ('layers', 'duration', 'size', 'public'):
|
for key in ('layers', 'duration', 'size', 'public'):
|
||||||
if key in d:
|
if key in d:
|
||||||
del d[key]
|
del d[key]
|
||||||
|
|
Loading…
Add table
Reference in a new issue