aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfcgi3
-rw-r--r--readme.md2
-rwxr-xr-xtrein.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/fcgi b/fcgi
new file mode 100755
index 0000000..2fa6778
--- /dev/null
+++ b/fcgi
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "HTTP/1.1 200 OK\n"
+exec ./trein.py
diff --git a/readme.md b/readme.md
index 17405f7..d558b62 100644
--- a/readme.md
+++ b/readme.md
@@ -16,7 +16,7 @@ location /ical/trein.ics {
autoindex on;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME /var/trein/trein.py;
+ fastcgi_param SCRIPT_FILENAME /var/trein/fcgi;
}
```
diff --git a/trein.py b/trein.py
index 9afad6d..4ee5273 100755
--- a/trein.py
+++ b/trein.py
@@ -61,7 +61,7 @@ def main():
relevant = True # only relevant if consequence contains current and next station
if relevant: disruption2ical(disruption)
- print(cal.to_ical())
+ print(str(cal.to_ical(), 'utf-8'))
if __name__ == "__main__":
main()