From 1266634a6b32f4d7db6ac2c1b5cebb40f530707d Mon Sep 17 00:00:00 2001 From: Holger Schurig Date: Wed, 23 Jun 2010 10:12:17 +0200 Subject: [PATCH] rss_feed.py: simply XML formatting --- plugins/rss_feed.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/rss_feed.py b/plugins/rss_feed.py index 0681b39..a4197b1 100644 --- a/plugins/rss_feed.py +++ b/plugins/rss_feed.py @@ -71,4 +71,8 @@ def finish(params): os.makedirs(cfg.out_dir) except: pass - rss.write_xml( open(os.path.join(cfg.out_dir, cfg.rss_file), "w")) + f = open(os.path.join(cfg.out_dir, cfg.rss_file), "w") + # Ugly XML beautification + s = rss.to_xml().replace("<", "\n<").replace("\n\n", "\n")[1:] + f.write(s) + f.write("\n") -- 2.39.2