summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-14sfeed_update: rename fetchfeed to fetchHiltjo Posthuma
... and simplify example in README.
2019-04-14sfeed_tail: rename "line" to "l" in local scopeHiltjo Posthuma
char *line is a global variable (reused pointer to line buffer).
2019-04-14sfeed: add support for the first enclosure of an itemHiltjo Posthuma
This is useful for example for podcasts (audio attachment), newsposts (usually some image) or comic strips (link to page, image as enclosure). thanks leot for the feedback!
2019-04-14sfeed_update improvementsHiltjo Posthuma
- Better checking and verbose logging (on failure) of each stage: fetchfeed, filter, merge, order, convertencoding. This makes sure on out-of-memory, disk-space or other resource limits the output is not corrupted. - This also has the added advantage it runs less processes (piped) at the same time. - Clear previous unneeded file to preserve space in /tmp (/tmp is often mounted as mfs/tmpfs). - Add logging function (able to override), use more logical logging format (pun intended). - Code-style: order overridable functions in execution order.
2019-04-07README: change procmail parallel running, improve some wordsHiltjo Posthuma
make the procmail example safer due to account process limits.
2019-04-07Makefile: fix make dist (compat src: strlcpy, strlcat)Hiltjo Posthuma
2019-04-06optimization: define GETNEXT as an inline macroHiltjo Posthuma
This reduces much function call overhead. getnext is defined in xml.h for inline optimization. sfeed only uses one XML parser context per program, this allows further optimizations of the compiler also. On OpenBSD it was noticable because of retpoline etc function call overhead. Using clang and a 500MB test XML file reduces processing time from +- 12s to 5s. Tested using some crazy optimization flags: SFEED_CFLAGS = -O3 -std=c99 -DGETNEXT=getchar_unlocked -fno-ret-protector \ -mno-retpoline -static A GETNEXT macro is also nice for programs which mmap(2) some big XML file. Then you can simply define: #define GETNEXT() (off >= len ? EOF : reg[off++])
2019-04-06sfeed_frames/sfeed_html: improve HTML output a bitHiltjo Posthuma
declare UTF-8 before <title>
2019-04-06util: remove unnecesary cast and initializationHiltjo Posthuma
2019-04-06sfeed: gettag: simplify and use ANSI bsearch()Hiltjo Posthuma
2019-04-06Makefile: make it simpler to not compile compat objectsHiltjo Posthuma
on OpenBSD: make COMPATOBJ=
2019-03-16xml: write x->getnext to a default GETNEXT macroHiltjo Posthuma
this allows to override x->getnext to expand to global context parsing and allows the compiler to optimize this inline. also remove checking if the x->getnext function exists (just crash hard).
2019-03-08util: pedantic snprintf improvementHiltjo Posthuma
POSIX says about snprintf: "If an output error was encountered, these functions shall return a negative value". So check for < 0 instead of -1. Afaik all implementations return -1 though.
2019-03-03gettzoffset: bit more strict UTC offset parsingHiltjo Posthuma
2019-03-03skip spaces in parsetime() itselfHiltjo Posthuma
2019-03-03sfeed: style, break in switch instead of returnHiltjo Posthuma
this style change is useful for my local coverage profile.
2019-03-01sfeed_update: remove wrong/incomplete commentHiltjo Posthuma
2019-02-27util: parseuri: fix typo in cast (ssize_t)Hiltjo Posthuma
2019-02-27atomlinktype make enum TagId instead of intHiltjo Posthuma
2019-02-27improve RSS2 permalink supportHiltjo Posthuma
In RSS2 (but not RSS0.9), a <link> is optional and it can also be specified by <guid isPermaLink="true"> (permalink is "true" by default). When a <link> is also present this will be used instead of the GUID permalink.
2019-02-27sfeed.c: improve commentHiltjo Posthuma
2019-02-24stricter Atom link parsingHiltjo Posthuma
the Atom link parsing is more strict now and checks the rel attribute. When the rel attribute is empty it is handled as a normal link ("alternate"). This makes sure when an link with an other type is specified (such as "enclosure", "related", "self" or "via") before a link it is not used. sfeed does not handle enclosures, but the code is reworked so it is very simple to add this. Enclosures are often used for example to attach some image to a newspost or an audio file to a podcast.
2019-02-24fix RFC822 ANSI and military zones parsingHiltjo Posthuma
2019-02-24documentation: fix typo to RFC reference for timestamps: RFC-3332 to RFC-3339Hiltjo Posthuma
2019-02-17bump version to 0.9.8Hiltjo Posthuma
2019-02-17update README.xmlHiltjo Posthuma
2019-02-08Makefile: add DOCPREFIX for installing docs in portsHiltjo Posthuma
change installed doc from /usr/local/share/sfeed to /usr/local/share/doc/sfeed
2019-02-08don't read XML data inside tag for Atom <link href/>Hiltjo Posthuma
Noticed in the webcomic "amphibian": http://amphibian.com/feeds/atom
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