my textmode workflow ==================== i thought i'd share my recent findings since i've been switching to textmode. i've been using offpunk[1] for anything http, gopher and gemini related. newsboat with elinks -------------------- for anything rss/atom related i've found newsboat[2] is better suited to my own needs. i'm willing to accept to that i might be using the offpunk subscribe feature[3] incorrectly, but newsboat feels more intuitive. i've been using a combination of elinks' [4] image viewer handler and wslview to allow me to view images (or open a graphical browser) in newsboat. here's what the config looks like ``` # $HOME/.newsboat/config browser "elinks %u" # requires some mime handling too macro w set browser "wslview %u"; open-in-browser ; set browser "elinks %u" ``` if you use "open browser" elinks will trigger, alternative (, + w) will trigger wslview which should open your default graphical browser. tip: if you're a wsl user, you can also use this to handle external browser usage in offpunk. just add `handler text/html wslview %s` to your offpunkrc and to configure mime correctly in elinks ``` # $HOME/.elinks/elinks.conf set mime.handler.image_viewer.unix.ask = 0 set mime.handler.image_viewer.unix.block = 1 set mime.handler.image_viewer.unix.program = "$HOME/.newsboat/scripts/image_pager.sh %" set mime.extension.jpg="image/jpeg" set mime.extension.jpeg="image/jpeg" set mime.extension.png="image/png" set mime.extension.gif="image/gif" set mime.extension.bmp="image/bmp" set mime.type.image.jpg = "image_viewer" set mime.type.image.jpeg = "image_viewer" set mime.type.image.png = "image_viewer" set mime.type.image.gif = "image_viewer" set mime.type.image.bmp = "image_viewer" ``` the image_pager.sh script is a one liner using chafa[] and lessi (less with sixel support) ``` URL=$1 chafa -C on --clear "${URL}" | lessi ``` pushing stuff to elinks rather than trying to handle directly in newsboat has the added feature that elinks is one of the few text browsers that supports javascript and cookie. so you've got a good chance the page will render correctly. bookmarking urls for reading later ---------------------------------- i've also enabled bookmarking (ctrl-b) in newsboat so that i can push those urls into offpunk. ``` # $HOME/.newsboat/config bookmark-cmd "$HOME/.newsboat/scripts/bookmark.sh" bookmark-autopilot yes ``` the bookmark script is the one provided in examples[7] enabling autopilot means the url is just passed to the script with no further questions asked. since the example script stores one bookmark per line you can feed this into offpunk using xargs to be synced at a later time. ``` cat bookmarks.txt | xargs -I{} offpunk --fetch-later {} ``` my sync (offline mode) commands are: ``` offpunk --sync bookmarks tour toread to_fetch --assume-yes --cache-validity 51840 newsboat -x reload print-unread ``` i've found it's better to explicitly sync the list in offpunk, there's some news aggregator pages that seem to trigger longer fetch times. so i'd rather pick articles from manually rather than have the latest links fetched. tags: offpunk, rss, newsboat, elinks [1] gemini://offpunk.net/ [2] https://newsboat.org/ [3] gemini://offpunk.net/subscriptions.gmi [4] http://elinks.cz/documentation/html/manual.html-chunked/ch09s02.html [5] https://github.com/hpjansson/chafa [6] https://github.com/roblillack/lessi [7] https://github.com/newsboat/newsboat/blob/master/doc/examples/example-bookmark-plugin.sh send comments misfin://trivial@woodpeckersnest.space or gemini://bbs.geminispace.org/u/tftp