|
@@ -64,7 +64,7 @@ We use each library for a purpose:
|
|
|
*** TODO Output
|
|
|
#+Name: Output
|
|
|
#+BEGIN_SRC python
|
|
|
- def output(datadict):
|
|
|
+ def output(datadict, file):
|
|
|
...
|
|
|
#+END_SRC
|
|
|
#+CAPTION: use-name-as-caption
|
|
@@ -85,7 +85,16 @@ We use each library for a purpose:
|
|
|
** Main body
|
|
|
#+Name: Main
|
|
|
#+BEGIN_SRC python
|
|
|
-
|
|
|
+ for line in fileinput.input():
|
|
|
+ message = message + line
|
|
|
+
|
|
|
+ data = parsemail.parsestr(message)
|
|
|
+
|
|
|
+ data['type'] = determineType(data)
|
|
|
+ data['parsedsubject'] = parseSubject(data)
|
|
|
+
|
|
|
+ file = open(agendafile, 'a')
|
|
|
+ output(data, file)
|
|
|
#+END_SRC
|
|
|
#+CAPTION: use-name-as-caption
|
|
|
** Final code
|