From 2b234cdc430dc6061da81211f00990d13e4d650b Mon Sep 17 00:00:00 2001 From: Ploum Date: Mon, 9 Oct 2023 13:26:12 +0200 Subject: [PATCH] initial tentative to support podcast RSS/atom feeds --- CHANGELOG | 1 + ansicat.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a649874..7bf1d03 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Changes since beta1 - "--sync" can optionnaly take some lists as arguments, in order to make for specific sync - "view source" to view the source code of a page +- initial tentative to support podcasts in RSS/Atom feeds - new PlaintextRenderer which display .txt files without any margin/color/linebreaks - default URL blocked list is now its own file to make contributions easier - prompt color is now part of the theme diff --git a/ansicat.py b/ansicat.py index 1843d85..d89abee 100755 --- a/ansicat.py +++ b/ansicat.py @@ -891,6 +891,15 @@ class FeedRenderer(GemtextRenderer): for i in parsed.entries: if "link" in i: line = "=> %s " %i.link + elif "links" in i and len(i.links) > 0: + link = None + j = 0 + while not link and j < len(i.links): + link = i.links[j].href + if link: + line = "=> %s "%link + else: + line = "* " else: line = "* " if "published" in i: