Commit d51fcb3d authored by abuddenberg's avatar abuddenberg
Browse files

Minor changes to variable names

parent 1592ef46
......@@ -13,29 +13,24 @@ for partial_figure in gcis.get_figure_listing('nca3draft', chapter_id='our-chang
#Let's work with the infamous temperature figure
fig2_6 = gcis.get_figure('nca3draft', 'observed-us-temperature-change')
fig2_7 = gcis.get_figure('nca3draft', 'observed-us-temperature-change')
#Warning: Images and Chapters are specifically excluded from JSON output. This is what gets sent to GCIS. So...
print fig2_6.as_json(indent=4)
print fig2_7.as_json(indent=4)
#...you might want to view the original input
print fig2_6.original
print fig2_7.original
#Let's see about the images:
for image in fig2_6.images:
for image in fig2_7.images:
print image
#How about the whole Image?
print gcis.get_image('69da6d93-4426-4061-a2a1-7b3d01f2dc1c').as_json(indent=4)
#Let's assign some GCMD keywords (The first 4 from the list)
keyword_ids = [k['identifier'] for k in gcis.get_keyword_listing()[0:4]]
for keyword_id in keyword_ids:
resp = gcis.associate_keyword_with_figure(keyword_id, 'nca3draft', 'observed-us-temperature-change')
print resp.status_code, resp.text
# keyword_ids = [k['identifier'] for k in gcis.get_keyword_listing()[0:4]]
# for keyword_id in keyword_ids:
# resp = gcis.associate_keyword_with_figure(keyword_id, 'nca3draft', 'observed-us-temperature-change')
# print resp.status_code, resp.text
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment