Forgot to share here yesterday, I wrote a new post walking through setting up a simple headless Kiwix install for offline Wikipedia reading:
New blog post! "Common and not-so-common *nix shell footguns" https://an3223.github.io/blog/20210907_shelldonts.html
So apparently I'm banned from github.com/golang/go
I reviewed my comments to find out what might have caused it and my best guess is it's either because (A) I said that it's lazy to force git forge maintainers to add go-specific code rather than develop language-independent standards, or (B) I pointed out that git hosting is decentralized and adding "sourcehut support" by hardcoding git.sr.ht is incorrect, and applies to other hosts like gitlab, gitea, github enterprise, cgit, etc.
Notably among my participation in that repository is donating CPU time on my $1,000 RISC-V board to help with the RISC-V port.
In conclusion, 🖕. If you want to participate in golang/go be sure not to point out that any of their engineers are working on solutions which are wrong when the right solution is much harder.
I've just published my command-line RSS aggregator, written in just ~120 lines of POSIX shell and using curl and sfeed as dependencies.
I'm currently just using it for YouTube, podcasts, and blogs.
It is scriptable, so you should be able to instruct it to handle any content type.
Let me know what you think if you get a chance to try it out.
Over the past few days I've added more documentation, support for spawning terminal emulators, and more. I've also symlinked xdg-open to this script on my system and it works great.
It's pretty convenient to be able to share the same configuration file between my file opener, w3m, rtv, plus any other program that might want to use a mailcap.
If anyone gets a chance to try this script out please let me know how it goes.
Recently starting theming everything with gruvbox dark and I'm loving it
Qutebrowser (left): https://github.com/AN3223/dotfiles/blob/master/.config/qutebrowser/config.py
Stylesheet (also left): https://github.com/AN3223/dotfiles/blob/master/.config/qutebrowser/gruvbox.css
W3M (also right): https://github.com/AN3223/dotfiles/blob/master/.w3m/config
I wrote a file opener (like xdg-open) in POSIX shell that uses mailcap for configuration, check it out https://github.com/AN3223/scripts/blob/master/mailcap-open
PSA: duckduckgo has !-keywords that redirect searches to other sites
!w - wikipedia
!g - if you want to be a heretic
!aur - the AUR lol
!gh - github
!wa - wolfram alpha
so to search wikipedia for the article on crabs you type
if you set ddg as yr default search you can jump to literally all of the webbed site searches with minimal keystrokes
Relevant patches here: https://github.com/AN3223/void-packages/tree/personal/srcpkgs/busybox/patches
And then I didn't like how navigating through the history put my cursor at the beginning of the line (instead of the end of the line, like most shells). Yet another simple patch, since C-n/C-p/UP/DOWN all goto the same label, and there already existed a function for sending the cursor to the end of the line (found by grepping for the C-e behavior), so I just added that function call to the end of that label's case statement.
I tried out busybox's ash and I didn't like how (unlike most shells) C-w deletes words by space instead of space/hyphen/forward-slash (so deleting a path segment, or fixing a typo in a CLI option, was now tedious).
I decided I'd try patching it, despite not knowing much C. It was really easy to grep for the relevant code, since all of the line editing options contain EDITING in all caps. And then I just appended `|| c == '/' || c == '-'` to the relevant code.
(last quote is from the POSIX Programmer's Manual set(1p))
I was reminded of this site today when I realized "export TEST=~/test" doesn't perform tilde expansion in dash and it absolutely blew my mind.
Also blew my mind: "Application writers should avoid relying on set -e within functions."
I highly recommend https://mywiki.wooledge.org/BashPitfalls to anyone who writes shell scripts. You should also lint your shell scripts will shellcheck.
Linux geeks doing what Linux geeks do...