Permalink
Browse files

Changed some assumptions about column names, e.g. "zoom start" instea…

…d of "zoom"
  • Loading branch information...
1 parent 42de5e8 commit 60fdca454f9bc7046d7f276335d3b3b01fcdc007 @migurski committed Sep 23, 2011
Showing with 7 additions and 2 deletions.
  1. +3 −0 CHANGELOG
  2. +3 −1 Dymo/__init__.py
  3. +1 −1 VERSION
View
@@ -1,2 +1,5 @@
+2011-09-23: 0.3
+- Changed some assumptions about column names, e.g. "zoom start" instead of "zoom".
+
2011-09-23: 0.2
- Fixed unicode / utf-8 decode issue in load_places()
View
@@ -13,6 +13,7 @@
_osm = Provider()
+key_pat = compile(r'\W')
int_pat = compile(r'^-?\d{1,9}$') # up to nine so we don't cross 2^32
float_pat = compile(r'^-?\d+(\.\d+)?$')
@@ -91,7 +92,8 @@ def load_places(input_files, zoom):
lon = float(row['longitude'])
location, point = location_point(lat, lon, zoom)
- properties = dict([(key, types[key](value)) for (key, value) in row.items()
+ properties = dict([(key_pat.sub(r'_', key), types[key](value))
+ for (key, value) in row.items()
if key not in ('latitude', 'longitude')])
yield Place(name, fontfile, fontsize, location, point, radius, properties)
View
@@ -1 +1 @@
-0.2
+0.3

0 comments on commit 60fdca4

Please sign in to comment.