Revision: 7186 Author: a_engels Date: 2009-08-28 21:29:48 +0000 (Fri, 28 Aug 2009)
Log Message: ----------- enable configuring flickrripper
Modified Paths: -------------- trunk/pywikipedia/config.py trunk/pywikipedia/flickrripper.py
Modified: trunk/pywikipedia/config.py =================================================================== --- trunk/pywikipedia/config.py 2009-08-28 20:52:34 UTC (rev 7185) +++ trunk/pywikipedia/config.py 2009-08-28 21:29:48 UTC (rev 7186) @@ -330,6 +330,13 @@ # http://search.msn.com/developer msn_appid = ''
+# Using the Flickr api +flickr = { + 'api_key': None, # Provide your key! + 'review': False, # Do we use automatically make our uploads reviewed? + 'reviewer': None, # If so, under what reviewer name? + } + ############## COPYRIGHT SETTINGS ##############
# Enable/disable search engine in copyright.py script
Modified: trunk/pywikipedia/flickrripper.py =================================================================== --- trunk/pywikipedia/flickrripper.py 2009-08-28 20:52:34 UTC (rev 7185) +++ trunk/pywikipedia/flickrripper.py 2009-08-28 21:29:48 UTC (rev 7186) @@ -34,10 +34,10 @@ import sys, urllib, re, StringIO import wikipedia, config, query, imagerecat, upload
-import flickrapi +import flickrapi # see: http://stuvel.eu/projects/flickrapi import xml.etree.ElementTree from Tkinter import * -from PIL import Image, ImageTk +from PIL import Image, ImageTk # see: http://www.pythonware.com/products/pil/
def getPhoto(flickr = None, photo_id = ''): ''' @@ -329,9 +329,10 @@ # Set the Flickr reviewer if config.flickr['reviewer']: reviewer = config.flickr['reviewer'] - elif config.sysopnames['commons']['commons']: + elif 'commons' in config.sysopnames['commons']: + print config.sysopnames['commons'] reviewer = config.sysopnames['commons']['commons'] - elif config.usernames['commons']['commons']: + elif 'commons' in config.usernames['commons']: reviewer = config.usernames['commons']['commons'] else: reviewer = u''
pywikipedia-svn@lists.wikimedia.org