summaryrefslogtreecommitdiffstats
path: root/kadomatsu-rss.py
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-07-09 17:00:20 +0100
committergarret <garret@airmail.cc>2024-07-09 17:00:20 +0100
commit3d3dc41c560e71109d890e9a7203b0a3b22f6598 (patch)
tree81deffad6e38442ec73012c6278295c0d74cd89a /kadomatsu-rss.py
parent412e6213d161fe091aad7b192f14c1542be31d8f (diff)
downloadkadomatsu-rss-master.tar.gz
kadomatsu-rss-master.tar.bz2
kadomatsu-rss-master.zip
add public (static) versionHEADmaster
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')