Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Darst <rkd@zgib.net>2009-09-24 06:18:04 (GMT)
committer Richard Darst <rkd@zgib.net>2009-09-24 06:18:04 (GMT)
commit5d10f64f7bb6f3acfa7482ce6ab42873eda8a612 (patch)
treeab92b6c8a203c09a6de2713182ba5379c555fa71
parenta51699b87fae0f8368849e1e59b1dbcb8853e6cf (diff)
Add argument parsing for writer extensions
- The syntax is this: writer_map[".txt|template darcs-hash:20090924061804-82ea9-3eb26b5e91373851376ef0895c070e9265843907.gz
-rw-r--r--meeting.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/meeting.py b/meeting.py
index 88730b2..00e04ca 100644
--- a/meeting.py
+++ b/meeting.py
@@ -194,7 +194,15 @@ class Config(object):
getattr(self, '_filename', None) )
):
continue
- text = writer.format(extension)
+ # Parse embedded arguments
+ if '|' in extension:
+ extension, args = extension.split('|', 1)
+ args = args.split('|')
+ args = dict([a.split('=', 1) for a in args] )
+ else:
+ args = { }
+
+ text = writer.format(extension, **args)
results[extension] = text
# If the writer returns a string or unicode object, then
# we should write it to a filename with that extension.