diff --git a/CHANGES.txt b/CHANGES.txt index c531615..4fe000e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,29 +1,17 @@ v0.1.0, 01 Jan 2013 -- Initial release. - v0.1.1, 08 Jan 2013 -- Added cache for Google geocoder - v0.1.2, 20 Jan 2013 -- Improved exception handling for less fragile connections to twitter.com. Streaming 'location' option now uses the API's 'locations' parameter. Dynamic throttling of Google geocode requests to not exceed rate limit. - v1.0.0, 30 Jan 2013 -- Uploaded to github. - v1.1.0, 12 Feb 2013 -- Replaced TwitterAPI with puttytat for Twitter requests. - v1.1.1, 19 Feb 2013 -- Geocoder uses viewport instead of bounds. - v2.0.1, 14 Jun 2013 -- Switch to TwitterAPI and renamed to TwitterGeoPics. - v2.0.2, 14 Jun 2013 -- Included pygeocoder source until fixed for python 3. - v2.0.3, 25 Jun 2013 -- Fixed printing. - v2.1.0, 17 Sep 2013 -- Requires TwitterAPI 3. - v2.1.1, 11 Oct 2013 -- Prints GEOCODE with place and lat,lng. - v2.2.0, 15 Oct 2013 -- Combined scripts. - v2.2.1, 27 Dec 2013 -- Added pygeocoder to setup.py. - v2.2.3, 27 Oct 2015 -- Added tzwhere to setup.py. +v2.2.4, 03 Jun 2016 -- Changed print_stats to return string. diff --git a/TwitterGeoPics/Geocoder.py b/TwitterGeoPics/Geocoder.py index 871ff79..7167bf2 100755 --- a/TwitterGeoPics/Geocoder.py +++ b/TwitterGeoPics/Geocoder.py @@ -260,7 +260,7 @@ def print_stats(self): stats = \ ('\n--STATS--\n' 'geo requests: %s\n' - 'geo requets ok: %s\n' + 'geo requests ok: %s\n' 'geo quota exceeded: %s\n' 'geo throttle: %s\n' 'has none: %s\n' @@ -269,7 +269,7 @@ def print_stats(self): (self.count_request, self.count_request_ok, self.quota_exceeded_at, self.throttle, self.count_nowhere, self.count_has_geocode, self.count_has_location) - sys.stdout.write(stats) + # sys.stdout.write(stats) if self.cache: counts = [ 0, 0, 0 ] @@ -289,4 +289,7 @@ def print_stats(self): 'size: %s\n' 'counts: %s\n' 'max place: %s\n') % (len(self.cache), counts, max_place) - sys.stdout.write(cache) \ No newline at end of file + # sys.stdout.write(cache) + stats = stats + cache + + return stats \ No newline at end of file diff --git a/TwitterGeoPics/__init__.py b/TwitterGeoPics/__init__.py index 2a081dc..a382107 100644 --- a/TwitterGeoPics/__init__.py +++ b/TwitterGeoPics/__init__.py @@ -1,5 +1,5 @@ __title__ = 'TwitterGeoPics' -__version__ = '2.2.3' +__version__ = '2.2.4' __author__ = 'Jonas Geduldig' __license__ = 'MIT' __copyright__ = 'Copyright 2013 Jonas Geduldig'