summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-23sfeed.{1,5}: small rewording improvementHiltjo Posthuma
2021-11-23sfeed.{1,5}: the first author is parsedHiltjo Posthuma
The Atom RFC standard supports multiple authors, but this is usually one. The first author is parsed.
2021-11-23code-style: define fieldmap in the same order as the enum declarationHiltjo Posthuma
2021-10-25sfeed.{1,5}: small rewording for the '|' characterHiltjo Posthuma
2021-10-25sfeed_mbox: add link as base URL for HTML contentHiltjo Posthuma
This is useful for HTML viewers (like lynx -dump) in mail clients to use the base href as the base URL for relative links in the HTML content.
2021-10-25sfeed_mbox: use 64-bit for the checksum numberHiltjo Posthuma
This makes the checksum number atleast 64-bit and makes the Message-ID header consistent across mixed 32-bit and 64-bit systems. Tested on amd64 and MIPS32BE.
2021-10-24README: tested with the compiler chibicc and RISCV64 VM (OpenBSD and Linux)Hiltjo Posthuma
chibicc (amd64): https://github.com/rui314/chibicc
2021-10-05Makefile: consistency and pedantic change: use ar -rc instead of ar rcHiltjo Posthuma
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ar.html This was changed in the below commit but should have been changed consistently: commit 3d2cd7cf4a4052f3db6e13af4f22835b457bdeb3 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed Jun 10 14:40:06 2020 +0200 Makefile: pedantic change: use ar -rc instead of ar rc
2021-08-06bump version to 1.0Hiltjo Posthuma
2021-08-06sfeed_opml_export: fix typo: opml -> OPMLHiltjo Posthuma
2021-08-06sfeedrc.5: fix typosHiltjo Posthuma
2021-08-04sfeed_mbox.1: add examples to this man page aswellHiltjo Posthuma
2021-08-03man page improvementsHiltjo Posthuma
2021-08-03code-style: use a newline before return in main()Hiltjo Posthuma
2021-07-25man page improvementsHiltjo Posthuma
- Some rewording and typo fixes. - Specify in more detail how sfeed_web detects links from HTML code.
2021-07-24sfeed_{web,xmlenc}.1: use my site as an exampleHiltjo Posthuma
2021-07-22sfeed_update.1: just use ~/ instead of $HOME consistently in examplesHiltjo Posthuma
2021-07-19code-style: change gmtime to the reentrant/thread-safe gmtime_rHiltjo Posthuma
No functional or performance difference (intended) because these programs are not threaded.
2021-07-11sfeed.c: parsetime: support short digit years for RSS pubDate fields (RFC822)Hiltjo Posthuma
RSS (pubDate) uses RFC822 dates. This standard is obsoleted by RFC2822. The RSS 2.0 spec says for the pubDate field: "[...] All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred)." RFC822 section 5.1 describes the syntax with 2 digit years: https://datatracker.ietf.org/doc/html/rfc822#section-5.1 It was obsoleted/fixed in RFC2822 section 4.3: https://datatracker.ietf.org/doc/html/rfc2822#section-4.3 " Where a two or three digit year occurs in a date, the year is to be interpreted as follows: If a two digit year is encountered whose value is between 00 and 49, the year is interpreted by adding 2000, ending up with a value between 2000 and 2049. If a two digit year is encountered with a value between 50 and 99, or any three digit year is encountered, the year is interpreted by adding 1900." In the real world I've seen all sites using RSS use the 4-digit format. For historic context of changes and what feeds it might affect: - RFC822 was published in 13 august 1982, obsoleted by RFC2822. - RFC2822 was published in april 2001, obsoleted by RFC5322. - RFC5322 was published in october 2008. - RDF was started around 1996. It was published around 2004. - March 15, 1999: RSS 0.90 (Netscape), published by Netscape and authored by Ramanathan Guha. - July 10, 1999: RSS 0.91 (Netscape), published by Netscape and authored by Dan Libby. - June 9, 2000: RSS 0.91 (UserLand), published by UserLand Software and authored by Dave Winer. - Dec. 25, 2000: RSS 0.92, UserLand. - Aug. 19, 2002: RSS 2.0, UserLand. - July 15, 2003: RSS 2.0 (version 2.0.1), published by the Berkman Center for Internet & Society at Harvard Law School and authored by Dave Winer. - July 15, 2003: RSS 2.0 (version 2.0.1-rv-1), published by the RSS Advisory Board. - July 17, 2003: RSS 2.0 (version 2.0.1-rv-2), RSS Advisory Board. - April 6, 2004: RSS 2.0 (version 2.0.1-rv-3), RSS Advisory Board. - May 31, 2004: RSS 2.0 (version 2.0.1-rv-4), RSS Advisory Board. - June 19, 2004: RSS 2.0 (version 2.0.1-rv-5), RSS Advisory Board. - January 25, 2005: RSS 2.0 (version 2.0.1-rv-6), RSS Advisory Board. - Aug. 12, 2006: RSS 2.0 (version 2.0.8), RSS Advisory Board. - June 5, 2007: RSS 2.0 (version 2.0.9), RSS Advisory Board. - Oct. 15, 2007: RSS 2.0 (version 2.0.10), RSS Advisory Board. - March 30, 2009 (current): RSS 2.0 (version 2.0.11), RSS Advisory Board. RSS history source: https://www.rssboard.org/rss-history
2021-07-10bump version to 0.9.25Hiltjo Posthuma
2021-07-07sfeed_web.1: fix typo: url -> URLHiltjo Posthuma
2021-07-06sfeed_mbox: add option to print contentHiltjo Posthuma
- Add SFEED_MBOX_CONTENT environment option. When set to "1" it outputs the content aswell. This is disabled by default for security reasons, because many clients handle HTML in an insecure way. - Print link and enclosure on one line and align them.
2021-07-06sfeedrc.5: add an example how to override the options in the man page aswellHiltjo Posthuma
2021-07-06sfeed.{1,5}: number fields in the man pageHiltjo Posthuma
This makes it slightly easier to lookup fields and map the fields by field number in scripts (awk, cut) etc.
2021-07-06README.xml: remove newline before EOFHiltjo Posthuma
2021-07-06README: add a simplified version of printing the first enclosureHiltjo Posthuma
This works on sfeed(5) feed output since they are already sorted.
2021-07-06sfeed: change comment which reflects printing relative URLs behaviourHiltjo Posthuma
This URL printing behaviour was changed recently in commit f305b032bc19b4e81c0dd6c0398370028ea910ca
2021-07-06sfeed: printtrimmed function does not change or modify the bufferHiltjo Posthuma
Make it const char *.
2021-06-05README: fix typo in a commentHiltjo Posthuma
2021-06-05Makefile: switch to use CPPFLAGS -D_DEFAULT_SOURCEHiltjo Posthuma
This fixes a warning on Linux glibc: /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ^~~~~~~ Tested on Void GNU/Linux glibc with gcc. Tested on various other platforms for regressions too namely: OpenBSD, NetBSD, FreeBSD, Void GNU/Linux musl.
2021-06-05README: fix escape sequence which is non-POSIXHiltjo Posthuma
The "\s" escape sequence is non-POSIX and GNU awk gives a warning: gawk: cmd. line:69: warning: escape sequence `\s' treated as plain `s' BSD awk does not give this warning and supports it. Use the POSIX [[:space:]] character class instead. References: - https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html The table in the section "Regular Expressions". - https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html#tag_05
2021-06-03bump version to 0.9.24Hiltjo Posthuma
2021-06-01util.c: err() do not print colon formattedHiltjo Posthuma
Most common-used compilers (gcc, clang) optimize this away though.
2021-06-01sfeed_gopher: unveil: show path when it failedHiltjo Posthuma
2021-06-01portability and standards: add BSD-like err() and errx() functionsHiltjo Posthuma
These are BSD functions. - HaikuOS now compiles without having to use libbsd. - Tested on SerenityOS (for fun), which doesn't have these functions (yet). With a small change to support wcwidth() sfeed works on SerenityOS.
2021-05-30sfeed_frames.1/sfeed_html.1: reference the style.css example fileHiltjo Posthuma
2021-05-29sfeed_opml_export: sync loadconfig() function fixes from sfeed_updateHiltjo Posthuma
- Do not show stderr of readlink. - Show the reference to the example sfeedrc (like sfeed_update). - Make the error message a bit shorter. - Fix showing the path if it does not exist, for example: $ sfeed_opml_export "a" readlink: a: No such file or directory Configuration file "" does not exist or is not readable. Now shows: $ sfeed_opml_export "a" Configuration file "a" cannot be read. See sfeedrc.example for an example.
2021-05-27sfeed_frames/sfeed_html: show the total counts and improve the title formatHiltjo Posthuma
This title format now matches the one with sfeed_curses. It shows the count to the most left and makes it more readable imho. It also works better when the titlebar is small.
2021-05-27sfeed_update: fix message when the configuration file does not existHiltjo Posthuma
When sfeed_update was called without using a parameter and it used the default and this path did not exist it would incorrectly print: Configuration file "" does not exist or is not readable. See sfeedrc.example for an example. Make the error message a bit shorter too. This was a partial regression of commit df74ba274c4ea5d9b7388c33500ba601ed0c991d
2021-04-29bump version to 0.9.23Hiltjo Posthuma
2021-04-28Makefile: fix typo in commentHiltjo Posthuma
2021-04-28fixup: a regression with RSS guid, by default ispermalink="true"Hiltjo Posthuma
2021-04-28use the last href attribute value if there are multiple setHiltjo Posthuma
Input to reproduce: <entry> <link href="https://codemadness.org/a" href="https://codemadness.org/b"/> </entry> Old value: "https://codemadness.org/ahttps://codemadness.org/b" New value: "https://codemadness.org/b" same with RSS <enclosure url="" />
2021-04-28add support for old/legacy Atom 0.3 feedsHiltjo Posthuma
This standard was a draft used around 2005-2006. Instead of the fields "published" and "updated" it used "issued" (mandatory field) and "modified" (optional). Add support for them and also in preference of supporting Atom 1.0 and creation dates first. I don't know any real-life examples that still use this though. Some references: - http://rakaz.nl/2005/07/moving-from-atom-03-to-10.html - https://www.dokuwiki.org/syndication (rss_type "atom" parameter value). - https://support.google.com/merchants/answer/160598?hl=en
2021-04-28sfeed.{1,5}: improve documentation, the content-type field can be empty...Hiltjo Posthuma
... if there is no content.
2021-04-28enable unlocked I/O by defaultHiltjo Posthuma
getchar_unlocked is part of POSIX and should be supported by most platforms. On all tested platforms it has a performance benefit, sometimes smallish (<12%), sometimes large (~40%).
2021-04-28README: update newsboat export scriptHiltjo Posthuma
Since newsboat version 2.22 (2020-12-21) it stores the content mime-type of a field so allow to export this. The older entries are empty and will be exported as "html" (even though they might have been plain-text). ... also add the (empty) category field.
2021-04-28improve "ispermalink", "rel" and "type" attribute handling/bufferingHiltjo Posthuma
2021-04-28improve content-type "type" attribute handling/bufferingHiltjo Posthuma
2021-04-27sfeed.c: detect the proper mime-type for XHTMLHiltjo Posthuma
Reference: https://www.w3.org/2003/01/xhtml-mimetype/