X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=plugins%2Frss_feed.py;h=90627677b993e958a374d1007bbe71367c6e21ff;hb=4d2b6ef2bec1906b8cffa700454a6c08153cc27f;hp=a4197b1e16fd37845f51d363ad08ede01f6a7fee;hpb=1266634a6b32f4d7db6ac2c1b5cebb40f530707d;p=webber.git diff --git a/plugins/rss_feed.py b/plugins/rss_feed.py index a4197b1..9062767 100644 --- a/plugins/rss_feed.py +++ b/plugins/rss_feed.py @@ -67,6 +67,10 @@ def finish(params): lastBuildDate = datetime.datetime.now(), items = items, ) + # Step one of self-reference + # (see http://feedvalidator.org/docs/warning/MissingAtomSelfLink.html) + rss.rss_attrs["xmlns:atom"] = "http://www.w3.org/2005/Atom" + try: os.makedirs(cfg.out_dir) except: @@ -74,5 +78,7 @@ def finish(params): 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:] + # Step two of self-reference + s = s.replace('', '\n' % (cfg.main_url, cfg.rss_file)) f.write(s) f.write("\n")