# 2023-04-23 13:00:00.133769 UTC (+0000)
sfeed 1.8 was released.
sfeed is a tool to convert RSS or Atom feeds from XML to a TAB-separated file.
It can be found at:
* git://git.codemadness.org/sfeed
*
gopher://codemadness.org/1/git/sfeed
*
https://codemadness.org/releases/sfeed/
*
gopher://codemadness.org/1/releases/sfeed/
sfeed has the following small changes compared to 1.7:
Fixes:
* sfeed_update: fail early if creating a temporary directory or status file fails.
* sfeed_atom, sfeed_json, sfeed_mbox:
Fix reading past the buffer with an escaped NUL byte (\ NUL).
Note that this could not happen with output from sfeed itself. Only if it was
manipulated.
* sfeed_curses: fix (very hard to trigger) memleak when getline() returns EOF
for lazyloaded items.
* sfeed parser:
* Improve parsing RFC2822 obsolete short year.
* Use errno ENOMEM instead of EOVERFLOW.
This matches the behaviour of setting errno for malloc/calloc on the following
systems too: glibc, musl libc, OpenBSD libc.
* date to unix timestamp: fix incorrect int type to long.
Found while testing sfeed on 16-bit MS-DOS with Open Watcom (for "fun" :)).
* Makefile: remove duplicate CPPFLAGS for sfeed_curses
Features:
* sfeed_json: add JSON output format tool. This formats the TSV data to JSON.
It uses a subset of JSON Feed 1.1:
https://www.jsonfeed.org/version/1.1/
Optimizations:
* sfeed_atom: save a few bytes in the output by removing the type="text"
attribute, because for Atom the default for the type is text.
* Slightly reduce stack size for translating XML entities.
A numeric entity could use 5 bytes, so use a round number of 8 bytes.
Misc:
* sfeed: simplify time calculation and make it slightly easier to read.
This also fixes a calculation (possibly a compiler bug) with Open Watcom 1.9.
* Remove the sfeed name in some outputs ("branding").
Documentation:
* Fix some typos and improve code comments, in particular about the time parsing.
* README: sfeed_download example: change youtube-dl to yt-dlp:
this is an active maintained fork.
* README: add error checking for temporary files in the examples.
Aside from the above changes there have been lots of testing on different and
strange systems and the test-cases have been expanded to cover some cases.
These tests are in a separate repo.
Some tested strange systems:
* SerenityOS: gophers://codemadness.org/9/paste/sfeed-serenityos.webm partially
works. The core base utilities like sort are limited and non-POSIX though, so
sfeed_update doesn't work directly there.
* MS-DOS (16-bit and 32-bit extender) using Open Watcom 1.9. Works fine using a
32-bit extender. No 2038-support with 64-bit time_t though, just _unsigned_
32-bit :)
Tested these less-used systems or compilers can be fun and also discover
(pedantic) bugs.
While adding JSON Feed output support (sfeed_json) I also wrote a parser for it
to read the data. It can convert from JSON Feed to Atom. It can also convert
directly from JSON Feed to sfeed(5). It is available at:
https://git.codemadness.org/jfconvert/files.html
I want to thank people for sharing their experiences and scripts and nice
comments.
Donations can be send to:
https://codemadness.org/donate/
.. or feel free to subscribe to Bitreich OnlyFans:
gopher://bitreich.org/1/onlyfans
:)
Thanks,
Hiltjo