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.

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 :voidlinux: boosted

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
!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 :voidlinux: boosted

actually it's called 'gnu plus shut the fuck up',

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 :voidlinux: boosted

the safest way to use computers is still abstinence

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.

AN3223 :voidlinux: boosted

It's funny to me when Linux asks for my Full Name when I'm creating users

Not this time, NSA

I came up with a little hack to use Bash-like ^u inside of Insert mode. I think others may be interested in this too:

config.bind('<Ctrl-u>', 'fake-key <Shift-Home><Backspace>', 'insert')

I wrote this as a script because pause=no doesn't seem to work inside of mpv.conf (although --pause=no from the CLI works as expected). I'm not sure if this is a bug or if this is by design.

If anyone knows a way to do this inside of mpv.conf I would love to know. Lua seems overkill here.

Show thread

Problem: starts in a paused state (i.e. as a result of save-position-on-quit)

Solution: I wrote a small script to always put mpv in an unpaused state on startup github.com/AN3223/dotfiles/blo

Hopefully this is useful to someone.

github.com/mlj/castget is pretty sweet. Just set up your config file, add your podcasts to it, catchup (castget -c), and then add something like `@hourly castget -q` to your crontab.

New podcasts will be downloaded into your directory of choice. No need for a GUI/TUI, just use your file manager. I am very satisfied.

Show more

Linux Geeks doing what Linux Geeks do..