summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2018-08-23sfeed_mbox.1: forgot to bump dateHiltjo Posthuma
2018-08-23sfeed_mbox: improvementsHiltjo Posthuma
- don't output content and HTML mail anymore: this is very insecure for most mail clients. - improve Content-Type utf-8 encoding header (use the more common form). - improve line-endings at the end of the data.
2018-08-23sfeed_twtxt: slightly nicer outputHiltjo Posthuma
2018-08-23sfeed_tail: sleep the proper time, was a debug left-overHiltjo Posthuma
2018-08-23sfeed_tail: file need to exist the first run, but not afterHiltjo Posthuma
+ dont memcpy the struct stat(2) when nothing changed.
2018-08-22sfeed_twtxt: dont use the author and mention style, use a regular linkHiltjo Posthuma
Thanks trqx for pointing it out!
2018-08-22sfeed_tail: improvementsHiltjo Posthuma
- sfeed_tail only reads from files now, not from stdin anymore. This had too many caveats. - Instead of a timer it now detects changes faster and is more efficient using memory. - Improve documentation of its behaviour.
2018-08-22add sfeed_twtxt format program: format to a twtxt feedHiltjo Posthuma
2018-08-22remove stdint.h includeHiltjo Posthuma
the uint* types in XML are not exposed anymore.
2018-08-22xml: improve parsing of invalid attribute values separated by whitespaceHiltjo Posthuma
It is invalid XML, but this allows parsing old HTML pages aswell. For example: <input id=cb checked type="checkbox" title='checkbox' /> or <FONT FACE=wingdings SIZE=12><BLINK>oh hai</BLINK></FONT>
2018-08-22xml: improve handling of invalid long data entitiesHiltjo Posthuma
this also fixes an issue with truncating and missing data on invalid input.
2018-08-21README.xml: improveHiltjo Posthuma
2018-08-21sfeed_frames: stricter pledge when only reading from stdinHiltjo Posthuma
2018-08-21xml: rewrite codepointtoutf8 functionHiltjo Posthuma
No more converting to a uint32_t type. Just convert to a byte buffer. Tested on little- and big-endian. The code should be more clear too hopefully.
2018-08-21xml: don't reset internal tagname when parsing non-tag types like CDATAHiltjo Posthuma
... this affects "tags" starting with < such as CDATA and processing instructions.