Merge CGI code into main branch, this is more what I wanted to script for
[frenchie/icalparse.git] / fbcal.py
index d18a515..870a62d 100755 (executable)
--- a/fbcal.py
+++ b/fbcal.py
@@ -25,7 +25,7 @@ import cgi
 import vobject
 import icalparse
 import re
-import cgitb; cgitb.enable()
+#import cgitb; cgitb.enable()
 
 def exitQuiet(exitstate=0):
        print('Content-Type: text/html\n')
@@ -69,5 +69,5 @@ if __name__ == '__main__':
        cal = vobject.readOne(unicode(content, encoding))
        cal = icalparse.applyRules(cal, icalparse.generateRules(ruleConfig), False)
 
-       print('Content-Type: text/html; charset=%s\n'%encoding)
+       print('Content-Type: text/calendar; charset=%s\n'%encoding)
        icalparse.writeOutput(cal)

UCC git Repository :: git.ucc.asn.au