Skip to content

Instantly share code, notes, and snippets.

@kwood
Created Dec 12, 2013
Embed
What would you like to do?
replacements = [('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/1.%2009.05%20Michael%20Saunders.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/1.%252009.05%2520Michael%2520Saunders.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%2009.55%20Rob%20Buckland%2009%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%252009.55%2520Rob%2520Buckland%252009%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/3.%2011.00%20Hans%20Lorenzen.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/3.%252011.00%2520Hans%2520Lorenzen.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/8.%2016.05%20Tina%20Fordham%20Deck%2011%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/8.%252016.05%2520Tina%2520Fordham%2520Deck%252011%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%2009.55%20ABEL%20ELIZALDE%20-%20Options%20Teach-in.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%252009.55%2520ABEL%2520ELIZALDE%2520-%2520Options%2520Teach-in.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/3.%2011.00%20ABEL%20ELIZALDE%20-%20What%20did%20investors%20(%20dealers)%20do%20in%202013%20%20What%20will%20they%20do%20in%202014.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/3.%252011.00%2520ABEL%2520ELIZALDE%2520-%2520What%2520did%2520investors%2520%28%2520dealers%29%2520do%2520in%25202013%2520%2520What%2520will%2520they%2520do%2520in%25202014.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%2009.55%20Abengoa.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%252009.55%2520Abengoa.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/5.%2013.35%20Norske%20Skog%20051213.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/5.%252013.35%2520Norske%2520Skog%2520051213.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%2009.55%20Algeco%20Scotsman%2010%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%252009.55%2520Algeco%2520Scotsman%252010%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/4.%2011.20%20Faurecia%20pdf.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/4.%252011.20%2520Faurecia%2520pdf.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/7.%2015.20%20FTE%2010%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/7.%252015.20%2520FTE%252010%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/6.%2014.20%20Terry%20Benzschawel.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/6.%252014.20%2520Terry%2520Benzschawel.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/1.%2009.05%20Metsa%20Board%2009%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/1.%252009.05%2520Metsa%2520Board%252009%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%2009.55%20Hapag%20Lloyd%2010%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/2.%252009.55%2520Hapag%2520Lloyd%252010%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/3.%2011.00%20John%20Reidy%2010%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/3.%252011.00%2520John%2520Reidy%252010%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/6.%2014.20%20TMF.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/6.%252014.20%2520TMF.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/8.%2016.05%20Thomas%20cook%20%2006%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/8.%252016.05%2520Thomas%2520cook%2520%252006%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/4.%2011.50%20KOC.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/4.%252011.50%2520KOC.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/6.%2014.20%20Evraz%2006%2012%2013.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/6.%252014.20%2520Evraz%252006%252012%252013.pdf&toolbarConfig=0'), ('https://www.citievents.com/metron/(medialibrary)/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/8.%2016.50%20How%20Credit%20Performs%20Blackrockishares.pdf', 'gb://guide/14965/web/?dataSource=https%3A//www.citievents.com/metron/%28medialibrary%29/97f16f50-fbf4-437c-8789-ecfb511248d7/meetings/36a59ab4-1519-4ceb-b333-2bda2ec23a65/documents/8.%252016.50%2520How%2520Credit%2520Performs%2520Blackrockishares.pdf&toolbarConfig=0')]
for event in Event.objects.filter(guide=14965):
newdesc = event.description
for match,replace in replacements:
newdesc = newdesc.replace(match,replace)
print event.description
event.description = newdesc
event.save()
for poi in POI.objects.filter(guide=14965):
newdesc = poi.description
for match,replace in replacements:
newdesc = newdesc.replace(match,replace)
print poi.description
print "--------"
poi.description = newdesc
poi.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment