make header format yaml

This commit is contained in:
2026-04-20 11:24:45 +02:00
parent 0bd5b53092
commit fb96f1bd78
179 changed files with 810 additions and 403 deletions

View File

@@ -43,8 +43,7 @@ $(databases): .dbs/%.rec: %/ | .dbs/
for entry in $(shell find $< -type f -name "*.md") ; do \
printf "path: %s\n" "$$entry" ;\
sed -n '2,/^---$$/ {/^---$$/d; p}' "$$entry" |\
tr -d '[]' | tr -s ' ' |\
sed '/tags: /s/, /\ntag: /g ; s/tags:/tag:/ ; /requires/s/, /\nrequires: /g' ;\
while read -r line; do if [ -z "$${line#*:}" ] ; then type="$$line"; else echo "$$line" | sed -r "s/- (.*)/$$type \1/" | sed s'/tags: /tag: /' ; fi ; done ;\
printf "wordcount: %s\n\n" "$$(wc -w < $$entry)" ;\
done > $@
@@ -105,8 +104,8 @@ article: **/ **/**/ ## Write a new article
[ -d "$(@D)" ] || mkdir $(@D)
printf '%s\n' '---' >> $@
printf 'title: %s\n' '$(TITLE)' >> $@
tags="$$(echo $(@D) | sed 's#/$$#"# ; s#/#", "#g ; s#^#"#' )" \
&& printf 'tags [ %s ]\n' "$$tags" >> $@
echo "tags: " >> $@
echo $(@D) | sed 's#\/#\n- #g' >> $@
printf '%s\n\n' '---' >> $@
$(EDITOR) +5 $@
git add $@

View File

@@ -1,5 +1,5 @@
---
title: "Linux Knowledge Base"
title: Linux Knowledge Base
---
The Linux Knowledge-Base provides quick-start guides for working with terminal programs.

View File

@@ -1,6 +1,8 @@
---
title: "profanity"
tags: [ "chat", "omemo" ]
title: profanity
tags:
- chat
- omemo
---
# Setup (Commands)

View File

@@ -1,7 +1,10 @@
---
title: "profanity automation"
tags: [ "chat", "omemo" ]
requires: [ "profanity" ]
title: profanity automation
tags:
- chat
- omemo
requires:
- profanity
---
Automate profanity with `--cmd`.

View File

@@ -1,6 +1,7 @@
---
title: "wgetpaste"
tags: [ "chat" ]
title: wgetpaste
tags:
- chat
---
See available pastebins:

7
cmd.mk
View File

@@ -7,9 +7,7 @@ default += $(lists)
get_title = printf 'title: "%s"\n' '${1}'
get_tags = recsel -t $(basename $<) $< -G bin \
-e 'bin = "$(1)"' -U -CP tag | \
sed 's/.*/"&",/g' | \
tr '\n' ' ' | \
sed 's/.*/tags: [ &]/'
sed 's/.*/- &/'
list_commands = recsel -t $(basename $<) $< -e 'bin = "$(1)"' | \
recfmt -f lists.fmt
@@ -17,8 +15,9 @@ list_commands = recsel -t $(basename $<) $< -e 'bin = "$(1)"' | \
lists/%.md: command.rec | lists/
@printf '%s\n' '---' > $@
@$(call get_title,$(basename $(notdir $@))) >> $@
@printf '%s\n' 'tags: ' >> $@
@$(call get_tags,$(basename $(notdir $@))) >> $@
@printf '\n%s\n' '---' >> $@
@printf '%s\n' '---' >> $@
@$(call list_commands,$(basename $(notdir $@))) >> $@
.PHONY: cmd

View File

@@ -1,6 +1,8 @@
---
title: "Archives"
tags: [ "archives", "backups" ]
title: Archives
tags:
- archives
- backups
---
# Create

View File

@@ -1,6 +1,7 @@
---
title: "Base 16"
tags: [ "data" ]
title: Base 16
tags:
- data
---
Base 16 numbers often use `0x` at the start, so '10' just means '10', but `0x10` means '10 in base 16' which means '16'.

View File

@@ -1,6 +1,9 @@
---
title: "calcurse"
tags: [ "data", "calendar", "daylight savings" ]
title: calcurse
tags:
- data
- calendar
- daylight savings
---
## Setup

