Permalink
Browse files

Some more updates.

git-svn-id: https://svn.toolserver.org/svnroot/multichill/bot@242 7e777f60-21ef-46b6-b16d-5948f447dc97
  • Loading branch information...
1 parent 559c9e3 commit 8bb16b0ed79225adfd88e2af73009e7c7b586dea multichill committed Apr 10, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 Web_Gallery_of_Art/WGA_uploader.py
@@ -90,6 +90,12 @@ def getMetadata(row):
metadata['LOCATION']==u''
# Get image url
metadata['IMAGEURL'] = re.sub(u'http://www.wga.hu/html/(.+)\.html', u'http://www.wga.hu/art/\\1.jpg', metadata['URL'])
+
+ # Get the creator
+ (surname, sep, firstname) = metadata['AUTHOR'].partition(',')
+ surname = surname.strip().capitalize()
+ firstname = firstname.strip().capitalize()
+ metadata['creator'] = u'%s %s ' % (firstname, surname)
'''
metadata = {
@@ -111,6 +117,10 @@ def getMetadata(row):
def processFile(row):
metadata = getMetadata(row)
+ if not metadata['FORM']==u'painting':
+ wikipedia.output(u'Not a painting, skipping')
+ return False
+
photo = downloadPhoto(metadata['IMAGEURL'])
duplicates = findDuplicateImages(photo)

0 comments on commit 8bb16b0

Please sign in to comment.