💾 Archived View for kota.nz › code captured on 2021-12-17 at 13:26:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

➡️ Next capture (2022-03-01)

-=-=-=-=-=-=-

kota.nz

code

gemgen

Command line tool for converting Commonmark Markdown to Gemtext. The goal is to create proper hand-made gemtext. Links and "autolinks" are placed below each paragraph, but a "paragraph" of only links is left intact. Normally, paragraphs are merged onto a single line, but hardlinks (double spaces or \ at the end of a line) may be used for manual line breaks. Lists and headings are simplified to the gemtext format, emphasis markings are removed (or kept with the -e flag), horizontal rules are turned into 80 character lines, and indented code is converted to the gemtext "fenced" format.

metweather

A little CLI tool to display weather information for Metservice. I created this and a Go library, metservice-go, so that I could have weather info for Aotearoa in my notification.

Metservice

metservice-go

tide

A command line program that prints Aotearoa's tidal data. It reads the official CSV files from LINZ and uses their provided algorithm to calculate the current tide height. If run in an interactive terminal it will also print out a basic graph.

LINZ

[image] tide screenshot

pcf

A simple ftp-based pastebin server and client. Uses a static webserver, ftp, sha1, and a filewatcher such as incron. In addition to the server spec + scripts, I wrote a basic command line client in go (although you can always use an ftp client and sha1sum instead). Someday, I might add sftp support for easier private server use.

basic command line client

notabar

Because bars are for noobs. Notabar is a tool and simple csv syntax. It's used to format and display the output of several programs in a notification. I use it instead of a system bar.

[image] notabar screenshot

modget

A package manager for Minecraft CurseForge mods. It kinda works right now, but is missing several important features... listen, working with curseforge's undocumented API isn't pleasant.

CurseForge

dprint

Print specified values from desktop files to stdout. Look, it's hard to describe okay? Here's a picture of me using it with dmenu.

[image] dprint screenshot

My launcher script pipes the output of dprint into dmenu to get a selection. Then it passes that selection into dprint -- with some options -- and then the output of that is executed by your shell (to launch the program).

#!/bin/sh
SELECTION=$(dprint | dmenu -i -l 8 "$@")
echo "Name:$SELECTION" | dprint -i - -o "StripExec" | ${SHELL:-"/bin/sh"} &

I wrote dprint because the default dmenu_run script just lists all the programs in your $PATH exactly as they're named. So, there's no easy way to rename them or tweak launch options. For example, that "calculator" program in the screenshot runs st -t st-float -g 76x30 -e python, and I renamed "ncmpcpp" to just "music."

calculator

black-pastel

A black background vim color-scheme. It's really just a slight fork of base16's default-dark, but I think it turned out nice.

base16's

[image] black-pastel screenshot

kota-prompt

My vi-mode zsh prompt. I unironically use vi-mode. There are literally dozens of us.

I think one of the big sticking points for people is that by default in bash or zsh there's virtually no current mode indicator. You just have to remember, I guess? This prompt is just your current path with /home/username replaced with ~ and it turns blue if you're in normal mode or red if your last command exited non-zero. Simple. Effective.

tabstore

Store your opened Firefox tabs in a plain text file for later restoration. A friend and I wrote this little extension back in 2017 after Firefox quantum came out and there were no plugins around to do this. Very useful for downloading a huge list of youtube videos (with youtube-dl -a) or sending a shopping list to a friend. It still works fine, but fair warning, I don't really use Firefox anymore. I wrote about tabstore in more detail.

tabstore in more detail

wal_steam

A python script that patches Metro for Steam with colors from wal or wpg. I haven't really used it in years and it's barely maintained. Steam doesn't seem to care about breaking theme support and I'm tired of fixing it since I hardly use Steam anymore. Just buy your games on itch, humble, or gog.

Metro for Steam

wal

wpg

itch

humble

gog

[image] wal_steam screenshot