Skip to content

Instantly share code, notes, and snippets.

@eckardm
Created October 8, 2019 15:16
Show Gist options
  • Select an option

  • Save eckardm/e8aa8819d197cb02a280049b9f1770a6 to your computer and use it in GitHub Desktop.

Select an option

Save eckardm/e8aa8819d197cb02a280049b9f1770a6 to your computer and use it in GitHub Desktop.
More title context in DeepBlue
from dappr import DAPPr
handles = [
'2027.42/151244',
'2027.42/151243',
'2027.42/151242',
...
]
deepblue = DAPPr(instance_name="PROD")
collection_id = 424
items = deepblue.get_collection_items(collection_id)
for item in items:
item_id = item['id']
item_handle = item['handle']
'''
metadata = deepblue.get_item_metadata(item_id)
title = deepblue.get_metadata_entry_value_by_key(metadata, 'dc.title')
if title.startswith(('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')):
print('updating ' + item_handle)
deepblue.more_title_context(item_handle)'''
if item_handle in handles:
print('updating ' + item_handle)
deepblue.more_title_context(item_handle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment