summaryrefslogtreecommitdiffstats
path: root/kadomatsu-rss.py
diff options
context:
space:
mode:
Diffstat (limited to 'kadomatsu-rss.py')
-rwxr-xr-xkadomatsu-rss.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/kadomatsu-rss.py b/kadomatsu-rss.py
index a876402..47a7e68 100755
--- a/kadomatsu-rss.py
+++ b/kadomatsu-rss.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import cgi
+import os
from datetime import datetime
@@ -73,3 +74,8 @@ if __name__ == "__main__":
print("Content-Type: application/rss+xml; charset=UTF-8")
print()
print(feed.writeString("utf-8"))
+
+ public_file_path = os.getenv("KADOMATSU_RSS_FILE")
+ if public_file_path is not None:
+ with open(public_file_path, "w") as public_file:
+ feed.write(public_file, 'utf-8')