sfeed

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

commit 1dff8155ac38dc37efab4b023f220926e5410e05
parent b232db436b7b9343c336ef941c47cf8b107d1f7e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 24 Dec 2017 13:05:47 +0100

sfeed_web: print relative url now directly if no base url specified

Diffstat:
Msfeed_web.1 | 6+++---
Msfeed_web.c | 2++
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/sfeed_web.1 b/sfeed_web.1 @@ -1,4 +1,4 @@ -.Dd December 25, 2014 +.Dd December 13, 2017 .Dt SFEED_WEB 1 .Os .Sh NAME @@ -20,14 +20,14 @@ Optional base url to use for found feed urls that are relative. url<TAB>content\-type<newline> .Bl -tag -width Ds .It url -Found absolute url. +Found relative or absolute url. If the url is relative and the .Ar baseurl option is specified then the url is made absolute. If the url is relative and no .Ar baseurl -option is specified it is empty. +option is specified then it is printed as is. .It content\-type Usually application/atom+xml or application/rss+xml. .El diff --git a/sfeed_web.c b/sfeed_web.c @@ -46,6 +46,8 @@ xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort) if (absuri(abslink, sizeof(abslink), feedlink, basehref) != -1) fputs(abslink, stdout); + else + fputs(feedlink, stdout); fputc('\t', stdout); printfeedtype(feedtype, stdout); putchar('\n');