sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 7ab5fc54b9671ee435a6258892b667196c4ad598
parent 5cf169e88e97cdaa15a302a5cb7d28ce5132be3e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 24 Nov 2019 15:11:48 +0100

sfeed_opml_import: improve import with nested <outline>

This nested format is used by Mozilla Thunderbird:

<outline title="">
	<outline type="rss" title="" text="" xmlUrl=""/>
</outline>

other tests:
- newsboat -e uses the title attribute, not text.
- rss2email 3.x, r2e opmlexport uses type, text and xmlUrl (correct).

Diffstat:
Msfeed_opml_import.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c @@ -30,6 +30,12 @@ printsafe(const char *s) } static void +xmltagstart(XMLParser *p, const char *t, size_t tl) +{ + url[0] = text[0] = title[0] = '\0'; +} + +static void xmltagend(XMLParser *p, const char *t, size_t tl, int isshort) { if (strcasecmp(t, "outline")) @@ -47,6 +53,7 @@ xmltagend(XMLParser *p, const char *t, size_t tl, int isshort) printsafe(url); fputs("'\n", stdout); } + url[0] = text[0] = title[0] = '\0'; } @@ -88,6 +95,7 @@ main(void) parser.xmlattr = xmlattr; parser.xmlattrentity = xmlattrentity; + parser.xmltagstart = xmltagstart; parser.xmltagend = xmltagend; fputs(