summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-25sfeed_curses: cast character for SFEED_AUTOCMD to unsigned charHiltjo Posthuma
Otherwise a character like \xa0 (160) would be negative and goto the event, since a negative return value in readch() is used for errors or reserved for signal handling. Noticed while testing mouse X10 encoding with extended buttons, like button 7: SFEED_AUTOCMD="l$(printf '\x1b[M\xa0!!')j" ./sfeed_curses ~/.sfeed/feeds/*
2022-02-24sfeed_curses: remove continue in application key handlingHiltjo Posthuma
On an unknown or invalid sequence just use the key handling like the other keys do.
2022-02-24sfeed_curses: fix a redraw when reloading a file when reading from stdinHiltjo Posthuma
When reading data from stdin and changing the URL file externally in some way and then pressing 'R' would not redraw (and highlight/unhighlight) the marked items.
2022-02-24sfeed_curses.1: clarify the 'R' keybind or SIGHUP will reload the url file alsoHiltjo Posthuma
... if it is set of course.
2022-02-24sfeed_mbox: use putc, it may be implemented as a macroHiltjo Posthuma
No functional difference intended.
2022-02-24sfeed_curses: die(): use stdio buffered function/macroHiltjo Posthuma
vdprintf() was changed back to vfprintf() in commit 06bb4583, but the write was not changed. Change it to be more consistent and use the stdio buffered functions/macro.
2022-02-24sfeed_curses: fix a wrong comment about the arrow left and right keysHiltjo Posthuma
Add autocmd comment.
2022-02-24sfeed_curses: add keybinds for home key and home and end key in urxvtHiltjo Posthuma
\x1b[1~ home (putty and some terminals). \x1b[7~ urxvt home. \x1b[8~ urxvt end. Refactor repeated code also.
2022-02-19fix a compiler warning with (Net)BSD cursesHiltjo Posthuma
Some curses implementations have tparm(char *) (BSD and older ncurses), some have tparm(const char *). The older POSIX specification had: tparm(char *): https://pubs.opengroup.org/onlinepubs/7908799/xcurses/term.h.html Just cast it to char *. The terminfo variables are defined elsewhere so it should be safe. Also remove an unnecesary cast in minicurses. Hopefully this satisfies all curses variants and versions now.
2022-02-19sfeed_opml_export: improve commentHiltjo Posthuma
In theory feed names can contain newlines, TABS, control-characters or start with echo options like -n. This is not recommended and not checked. URLs cannot have these characters: they should be percent-encoded. echo is typically a shell built-in and fast, so this trade-off is done.
2022-02-06bump version to 1.2Hiltjo Posthuma
2022-02-06fix a warning with tparm on some systemsHiltjo Posthuma
Older POSIX standards also defined it as a char * parameter (not const char *) for tparm(). https://pubs.opengroup.org/onlinepubs/7908799/xcurses/term.h.html
2022-02-06add compile-time option to improve output on dumb non-UTF8 terminalsHiltjo Posthuma
This makes atleast feeds with simple ASCII work.
2022-02-06sfeed_curses: write cmd in a more verbose wayHiltjo Posthuma
This fixes a compile error tested with HaikuOS 32-bit (gcc2h, based on gcc 2.95). It also suppresses a false-positive warning of an unused forkexec function in cppcheck.
2022-02-05sfeed.c: code-style consistency: static functionsHiltjo Posthuma
2022-02-05sfeed: small optimizationHiltjo Posthuma
For feeds with lots of content data: Small performance improvement (~2%) on systems that implement putchar as a macro. On some systems using a function call for putchar it can be easier to replace with putchar_unlocked. (On an older MIPS32 VM changing putchar to putchar_unlocked makes writing 5x faster).
2022-02-05sfeed_curses.1: tiny rewording from previous commitHiltjo Posthuma
There is only one enclosure supported.
2022-02-04improve some code commentsHiltjo Posthuma
2022-02-04sfeed_curses.1: document @ flagAnders Damsgaard
2022-02-01sfeed_curses.1: fix stdin -> ttyHiltjo Posthuma
Because the tty (/dev/tty). is reopened when reading feed data from stdin.
2022-02-01parsetime: no need to check `tp`. it must be setHiltjo Posthuma
2022-01-22add feature to go to the next bold row and previous bold row with J and KHiltjo Posthuma
This replaces the current J and K keybind, which was rarely useful. Thanks to IanJ for the suggestion and feedback!
2022-01-19sfeed_curses: code-style: remove variable name in definitionHiltjo Posthuma
2022-01-19sfeed_curses: fix a pedantic sign comparisonHiltjo Posthuma
2022-01-19fix inconsistencies in commentsHiltjo Posthuma
2022-01-19sfeed: extend the time range, use long long instead of time_tHiltjo Posthuma
This allows to parse the time as a number in the 64-bit range, even on 32-bit platforms. Note that the sfeed formatting tools can still truncate/wrap the value to time_t, which can be 32-bit.
2022-01-19sfeed_curses.1: clarify an exception with SIGINTHiltjo Posthuma
SIGTERM is the best way to quit the program, because SIGINT can cancel only the line editor prompt when using it.
2022-01-19sfeed_curses: consistency: mousereport: use off_t like the other functionsHiltjo Posthuma
2022-01-19sfeed_curses: line editor: add more clear comments of signal handlingHiltjo Posthuma
2022-01-19sfeed: parsetime: allow leap second like 23:59:60Hiltjo Posthuma
Specified in RFC2822 Section 3.3. Date and Time Specification "[...] the time-of-day MUST be in the range 00:00:00 through 23:59:60 (the number of seconds allowing for a leap second; see [STD12]) [...]" To test: <entry><updated>2016-12-31T23:59:60Z</updated></entry>
2022-01-14util: strtotime: expand on comment about 2038-readinessHiltjo Posthuma
Also tested on MIPS32BE which has 32-bit time_t and which wraps the time value.
2022-01-14util: parsetime(): fix comment, long long supports atleast 64-bit rangeHiltjo Posthuma
2022-01-14sfeed_curses: pedantic fix for UB with an empty URL fileHiltjo Posthuma
When a new URL file is used with no URL entries then NULL is passed to qsort() and bsearch(). This is reported by clang UBsan as undefined behaviour (debatable), but no issue in practise with many implementations. Fix it anyway. To reproduce with clang UBsan: Compile with clang or gcc with CFLAGS and LDFLAGS -fsanitize=undefined touch /tmp/urls # new file which should be empty. SFEED_URL_FILE=/tmp/urls sfeed_curses 2>/tmp/log ^D q cat /tmp/log
2022-01-06README: sfeed_download small changesHiltjo Posthuma
2022-01-06README: small typo and rewording for sfeed_download exampleHiltjo Posthuma
2022-01-06README: add a listing of the formats supportedHiltjo Posthuma
2022-01-06README: add sfeed_download example, parallel downloader/extractorHiltjo Posthuma
2022-01-04sfeed_markread: set all locale variables and use LC_ALLHiltjo Posthuma
2022-01-03Makefile: add comment for feature test macro on FreeBSDHiltjo Posthuma
Reported by Christos Margiolis and plasmoduck, thanks
2022-01-03Makefile: tiny typo: add space after SFEED_CURSES_CPPFLAGSHiltjo Posthuma
2021-12-24sfeed_content: allow to set HTML converter with env variableHiltjo Posthuma
This makes it a bit more easy to reuse the script and makes the run-time dependency on lynx more optional. For example with w3m: SFEED_HTMLCONV="w3m -I UTF-8 -O UTF-8 -T text/html -dump" \ sfeed_curses ~/.sfeed/feeds/* (of course this can be set in a wrapper script or shell profile too)
2021-12-23sfeed_markread: small white-space fixHiltjo Posthuma
2021-12-23README: improve newsboat export scriptHiltjo Posthuma
Performance improvements, use feed URL if the feed title is not (yet) set.
2021-12-23README: add GNU/HurdHiltjo Posthuma
tested for fun
2021-12-23sfeed_atom: add category field(s)Hiltjo Posthuma
2021-12-23LICENSE: bump yearHiltjo Posthuma
2021-11-27bump version to 1.1Hiltjo Posthuma
2021-11-26README: reword the part mentioning SFEED_THEMEHiltjo Posthuma
2021-11-26README: small rewordingHiltjo Posthuma
2021-11-26sfeed.1: add sfeed_curses exampleHiltjo Posthuma