X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=icalparse.py;fp=icalparse.py;h=1d62a7057554cd4142881c43411449d4f7f09589;hb=a60d888467b796bdf7ed7cd63c53cef8dcfc779c;hp=4dd1229428adb4439b80e3fd455607302bc9ec15;hpb=ae853fa178713d7a6b69ca54b5d4c0058ce7a857;p=frenchie%2Ficalparse.git diff --git a/icalparse.py b/icalparse.py index 4dd1229..1d62a70 100755 --- a/icalparse.py +++ b/icalparse.py @@ -206,11 +206,14 @@ def exitQuiet(exitstate=0): def runCGI(): - '''Main run function if this script is called as a CGI script''' + '''Main run function if this script is called as a CGI script + to process facebook ical files''' import cgi import re import cgitb; cgitb.enable() + ruleConfig["facebook"] = True + form = cgi.FieldStorage() if "uid" not in form or "key" not in form: print('Content-Type: text/calendar\n') @@ -248,7 +251,7 @@ def runCGI(): cal = applyRules(cal, generateRules(ruleConfig), False) print('Content-Type: text/calendar; charset=%s\n'%encoding) - icalparse.writeOutput(cal) + writeOutput(cal) if __name__ == '__main__':