sfeed

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

commit 7041e7ebffa8ae08aeaecf4351b8d378f3e14e28
parent 0733230d6c2e6404991736e99959f9c409c64ab3
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 18 Apr 2016 18:51:50 +0200

simplify sfeed(5) format, remove feedtype also

Remove type of feed per item, it is not that interesting. sfeed(1) can parse
both RSS and Atom feeds.

Diffstat:
MREADME | 1-
Msfeed.1 | 2--
Msfeed.5 | 2--
Msfeed.c | 3---
Mutil.h | 6++----
5 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/README b/README @@ -157,7 +157,6 @@ item content - Newlines and TABs are escaped. Control characters item contenttype - "html" or "plain". item id - RSS item GUID or Atom id. item author - Item author. -feed type - "rss" or "atom". CAVEATS: - if a timezone is not supported (non-RFC-822) the UNIX timestamp is diff --git a/sfeed.1 b/sfeed.1 @@ -43,8 +43,6 @@ text. RSS item GUID or Atom id. .It item author Item author. -.It feed type -"rss" or "atom". .El .Sh SEE ALSO .Xr sfeed_plain 1 , diff --git a/sfeed.5 b/sfeed.5 @@ -37,8 +37,6 @@ text. RSS item GUID or Atom id. .It item author Item author. -.It feed type -"rss" or "atom". .El .Sh SEE ALSO .Xr sfeed 1 diff --git a/sfeed.c b/sfeed.c @@ -21,7 +21,6 @@ enum FeedType { FeedTypeRSS = 1, FeedTypeAtom = 2 }; -static const char *feedtypes[] = { "", "rss", "atom" }; enum ContentType { ContentTypeNone = 0, @@ -546,8 +545,6 @@ printfields(void) string_print_trimmed(&ctx.fields[FeedFieldId].str); putchar(FieldSeparator); string_print_trimmed(&ctx.fields[FeedFieldAuthor].str); - putchar(FieldSeparator); - fputs(feedtypes[ctx.feedtype], stdout); putchar('\n'); } diff --git a/util.h b/util.h @@ -26,9 +26,8 @@ struct uri { }; enum { - FieldUnixTimestamp = 0, FieldTitle, - FieldLink, FieldContent, FieldContentType, FieldId, FieldAuthor, - FieldFeedType, FieldLast + FieldUnixTimestamp = 0, FieldTitle, FieldLink, + FieldContent, FieldContentType, FieldId, FieldAuthor, FieldLast }; int absuri(char *, size_t, const char *, const char *); @@ -36,7 +35,6 @@ size_t parseline(char *, char *[FieldLast]); int parseuri(const char *, struct uri *, int); void printutf8pad(FILE *, const char *, size_t, int); int strtotime(const char *, time_t *); -char * xbasename(const char *); void xmlencode(const char *, FILE *); #ifdef USE_PLEDGE