View File

@@ -1,6 +1,8 @@
---
title: "e-mail"
tags: [ "data", "smtp" ]
title: e-mail
tags:
- data
- smtp
---
This is bare-bones, original, primitive e-mail.

View File

@@ -1,6 +1,8 @@
---
title: "exiftool"
tags: [ "metadata", "exifdata" ]
title: exiftool
tags:
- metadata
- exifdata
---
Find metadata:

View File

@@ -1,6 +1,8 @@
---
title: "git"
tags: [ "data", "setup" ]
title: git
tags:
- data
- setup
---

View File

@@ -1,7 +1,10 @@
---
title: "Clean up a bloated git repo"
tags: [ "data", "setup" ]
requires: [ "git" ]
title: Clean up a bloated git repo
tags:
- data
- setup
requires:
- git
---

View File

@@ -1,7 +1,10 @@
---
title: "Commit for Another"
tags: [ "data", "git" ]
requires: [ "git" ]
title: Commit for Another
tags:
- data
- git
requires:
- git
---
You can make Alice the author, while you are still the commiter:

View File

@@ -1,7 +1,10 @@
---
title: "git-lfs"
tags: [ "data", "git" ]
requires: [ "git" ]
title: git-lfs
tags:
- data
- git
requires:
- git
---
Git Large File Storage ('LFS') needs to change your `~/.gitconfig` to check out those binary files:

View File

@@ -1,6 +1,9 @@
---
title: "git-secret"
tags: [ "data", "git", "review" ]
title: git-secret
tags:
- data
- git
- review
---
This utility is largely useless, as it can only identify people by their email.

View File

@@ -1,7 +1,10 @@
---
title: "git stash"
tags: [ "data", "git" ]
requires: [ "git" ]
title: git stash
tags:
- data
- git
requires:
- git
---
Save file-changes without committing anything.

View File

@@ -1,6 +1,8 @@
---
title: "git hooks"
tags: [ "data", "git" ]
title: git hooks
tags:
- data
- git
---
Check out the sample hooks:

View File

@@ -1,6 +1,8 @@
---
title: "GPG Basics"
tags: [ "data", "GPG" ]
title: GPG Basics
tags:
- data
- GPG
---
# Making keys

View File

@@ -1,7 +1,12 @@
---
title: "GPG Password Entry"
tags: [ "vim", "secrets", "TUI" ]
requires: [ "gpg", "vim" ]
title: GPG Password Entry
tags:
- vim
- secrets
- TUI
requires:
- gpg
- vim
---

View File

@@ -1,7 +1,13 @@
---
title: "Edit gpg encrypted files easily"
tags: [ "vim", "data", "gpg" ]
requires: [ "gpg", "vim", "comfy" ]
title: Edit gpg encrypted files easily
tags:
- vim
- data
- gpg
requires:
- gpg
- vim
- comfy
---
The `vim-gnupg` plug-in lets vim edit gpg-encrypted files as if they were unencrypted.

View File

@@ -1,6 +1,8 @@
---
title: "groff"
tags: [ "data", "logic" ]
title: groff
tags:
- data
- logic
---
# Basic Documents

View File

@@ -1,6 +1,11 @@
---
title: "Interactive String Substitution"
tags: [ "data", "vim", "substitution", "replace", "TUI" ]
title: Interactive String Substitution
tags:
- data
- vim
- substitution
- replace
- TUI
---
Want to find and replace, but also confirm each instance?

View File

@@ -1,6 +1,9 @@
---
title: "ijq"
tags: [ "data", "json", "TUI" ]
title: ijq
tags:
- data
- json
- TUI
---
Analyse `json` easier with `ijq`.

View File

@@ -1,6 +1,7 @@
---
title: "khard"
tags: [ "data" ]
title: khard
tags:
- data
---
Get the basic config:

View File

@@ -1,6 +1,7 @@
---
title: "newsboat"
tags: [ "RSS" ]
title: newsboat
tags:
- RSS
---
Create the configuration directory before you start, and add at least 1 URL.

View File

@@ -1,6 +1,8 @@
---
title: "Newsraft"
tags: [ "data", "RSS" ]
title: Newsraft
tags:
- data
- RSS
---
# Setup

View File

@@ -1,7 +1,11 @@
---
title: "pass"
tags: [ "data", "credentials", "secrets" ]
requires: [ "gpg" ]
title: pass
tags:
- data
- credentials
- secrets
requires:
- gpg
---
Setup [gpg](gpg.md) keys.

View File

@@ -1,7 +1,13 @@
---
title: "pass with otp"
tags: [ "data", "credentials", "secrets", "2fa", "otp" ]
requires: [ "pass" ]
title: pass with otp
tags:
- data
- credentials
- secrets
- 2fa
- otp
requires:
- pass
---
Need a Microsoft or Google authenticator?

View File

@@ -1,6 +1,9 @@
---
title: "pdf to txt"
tags: [ "data", "pdf", "ocr" ]
title: pdf to txt
tags:
- data
- pdf
- ocr
---
How to translate pdfs to text (results are very poor, and will need lots of corrections).

View File

@@ -1,6 +1,10 @@
---
title: "PDF Metadata Erasure"
tags: [ "metadata", "ghost script", "gs", ".pdf" ]
title: PDF Metadata Erasure
tags:
- metadata
- ghost script
- gs
- .pdf
---
You cannot erase pdf metadata with `exiftool` (it only *appends* your changes).

View File

@@ -1,7 +1,11 @@
---
title: "radicale and nginx"
tags: [ "data", "calendar" ]
requires: [ "nginx", "certbot" ]
title: radicale and nginx
tags:
- data
- calendar
requires:
- nginx
- certbot
---
Check before you start:

View File

@@ -1,6 +1,8 @@
---
title: "Recfiles"
tags: [ "data", "database" ]
title: Recfiles
tags:
- data
- database
---
Create:

View File

@@ -1,7 +1,14 @@
---
title: "Recfile Bibliography for TeX"
tags: [ "data", "database", "recfiles", "tex" ]
requires: [ "recfiles", "tex", "makefiles" ]
title: Recfile Bibliography for TeX
tags:
- data
- database
- recfiles
- tex
requires:
- recfiles
- tex
- makefiles
---
Store your bibliography in a `recfile` database, then extract any part with `make`.

View File

@@ -1,7 +1,11 @@
---
title: "Board Games with Recfiles"
tags: [ "data", "recfiles", "games" ]
requires: [ "recfiles" ]
title: Board Games with Recfiles
tags:
- data
- recfiles
- games
requires:
- recfiles
---
You can play with a board games database from boardgamegeek.com.

View File

@@ -1,7 +1,11 @@
---
title: "Recfiles Extended Example"
tags: [ "data", "database", "recfiles" ]
requires: [ "recfiles" ]
title: Recfiles Extended Example
tags:
- data
- database
- recfiles
requires:
- recfiles
---
## Create

View File

@@ -1,7 +1,10 @@
---
title: "IP Addresses with Recfiles"
tags: [ "data", "recfiles", "games" ]
requires: "recfiles"
title: IP Addresses with Recfiles
tags:
- data
- recfiles
- games
requires: recfiles
---
## Download the Database

View File

@@ -1,7 +1,12 @@
---
title: "nginx logs with recfiles"
tags: [ "data", "recfiles", "logs" ]
requires: [ "recfiles", "nginx" ]
title: nginx logs with recfiles
tags:
- data
- recfiles
- logs
requires:
- recfiles
- nginx
---
The standard `nginx` log format has such a lack of consistency or meaning that you might squint your face into a whirlpool making sense of them:

View File

@@ -1,7 +1,10 @@
---
title: "Recfixes"
tags: [ "data", "recfiles" ]
requires: [ "recfiles" ]
title: Recfixes
tags:
- data
- recfiles
requires:
- recfiles
---
Sometimes `recsel` chokes on a large query, and you need to break the query into chunks with a pipe.

View File

@@ -1,7 +1,12 @@
---
title: "sc-im"
tags: [ "TUI", "data", "spreadsheet", "csv" ]
requires: [ "vim" ]
title: sc-im
tags:
- TUI
- data
- spreadsheet
- csv
requires:
- vim
---
- [Sample file](sc-im/sample.sc)

View File

@@ -1,6 +1,8 @@
---
title: "Convert Spreadsheets"
tags: [ "data", "sc-im" ]
title: Convert Spreadsheets
tags:
- data
- sc-im
---
Convert between spreadsheet formats with `sc-im`.

View File

@@ -1,7 +1,11 @@
---
title: "Search System"
tags: [ "data", "search", "locate", "plocate" ]
requires: "cron"
title: Search System
tags:
- data
- search
- locate
- plocate
requires: cron
---
You can search every file on the computer instantly by installing `plocate`.

View File

@@ -1,6 +1,8 @@
---
title: "Search Video Audio"
tags: [ "data", "video" ]
title: Search Video Audio
tags:
- data
- video
---
Check subtitles available:

View File

@@ -1,6 +1,9 @@
---
title: "Sharing Secrets"
tags: [ "data", "death", "secrets" ]
title: Sharing Secrets
tags:
- data
- death
- secrets
---
You can share parts of a secret with multiple people, so only some of them need to agree to see the secret.

View File

@@ -1,7 +1,13 @@
---
title: "Soft-Serve"
tags: [ "data", "git server", "lfs", "TUI" ]
requires: [ "git", "nginx" ]
title: Soft-Serve
tags:
- data
- git server
- lfs
- TUI
requires:
- git
- nginx
---
- [Soft-Serve with https](soft-serve/soft_https.md)

View File

@@ -1,7 +1,12 @@
---
title: "Soft Serve through https"
tags: [ "data", "git server", "lfs" ]
requires: [ "git", "nginx" ]
title: Soft Serve through https
tags:
- data
- git server
- lfs
requires:
- git
- nginx
---
## `http` Setup

View File

@@ -1,7 +1,12 @@
---
title: "Soft Serve Maintenance"
tags: [ "data", "git server", "maintenance" ]
requires: [ "git", "nginx" ]
title: Soft Serve Maintenance
tags:
- data
- git server
- maintenance
requires:
- git
- nginx
---
Over time git repositories become bloated with old data, but never get cleaned.

View File

@@ -1,6 +1,7 @@
---
title: "sqlite"
tags: [ "data" ]
title: sqlite
tags:
- data
---
Work with a database:

View File

@@ -1,7 +1,10 @@
---
title: "unison"
tags: [ "backups", "synch" ]
requires: [ "ssh" ]
title: unison
tags:
- backups
- synch
requires:
- ssh
---
Install unison on both machines, and make sure both have the same version of unison, with the same version of the ocaml compiler (the smallest difference will cause problems).

View File

@@ -1,6 +1,9 @@
---
title: "View Torrents"
tags: [ "data", "transmission", "torrenting" ]
title: View Torrents
tags:
- data
- transmission
- torrenting
---

View File

@@ -1,6 +1,7 @@
---
title: "w3m"
tags: [ "browser" ]
title: w3m
tags:
- browser
---
Open a search tab:

View File

@@ -1,6 +1,9 @@
---
title: "ssh to phone"
tags: [ "networking", "ssh", "android" ]
title: ssh to phone
tags:
- networking
- ssh
- android
---
1. Install fdroid on phone.

View File

@@ -1,6 +1,9 @@
---
title: "Arch on a Raspberry Pi 4"
tags: [ "distros", "raspberry pi", "rpi" ]
title: Arch on a Raspberry Pi 4
tags:
- distros
- raspberry pi
- rpi
---
The [Official Instructions](https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4) for a Raspberry pi 4 do not allow for working sound from the headphone jack, unless you use the aarch64 Installation.

View File

@@ -1,6 +1,8 @@
---
title: "autologin"
tags: [ "distros", "arch" ]
title: autologin
tags:
- distros
- arch
---
# Automatic Login

View File

@@ -1,7 +1,9 @@
---
title: "Install Arch"
tags: [ "arch" ]
requires: [ "partitions" ]
title: Install Arch
tags:
- arch
requires:
- partitions
---
Keyboard layout changed.

View File

@@ -1,6 +1,7 @@
---
title: "fonts"
tags: [ "distros" ]
title: fonts
tags:
- distros
---
# Basics

View File

@@ -1,6 +1,8 @@
---
title: "Ach Linux GPU Setup"
tags: [ "arch", "GPU" ]
title: Ach Linux GPU Setup
tags:
- arch
- GPU
---
# Step 1: Multilib

View File

