summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-08trim whitespace around uri field valueHiltjo Posthuma
... and abstract printing timetamp and uri to string_print_{timestamp,uri} similar to string_print_trimmed (normal string) and string_print_encoded (content). Noticed with whitespace around the field in the webcomic "amphibian": http://amphibian.com/feeds/atom
2019-02-08short some callback variable names, change "name" to "t" (tag)Hiltjo Posthuma
2019-01-29document: minor reword, reference sfeedrc(5) in READMEHiltjo Posthuma
2019-01-29sfeed: use the same handler names as the XMLParserHiltjo Posthuma
2019-01-25README: sfeed_frames still mentioned it output content, remove itHiltjo Posthuma
This was removed before, because of potential security issues in commit b7e288a96418e1ea5e7904ab2896edb3f4615a10 Thanks trqx for the feedback.
2019-01-25tree.h: remove unused SPLAY tree macrosHiltjo Posthuma
2019-01-25sfeedrc.example: fix/update urls, add 2 examples for github and redditHiltjo Posthuma
2019-01-25Makefile: add POSIX target, respect (packaging) system CFLAGS/LDFLAGSHiltjo Posthuma
this also makes packaging slightly simpler.
2019-01-25documentation improvementsHiltjo Posthuma
Man pages: - sfeed_update: fix: fetchfeed parameter documentation. - sfeed_update: fix/update: urls in sfeedrc.example. - sfeed_update: document maxjobs variable. - sfeedrc: document filter and order functions here. - more semantic keywords: function arguments and some Nm. README: - Document more clearly sfeedrc is a shellscript at the first usage "steps". - Add newsboat OPML export and import to sfeed_update example. - Document the Makefile is POSIX (not some GNU/Makefile). - Add reference to my tool hurl: a HTTP/HTTPS/Gopher file grab client. - Describe the reason/usefulness of the filter example. - Describe how to override curl(1), an optional dependency. With feedback from lich, thanks!
2019-01-13bump LICENSEHiltjo Posthuma
2019-01-08xml: remove unnecesary checksHiltjo Posthuma
- reduce amount of data to check. - remove unnecesary checks from (now) internal functions.
2018-12-24bump version to 0.9.7Hiltjo Posthuma
2018-12-14sfeed: rename buffer to buf, change entitytostr check, it can never happenHiltjo Posthuma
2018-12-14tweak README: move cp style.css from initial step to HTML exampleHiltjo Posthuma
+ change "append" to "change".
2018-12-14sfeed_tail: wakeup less often by defaultHiltjo Posthuma
The files are now checked every 10 seconds instead of 1 second. NOTE: ofcourse it still first checks the filesize and modification time and only then proceeds.
2018-12-02sfeed_xmlenc: don't treat not finding an encoding as an errorHiltjo Posthuma
in scripts empty output should be checked.
2018-12-02sfeed_xmlenc.1: document output betterHiltjo Posthuma
2018-12-02XML tag parse improvements for PI and end tagsHiltjo Posthuma
- Stricter parsing of tags, no whitespace stripping after <. - For end tags the "internal" context x->tag would be "/sometag". Make sure this matches exactly with the parameter tag. - Reset tagname after parsing an end tag. - Make end tag handling more consistent. - Remove temporary variable taglen.
2018-12-02sfeed_xmlenc: simplify and don't print control charactersHiltjo Posthuma
2018-12-01sfeed_opml_export: escape `&'Leonardo Taccari
2018-11-09minor white-space style fixHiltjo Posthuma
2018-11-04README.xml: remove mention of variable that is not used anymoreHiltjo Posthuma
2018-11-04whitespace and comment fixHiltjo Posthuma
2018-10-24sfeed_update: fix wrong comment "temporary file" -> "temporary directory"Hiltjo Posthuma
2018-10-24Revert "sfeed_update: replace non-POSIX mktemp with $$"Hiltjo Posthuma
This reverts commit 8699fa2bb4c75670952fee503a58ca4a652627eb. There is a regression in directory permissions among other things.
2018-10-11sfeed_update: replace non-POSIX mktemp with $$Hiltjo Posthuma
+ fix wrong comment "temporary file" -> "temporary directory".
2018-10-08util.h: remove unused macro ISUTF8()Hiltjo Posthuma
2018-10-08sfeed_mbox: remove an unneeded strlcpy callHiltjo Posthuma
2018-10-08sfeed_mbox: add seconds to Date headerHiltjo Posthuma
2018-10-08improve code-style for parsing timeHiltjo Posthuma
- reorder and remove a goto. - no need for a separate variable "end". - don't use s[0] style because the pointer was changed.
2018-10-06sfeed_update: handle signals consistently in different shellsHiltjo Posthuma
- Handle SIGTERM properly, don't leave stray processes. Kill them on both SIGTERM and SIGINT. - When a "batch" of feeds was interrupted, don't allow to wait again. - Simplify and create sighandler function. - Now on both SIGTERM and SIGINT the cleanup() handler is called to not leave stray files. Tested with ksh, dash, bash, zsh.
2018-10-05sfeed_update: improve SIGINT handlingHiltjo Posthuma
When SIGINT occurs on waiting for jobs it returns 130 (128 + SIGINT). Make sure to check for interrupted and return immediately. Tested with ksh, dash, bash, zsh. Sidenote: ideally we want to cleanup() on SIGTERM too, but this is too inconsistent over various shells.
2018-10-05README: improve filter example, compile flags orderHiltjo Posthuma
2018-10-05sfeed: parsetime: weekday part in RFC822 time is optionalHiltjo Posthuma
noticed in "RMS notes" RSS.
2018-10-05sfeed_update: small code-style consistency fixesHiltjo Posthuma
2018-10-05Makefile: just use OpenBSD #ifdef for pledge(2)Hiltjo Posthuma
2018-09-30sfeed_update: add variable for max amount of feeds to update concurrentlyHiltjo Posthuma
This adds a variable for the maximum amount of feeds to update concurrently. A system/user may have fork resource limits or want to setup some job limit. Thanks leot for the idea and feedback!
2018-09-30Makefile: improve consistency of variable, clarify commentHiltjo Posthuma
2018-09-30sfeed_update: remove -S option (show error), it is not wantedHiltjo Posthuma
2018-09-30sfeed_update: add filter(), order() support per feed + improvementsHiltjo Posthuma
Pass the name parameter to the functions and add these to the pipeline. They can be overridden in the config. - add the ability to change the merge logic per feed. - add the ability to filter lines and fields per feed. - add the ability to order lines differently per feed. - add filter example to README. - code-style: - fetchfeed consistency in parameter order. - change [ x"" = x"" ] to [ "" = "" ]. Simplify some if statements. - wrap long line in fetchfeed(). - use signal names for trap.
2018-09-10update README: tested on aarch64 by leotHiltjo Posthuma
2018-09-10sfeed_update: reorder loadconfig and signal handler setupHiltjo Posthuma
... this is useful to change the interrupted behaviour in some use-cases. Thanks leot for the feedback.
2018-09-10update READMEHiltjo Posthuma
2018-09-08bump version to 0.9.6Hiltjo Posthuma
2018-09-07sfeed_update: don't always exit 1, exit 130 on SIGINT, exit 0 otherwiseHiltjo Posthuma
Reported by "Dekedro", thanks!
2018-09-07util.c: remove remaining uint8_t type, we assume a sane CHAR_BIT == 8Hiltjo Posthuma
2018-09-07fix many undefined behaviour in usage of ctype functionsHiltjo Posthuma
- cast all ctype(3) function argument to (unsigned char) to avoid UB POSIX says: "The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined." Many libc cast implicitly the value, but NetBSD does not, which is probably the correct thing to interpret it. - no need to cast for putchar + rename some fputc(..., stdout) to putchar POSIX says: "The fputc() function shall write the byte specified by c (converted to an unsigned char) to the output stream pointed to by stream [...]" Major thanks to Leonardo Taccari <iamleot@gmail.com> for reporting and testing it on NetBSD!
2018-08-26bump version to 0.9.5Hiltjo Posthuma
2018-08-26xml: use ANSI types and struct initializationHiltjo Posthuma
long is atleast 32-bits, codepointtoutf8() works with >= 32-bit types. Valid codepoint ranges are not larger than this. unsigned char is not needed because converted unicode bytes don't use this range. tested all valid codepoints and output on amd64, i386 and SPARC64.
2018-08-23xml: remove TODO comments and add a noteHiltjo Posthuma