summaryrefslogtreecommitdiff
path: root/sfeed_content
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-12-23 18:31:11 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-12-24 11:45:34 +0100
commitd30a9301ee5f83b331712012d030fd201c333377 (patch)
tree59eee353632f68bcb6b698e6a927122dac0233ff /sfeed_content
parent453ba1b6c1311ce8c921a2941dfc48dd93a6b755 (diff)
sfeed_content: allow to set HTML converter with env variable
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)
Diffstat (limited to 'sfeed_content')
-rwxr-xr-xsfeed_content8
1 files changed, 5 insertions, 3 deletions
diff --git a/sfeed_content b/sfeed_content
index 2d0ee23..9fba99b 100755
--- a/sfeed_content
+++ b/sfeed_content
@@ -12,9 +12,11 @@ function unescape(s) {
return s;
}
BEGIN {
- htmlconv = "lynx -stdin -dump " \
- "-underline_links -image_links " \
- "-display_charset=\"utf-8\" -assume_charset=\"utf-8\" ";
+ htmlconv = ENVIRON["SFEED_HTMLCONV"];
+ if (!length(htmlconv))
+ htmlconv = "lynx -stdin -dump " \
+ "-underline_links -image_links " \
+ "-display_charset=\"utf-8\" -assume_charset=\"utf-8\" ";
}
{
if (previtem)