@@ -1,6 +1,8 @@
---
title: "Install yay"
tags: [ "distros", "arch" ]
title: Install yay
tags:
- distros
- arch
requirements: [ "pacman" ]
---

View File

@@ -1,6 +1,7 @@
---
title: "Arch Maintenance"
tags: [ "arch" ]
title: Arch Maintenance
tags:
- arch
requirements: [ "pacman" ]
---

View File

@@ -1,6 +1,7 @@
---
title: "pacman"
tags: [ "distros" ]
title: pacman
tags:
- distros
requirements: [ "Install Arch" ]
---

View File

@@ -1,6 +1,7 @@
---
title: "pacman - Extras"
tags: [ "distros" ]
title: pacman - Extras
tags:
- distros
requirements: [ "pacman" ]
---

View File

@@ -1,6 +1,7 @@
---
title: "Arch Maintenance with yay"
tags: [ "arch" ]
title: Arch Maintenance with yay
tags:
- arch
requirements: [ "Arch Maintenance" ]
---

View File

@@ -1,6 +1,7 @@
---
title: "apt troubleshooting"
tags: [ "debian" ]
title: apt troubleshooting
tags:
- debian
---
Messed up a package's configuration files?

View File

@@ -1,6 +1,7 @@
---
title: "Aeroplane Mode in Void"
tags: [ "void" ]
title: Aeroplane Mode in Void
tags:
- void
---
Put your device in 'aeroplane' mode (e.g. where no trace of signal leaves it) by turning off Wi-Fi and blue-tooth.

View File

@@ -1,6 +1,7 @@
---
title: "Void Autologin"
tags: [ "void" ]
title: Void Autologin
tags:
- void
---
Make the autologin service:

View File

@@ -1,6 +1,7 @@
---
title: "Brand Name Wallpaper"
tags: [ "void" ]
title: Brand Name Wallpaper
tags:
- void
---
To automatically stick the logo onto your background, do these commands in the directory.

View File

@@ -1,6 +1,7 @@
---
title: "extrace"
tags: [ "void" ]
title: extrace
tags:
- void
---
Monitor all processes:

View File

@@ -1,6 +1,8 @@
---
title: "jenkins"
tags: [ "void", "build" ]
title: jenkins
tags:
- void
- build
---
# Jenkins on Void

View File

@@ -1,6 +1,8 @@
---
title: "Laptops with Void Linux"
tags: [ "void", "laptop" ]
title: Laptops with Void Linux
tags:
- void
- laptop
---
Install and enable `tlp`.

View File

@@ -1,6 +1,8 @@
---
title: "Void locale"
tags: [ "void", "locale" ]
title: Void locale
tags:
- void
- locale
---
Check the current locales:

View File

@@ -1,6 +1,7 @@
---
title: "sv"
tags: [ "void" ]
title: sv
tags:
- void
---
# List Services

View File

@@ -1,6 +1,7 @@
---
title: "Void Linux Basics"
tags: [ "void" ]
title: Void Linux Basics
tags:
- void
---
# Updates

View File

@@ -1,6 +1,7 @@
---
title: "xbps"
tags: [ "void" ]
title: xbps
tags:
- void
---
## Search

View File

@@ -1,6 +1,8 @@
---
title: "brightness"
tags: [ "hardware", "laptop" ]
title: brightness
tags:
- hardware
- laptop
---
# Brightness

View File

@@ -1,6 +1,8 @@
---
title: "keyboard"
tags: [ "keyboard", "vim" ]
title: keyboard
tags:
- keyboard
- vim
---
# System-Wide Capslock and Escape Swap

View File

@@ -1,6 +1,7 @@
---
title: "monitor"
tags: [ "hardware" ]
title: monitor
tags:
- hardware
---
See screen size

View File

@@ -1,6 +1,7 @@
---
title: "printers"
tags: [ "hardware" ]
title: printers
tags:
- hardware
---
# Cups: The Common Unix Printing System

View File

