diff options
author | garret <garret@airmail.cc> | 2024-07-09 17:00:20 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2024-07-09 17:00:20 +0100 |
commit | 3d3dc41c560e71109d890e9a7203b0a3b22f6598 (patch) | |
tree | 81deffad6e38442ec73012c6278295c0d74cd89a | |
parent | 412e6213d161fe091aad7b192f14c1542be31d8f (diff) | |
download | kadomatsu-rss-master.tar.gz kadomatsu-rss-master.tar.bz2 kadomatsu-rss-master.zip |
-rwxr-xr-x | kadomatsu-rss.py | 6 |
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') |