summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-12RSS: give Dublin Core <dc:date> higher priority over <pubDate>Hiltjo Posthuma
This way dc:date could be the updated time of the item. For Atom there is <published> and <updated> with the same logic.
2020-10-12parse categories, add multiple field values support (for categories)Hiltjo Posthuma
Fields with multiple values are separated by '|'. In the future multiple enclosure support might be added. The categories tags are now parsed. This feature is useful for filtering and categorizing. Parsing of nested tags such as <author><name> has been improved. This code has been refactored. RSS <guid> isPermaLink is now handled differently also and will now prefer a permalink with "true" (link) over the ID. In practise multiple <guid> in an item does not happen.
2020-10-09xml: remove unused code for sfeedHiltjo Posthuma
2020-10-09fix counting due to uninitialized variable when the time could not be parsedHiltjo Posthuma
Since commit 276d5789fd91d1cbe84b7baee736dea28b1e04c0 if the time is empty or could not be parsed then it is shown/aligned as a blank space instead of being skipped. An oversight in this change was that items should be counted and set in `isnew`. This commit fixes the uninitialized variable and possible miscounting.
2020-10-09xml.h: minor comment rewordingHiltjo Posthuma
2020-10-09sfeed: parse day with max 2 digits (instead of 4)Hiltjo Posthuma
2020-10-09sfeed: support the ISO8601 time format without separatorsHiltjo Posthuma
For example "19720229T132245Z" is now supported.
2020-10-09README: tested with cproc and sdcc on Z80 emulator, for funHiltjo Posthuma
cproc: cproc: https://github.com/michaelforney/cproc qbe: https://c9x.me/compile/ z80 (sfeed base program) fuzix: http://www.fuzix.org/ RC2014 emulator: https://github.com/EtchedPixels/RC2014 sdcc: http://sdcc.sourceforge.net/
2020-10-09man pages: tweak alignment of listsHiltjo Posthuma
2020-10-09xml.c: remove buffering of comment data, which is unused anywayHiltjo Posthuma
2020-10-09xml.h: add underscore for #ifdef guardHiltjo Posthuma
This is the common style.
2020-10-09XML cdata callback: handle CDATA as dataHiltjo Posthuma
This improves handling CDATA for example in Atom feeds with: <author><email><![CDATA[abc]]><name><![CDATA[[person]]></name></author>
2020-07-06bump version to 0.9.18Hiltjo Posthuma
2020-07-05sfeed_atom: minor simplification, gmtime_r is not needed hereHiltjo Posthuma
2020-07-05README: reference sfeed_cursesHiltjo Posthuma
2020-07-05README: improvementsHiltjo Posthuma
- Add an example to optimize bandwidth use with the curl -z option. - Add a note about CDNs blocking based on the User-Agent (based on a question mailed to me). - Add an script to convert existing newsboat items to the sfeed(5) TSV format.
2020-07-05format tools: don't skip items with a missing/invalid timestamp fieldHiltjo Posthuma
Handle it appropriately in the context of each format tool. Output the item but keep it blanked. NOTE: maybe in sfeed_twtxt it should use the current time instead?
2020-07-05sfeed_mbox: don't ignore items with a missing/invalid timestampHiltjo Posthuma
The Date header is mandatory. Use the current time if it is missing/invalid.
2020-07-05sfeed_atom: the updated field is mandatory: use the current time...Hiltjo Posthuma
... if it is missing/invalid.
2020-07-05sfeed_atom: fix timezone, output if timestamp is setHiltjo Posthuma
Timezone should be GMT (as intended), do not convert to localtime.
2020-06-25README: small tweaks and a filter example improvementHiltjo Posthuma
This is a "quick&dirty" regex to block some of the typical 1px width or height tracking pixels.
2020-06-21sfeed_html/sfeed_frames: simplify struct feed allocationHiltjo Posthuma
There's no need for a dynamic struct feed **. The required size is known (argc). Just allocate it in one go.
2020-06-21Makefile: tiny compatibility improvement for tar -cfHiltjo Posthuma
2020-06-10Makefile: pedantic change: use ar -rc instead of ar rcHiltjo Posthuma
2020-06-04sfeed.{1,5}: clarify the timestamp field a bitHiltjo Posthuma
In particular for RSS feeds where a pubDate is optional.
2020-06-04sfeed_atom: make the output more conformHiltjo Posthuma
- Set mandatory entry tags: id, updated. - Change entry published (optional tag) to updated (mandatory). - Add <feed> tags: author name, id, updated, title. Thanks lich for the feedback and testing.
2020-06-01fix typoHiltjo Posthuma
2020-05-28sfeed: simplify/optimize checking end tags while inside a RSS/Atom tagHiltjo Posthuma
Instead of a binary search do set a pointer to the assigned expected end tag. This makes more sense and is also a minor optimization. No behavioural change intended.
2020-05-27util: encodeuri: simplify conditionHiltjo Posthuma
iscntrl is c < ' ' || c == 127 I want to encode a space and everything above 127 also. So this condition can be simplified to this.
2020-05-15README: fix indentation for fdm.conf examplesHiltjo Posthuma
No functional difference, but it should improve readability.
2020-05-13sfeed_gopher: if a gopher url cannot be parsed then show it anyway as a "URL:"Hiltjo Posthuma
This should never be able to happen though in practise because sfeed parses the uri aswell.
2020-05-13sfeed_gopher: do not use URL: prefix for gopher:// urls.Hiltjo Posthuma
Support the Gopher protocol directly and use the specified Gopher type. Idea by adc, thanks!
2020-05-04bump version to 0.9.17Hiltjo Posthuma
2020-05-02style.css: sort attributeHiltjo Posthuma
2020-05-02style.css: improve horizontal scrolling for long titles/small windowsHiltjo Posthuma
2020-05-01README: update tested platformsHiltjo Posthuma
- HPPA in qemu (OpenBSD). - FreeDOS + djgpp (+ wget with networking) in 32-bit mode.
2020-04-27sfeed_mbox: fallback author to feedname, not "unknown"Hiltjo Posthuma
For the author "unknown" is not a good indicator. Just fallback to the feedname if the exact author of the feed item is not known/set by the feed.
2020-04-27sfeed_mbox: remove prefix in subjectHiltjo Posthuma
The prefix in the subject can be too much/redundant if custom labels are used in the mail client for example. Filtering or custom labels can be made using the X-Feedname header. For mutt it can be useful to use the header X-Label and use the %y format specified to indicate the label. The index_format is described in the muttrc man page. An example: set index_format = "%4C %Z %[%a, %b %d %H:%M] %?y?%-15.15y ?%-15.15L (%?l?%4l&%4c?) %s" Other programs have similar headers: Dovecat has "X-Keywords" and Thunderbird "X-Mozilla-Keys".
2020-04-01util: improve/cleanup parseline()Hiltjo Posthuma
- remove a check that has no use/can never happen. - remove the return value as it's unused and the input size is known. - fix an old comment that doesn't reflect what the function does anymore.
2020-03-15sfeed_mbox: time parsing and consistency fixesHiltjo Posthuma
- make converting time error out as the other format tools do also. - remove wrong comment. - make code-style consistent.
2020-03-15man pages (section 1): document exit statusHiltjo Posthuma
Document it so it can be relied upon in scripts.
2020-03-15sfeed_twtxt: fix error message if gmtime() fails, "localtime" -> "gmtime"Hiltjo Posthuma
2020-03-15sfeed_mbox: POSIX defines gmtime_r sets errno, so use err(), not errx()Hiltjo Posthuma
2020-03-11sfeed_web: fix exit status codeHiltjo Posthuma
- Fix a theoretical issue where "found" can overflow and return a zero exit status when there are many feeds found. - When there are no RSS/Atom feeds this is not an error, so return 0. - Style: change unsigned int to int.
2020-03-11README: update tested environmentsHiltjo Posthuma
2020-03-11sfeed_html/sfeed_frames: fix bold markup for lynxHiltjo Posthuma
The previous style was not bold: <b><a href="">some link</a></b> The following link is now bold: <a href=""><b>some link</b></a>
2020-03-10sfeed_html/sfeed_frames: use a <pre> section per feedHiltjo Posthuma
This improves output with Dillo, w3m and possibly other simple browsers. - Dillo has a bug where it resets its block-style after <h2> when it is inside <pre>. Then it ignores newlines (inside <pre>) and the links are inlined. - w3m does not have a (line)margin for h2.
2020-03-10sfeed_plain: optimize utf8-decoding and column position calculationHiltjo Posthuma
Optimize for the common-case: assuming ASCII. The input is assumed to be valid UTF-8 input (output of sfeed). This saves 2 function calls for determining the width of a single ASCII character, which of course is 1. Ranges: < 32 are control-characters and are skipped. < 127 is typical ASCII and is 1 column wide. >= 127 is the normal path (control-character and multi-byte UTF-8). Tested on OpenBSD and Linux with various compilers (clang, gcc, pcc and tcc). On OpenBSD and Linux glibc much improvement. On Linux musl (almost) no change. In a common-case upto 40% performance improvement. In the worst-case negligible performance degration (<1%).
2020-02-23bump version to 0.9.16Hiltjo Posthuma
2020-02-23sfeed_update: don't preserve permissions of tmp files by moving, so copyHiltjo Posthuma
noticed on DragonFlyBSD where it prints a warning when moving the file from /tmp. To reproduce it: touch /tmp/file mv /tmp/file ~/ On other systems this would not print a warning, but it would preserve the group permissions etc.