Support transforms, fixes #28

This commit is contained in:
Friedrich Lindenberg
2013-09-19 19:25:28 +02:00
parent 36cbd4e417
commit 70eece9e77
3 changed files with 8 additions and 1 deletions
+5
View File
@@ -68,7 +68,12 @@ class Serializer(object):
def serialize(self):
self.init()
transforms = self.export.get('transform', {})
for row in self.query:
for field, operation in transforms.items():
row[field] = OPERATIONS.get(operation)(row.get(field))
self.write(self.file_name(row), row)
self.close()