Browse Source

added arg to output, wrote main code

Sam Flint 10 years ago
parent
commit
945a24ed4d
1 changed files with 11 additions and 2 deletions
  1. 11 2
      email2orgsched.org

+ 11 - 2
email2orgsched.org

@@ -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