Forgot to share here yesterday, I wrote a new post walking through setting up a simple headless Kiwix install for offline Wikipedia reading:

an3223.github.io/blog/2021-10-

AN3223 boosted

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.

github.com/an3223/sakra

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.

Show thread

I wrote a file opener (like xdg-open) in POSIX shell that uses mailcap for configuration, check it out github.com/AN3223/scripts/blob

AN3223 boosted

PSA: duckduckgo has !-keywords that redirect searches to other sites
like
!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
!w crab

if you set ddg as yr default search you can jump to literally all of the webbed site searches with minimal keystrokes :blobcat:

AN3223 boosted

set -C will prevent the shell from overwriting existing files with the > operator (can always be overriden with the >| operator). Consider adding this to your shell's rc file.

AN3223 boosted

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.

Show thread

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))

Show thread

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."

Show thread

I highly recommend mywiki.wooledge.org/BashPitfal to anyone who writes shell scripts. You should also lint your shell scripts will shellcheck.

Show older
LinuxRocks.Online

Linux geeks doing what Linux geeks do...