@@ -1,6 +1,9 @@
---
title: "Agate on Arch Linux"
tags: [ "networking", "arch", "gemini" ]
title: Agate on Arch Linux
tags:
- networking
- arch
- gemini
---
Docs are [here](https://github.com/mbrubeck/agate).

View File

@@ -1,6 +1,9 @@
---
title: "Mapping the Net"
tags: [ "networking", "graph", "fun" ]
title: Mapping the Net
tags:
- networking
- graph
- fun
---
Find the path to a domain:

View File

@@ -1,6 +1,8 @@
---
title: "dns"
tags: [ "networking", "host" ]
title: dns
tags:
- networking
- host
---
| Record | Type | Example |

View File

@@ -1,7 +1,9 @@
---
title: "fail2ban"
tags: [ "networking" ]
requires: [ "ssh" ]
title: fail2ban
tags:
- networking
requires:
- ssh
---
# SSH Daemon Jail

View File

@@ -1,6 +1,7 @@
---
title: "iptables"
tags: [ "networking" ]
title: iptables
tags:
- networking
---
# Intro

View File

@@ -1,6 +1,8 @@
---
title: "nginx"
tags: [ "networking", "web" ]
title: nginx
tags:
- networking
- web
---
Install nginx:

View File

@@ -1,6 +1,7 @@
---
title: "nmap"
tags: [ "networking" ]
title: nmap
tags:
- networking
---
Example:

View File

@@ -1,6 +1,7 @@
---
title: "pi-hole-server"
tags: [ "distros" ]
title: pi-hole-server
tags:
- distros
---
# Installation

View File

@@ -1,6 +1,7 @@
---
title: "Port Scan"
tags: [ "networking" ]
title: Port Scan
tags:
- networking
repo: 'https://github.com/mrjackwills/havn/'
---

View File

@@ -1,6 +1,8 @@
---
title: "rclone"
tags: [ "networking", "synch" ]
title: rclone
tags:
- networking
- synch
---
The manpage's 'Synopsis' provides a fast reference.
```

View File

@@ -1,6 +1,8 @@
---
title: "Download Website"
tags: [ "networking", "scraping" ]
title: Download Website
tags:
- networking
- scraping
---
```sh

View File

@@ -1,6 +1,7 @@
---
title: "Download videos"
tags: [ "scraping" ]
title: Download videos
tags:
- scraping
---
Install `yt-dlp`.

View File

@@ -1,6 +1,7 @@
---
title: "ssh"
tags: [ "networking" ]
title: ssh
tags:
- networking
---
# Basic `ssh`

View File

@@ -1,7 +1,9 @@
---
title: "sshfs"
tags: [ "networking" ]
requires: [ "ssh" ]
title: sshfs
tags:
- networking
requires:
- ssh
---
# Mount

View File

@@ -1,7 +1,11 @@
---
title: "ssh-tricks"
tags: [ "networking", "ssh", "tricks" ]
requires: [ "ssh" ]
title: ssh-tricks
tags:
- networking
- ssh
- tricks
requires:
- ssh
---
Mount a remote filesystem locally with fuse-sshfs:

View File

@@ -1,6 +1,7 @@
---
title: "tor"
tags: [ "networking" ]
title: tor
tags:
- networking
---
# Get a Hostname

View File

@@ -1,6 +1,8 @@
---
title: "transmission"
tags: [ "networking", "torrenting" ]
title: transmission
tags:
- networking
- torrenting
---
Search for a torrent, e.g. 'sita sings the blues'.

View File

@@ -1,6 +1,7 @@
---
title: "network"
tags: [ "networking" ]
title: network
tags:
- networking
---
# Netstat Stuff

View File

@@ -1,6 +1,8 @@
---
title: "wireguard"
tags: [ "networking", "VPN" ]
title: wireguard
tags:
- networking
- VPN
---
<!--
from

View File

@@ -1,6 +1,7 @@
---
title: "wireless"
tags: [ "networking" ]
title: wireless
tags:
- networking
---
Check wifi's working

View File

@@ -1,6 +1,7 @@
---
title: "wpa_supplicant"
tags: [ "networking" ]
title: wpa_supplicant
tags:
- networking
---
`wpa_supplicant` configurations are stored in `/etc/wpa_supplicant/wpa_supplicant-wlan0` (or equivalent).

View File

@@ -1,6 +1,7 @@
---
title: "conditionals"
tags: [ "basics" ]
title: conditionals
tags:
- basics
---
# If statements

View File

@@ -1,6 +1,7 @@
---
title: "eval"
tags: [ "basics" ]
title: eval
tags:
- basics
---
Compose a statement for execution.

Some files were not shown because too many files have changed in this diff Show More