Skip to content

Instantly share code, notes, and snippets.

@konsumer
Created February 6, 2012 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konsumer/1755530 to your computer and use it in GitHub Desktop.
Save konsumer/1755530 to your computer and use it in GitHub Desktop.
Entry for day 5 of Daily Art Challenge
#!/usr/bin/env python
import re
text = """1st your name.
2nd an article of clothing.
3rd a flowering plant.
4th a piece of furniture.
5th a machine.
6th a bicycle/velocipede.
7th a method of communication.
8th your favorite food.
9th a musical instrument.
10th a word or body of text.
11th a weapon.
12th an amphibian.
13th a mineral formation.
14th trash.
15th a body part
16th electricity.
17th a "before" & "after".
18th a tree.
19th a domesticated animal.
20th a religious symbol.
21st an action.
22nd a pictograph.
23rd a facial expression.
24th a tool.
25th a kitchen appliance.
26th a mythological creature.
27th a pattern.
28th a number.
29th yourself."""
numfind = re.compile('\d+')
out = "Start Date,Subject\n"
for line in text.split("\n"):
day, title = line.split("\t")
out += "02/%02d/2012,%s\n" % (int(numfind.findall(day)[0]), title.replace('"', '\\"'))
file('art_challenge.csv', 'w').write(out)
# now import the resulting CSV to your google calendar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment