sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 14cce37fa54608362dc2d19ff66d10b64e5777b1
parent a15c98f32d8a768fee7b6783f7cea710cc5878a9
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 10 Apr 2023 16:40:56 +0200

sfeed_atom: in Atom the default for a type is text

Save a few bytes in the output by removing it.

https://www.rfc-editor.org/rfc/rfc4287
3.1.1.  The "type" Attribute

The title is an atomTextConstruct.

Diffstat:
Msfeed_atom.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sfeed_atom.c b/sfeed_atom.c @@ -95,7 +95,7 @@ printfeed(FILE *fp, const char *feedname) /* NOTE: an RSS/Atom viewer may or may not format whitespace such as newlines. Workaround: type="html" and <![CDATA[<pre></pre>]]> */ - fputs("\t<content type=\"text\">", stdout); + fputs("\t<content>", stdout); } printcontent(fields[FieldContent]); fputs("</content>\n", stdout); @@ -132,7 +132,7 @@ main(int argc, char *argv[]) fputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<feed xmlns=\"http://www.w3.org/2005/Atom\">\n" - "\t<title type=\"text\">Newsfeed</title>\n" + "\t<title>Newsfeed</title>\n" "\t<author><name>sfeed</name></author>\n", stdout); printf("\t<id>urn:newsfeed:%lld</id>\n" "\t<updated>%04d-%02d-%02dT%02d:%02d:%02dZ</updated>\n",