Created
December 9, 2014 06:27
-
-
Save harlowja/79451d7d3488b0aab3cf to your computer and use it in GitHub Desktop.
virtual sprint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Cheetah.Template import Template | |
from delorean import Delorean | |
import parawrap | |
def expand_template(contents, params): | |
if not params: | |
params = {} | |
tpl = Template(source=str(contents), searchList=[params]) | |
return tpl.respond() | |
TPL = """ | |
Hi everyone, | |
The OpenStack $team team will be hosting a virtual sprint in | |
the Freenode IRC channel #$channel for the $for | |
on $when starting at $starts_at and going for ~$duration hours. | |
The goal of this sprint is to work on any open reviews, documentation or | |
any other integration questions, development and so-on, so that we can help | |
progress the $for forward at a good rate. | |
Live version of the current documentation is available here: | |
$docs | |
The code itself lives in the openstack/$project respository. | |
$git_tree | |
""" | |
when = Delorean().next_tuesday().datetime | |
params = { | |
'team': 'oslo', | |
'project': 'taskflow', | |
'channel': 'openstack-oslo', | |
'docs': 'http://docs.openstack.org/developer/taskflow/', | |
'when': when.strftime('%A %m-%d-%Y'), | |
'starts_at': '16:00 UTC', | |
'duration': 8, | |
'git_tree': 'http://git.openstack.org/cgit/openstack/taskflow/tree', | |
} | |
params['for'] = params['project'] + ' ' + 'subproject' | |
for line in parawrap.wrap(expand_template(TPL.strip(), params)): | |
print line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment