Oh I could of course just have done
vidid=$(grep 'comment=' meta.txt | tr -d '\n' | tail -c 11)
instead… Which would also avoid getting a false video ID from a link in the description. Ask me how I know.
A microblogging experiment. More info to follow.
For my portfolio blog, see sarah.alroe.dk
Friends of the microblog:
Oh I could of course just have done
vidid=$(grep 'comment=' meta.txt | tr -d '\n' | tail -c 11)
instead… Which would also avoid getting a false video ID from a link in the description. Ask me how I know.
I’ve been backing up youtube videos from a select few channels for reasons for quite a while now, though I never got around making them actually easy to watch. It feels very silly to have the files available locally and still stream them from an unreliable service. So I’m gonna give Tube Archivist a try.
I of course don’t want to redownload everything, but in my infinite wisdom, I decided to remove the youtube video IDs from the file names, which is like the one thing you need for importing existing files. But at least I have the original URL saved in the file metadata so, if you’re in the same situation, you could do something similar to this using ffmpeg:
#!/bin/bash
mkdir -p out
# mp4 files are located in channel subdirectories
for file in ./*/*.mp4; do
if [[ -f "$file" ]]; then
#Extract file name
dirname="${file%/*}/"
basename="${file:${#dirname}}"
# Extract file metadata with ffmpeg
ffmpeg -i "$file" -f ffmetadata meta.txt
# grep video id, trim the newline and select the last 11 characters (IDs are always this length)
vidid=$(grep -oP 'watch\?v\\=([A-Za-z0-9_-]{11})' meta.txt | tr -d '\n' | tail -c 11)
rm meta.txt
# Rename into out directory, as ta expects everything flat
mv "$file" "out/${basename%.*}[$vidid].mp4"
fi
done
Do note that this works, but it’s not well written. The video id extraction thing is especially … off. I just don’t get along with regex things outside, well, I don’t get along with anything pattern matching anywhere tbh.
Found a bunch of smaller harddisks in the trash a while back. A recent (enjoyably accessible) L1Techs video on hdd diagnostics and recovery reminded me I should probably see if I could find some place to get them back into service.
https://forum.level1techs.com/t/mechanical-drive-bad-sectors-the-drive-is-not-always-dead-a-primer/255113
My usually disk ripping machine is taking the duty of hdd tester. I have motherboards with enough sata sockets to process everything at once, but I just want it running as a background activity that requires minimal thinking or memory on my end.
I wrote a little python script using the frontmatter package to generate a vs code snippets file from the tags of existing posts, so that I can ctrl + space in the frontmatter to add existing tags. I’m enjoying the whole infrastructure building thing…

The script for anyone curious:
#!/usr/bin/env python3
import os
import frontmatter
import json
tags = set()
for root, dirs, files in os.walk(r"./content/"):
for n in files:
fp = os.path.join(root, n)
with open(fp, "r", errors="ignore") as f:
post = frontmatter.load(f)
if 'tags' in post:
for tag in post['tags']:
if tag:
tags.add(tag)
print(tags)
snippetObj = dict()
for tag in tags:
snippetObj[tag] = {
"scope": "yaml",
"prefix": tag,
"body": "- " + tag
}
with open(".vscode/tags.code-snippets", "w") as f:
f.write(json.dumps(snippetObj, indent=4))
And then "runOn": "folderOpen" in the tasks.json to make it rebuild on opening the editor.
Oh I’m having a bit of fun with this. Added another one for autogenerating shortcode snippets. Currently only clever enough to add a closing tag if the file uses .Inner, but hey, still an improvement to ease of writing.
I added glob matching to manage if different themes are used:
#!/usr/bin/env python3
import os
import glob
import json
snippetObj = dict()
for path in glob.glob(r"./themes/*/layouts/*shortcodes"):
for root, dirs, files in os.walk(path):
for n in files:
fp = os.path.join(root, n)
with open(fp, "r", errors="ignore") as f:
shortcodeName = n.replace(".html", "")
print(shortcodeName)
body = "{\{<"+shortcodeName+" ${1:$TM_SELECTED_TEXT} >}}"
if '.Inner' in f.read():
body = "{\{<"+shortcodeName+" $1 >}}\n${2:$TM_SELECTED_TEXT}\n{\{</"+shortcodeName+" >}}"
snippetObj[shortcodeName] = {
"scope": "markdown",
"prefix": shortcodeName,
"body": body
}
with open(".vscode/shortcodes.code-snippets", "w") as f:
f.write(json.dumps(snippetObj, indent=4))
Oh right… Not executing but correctly rendering a shortcode within a code tag within a shortcode is apparently just not an easy thing. I gave up, if you wanna use the code above, remove the added backspaces within the curly brackets…
About the cleverness of the script, it might be easiest to just have a comment in each shortcode with the snippet body specified…
Rework of the PrideResistor remix of some original design on bluesky I haven’t been able to locate. In postcard dimensions. It’s in svg, so you can just right click and download it.

I bought some microcasette tapes off a French ebay seller for a dictaphone I found in the trash, and a couple of answering machines. The tapes have not been erased. Some of their contents are… Interesting.
Presenting the first one: An olympus XB15 tape.

Attempted auto transcript of the French convo (Seems to be collusion about the blame for a car accident?):
Bonjour, je ne suis pas là pour le moment.
Dites-moi un message et je vous rappellerai extérieurement.
Au revoir.
À ce moment-là, ce qu’on fait, c’est que je veux…
Tu sais, permuter mes roues parce que je pars au sport d’hiver.
Et donc, que tu passes à la maison, on prend l’autre voiture et puis on fait un seul trajet, on va chez Antonio.
Et puis comme ça, je peux changer mes roues.
D’accord.
Écoute, il n’y a pas de problème.
À quelle heure tu veux ?
Eh bien, si tu peux, on va manger chez Antonio.
À ce moment-là, vers 13h30, à 13h, 13h, 13h.
Oui, mais lui, il est très heureux.
Oui, on va dire très heureux.
Oui, le gourbi.
Oui, on peut faire comme ça.
Après, on repart avec la voiture.
Très bien, je crois.
Il n’y a pas de problème.
Alors, je dis 13h, oui.
13h, on se retrouve chez Tonio.
Oui, d’accord, ok.
D’accord.
Mais c’est pas trop mal, Patrick, il y a des coupures.
Oui, je sais, mais je ne sais pas pourquoi.
Oui, oui, je ne sais pas.
Et moi, tu me reçois ou j’ai coupé ?
Non, non, je te reçois à peu près bien.
À peu près bien, moi aussi.
Sinon, je t’expliquerai, j’ai eu quelques emmerdes là, avec mon constat, j’ai eu un accrochage avec la bagnole, et bon, elle est réparée et tout, mais en fait, dans le constat, j’ai oublié de marquer d’où on venait, et qu’on roulait tous les deux sur la même file, ce qui fait qu’aujourd’hui, c’est en litige, et que les autres, ils veulent tout me faire prendre à 100%, en disant que…
que moi, je venais finalement…
Enfin, je lui ai refusé une priorité à droite.
Alors qu’en fait, c’est lui qui m’est rentré dans le cul au moment où moi, je tournais.
Et toi, tu m’as aperçu.
Bah non, mais tu sais, en plus, quand ça arrive comme ça, au pont de… Au pont de Gennevilliers, là, enfin… Pardon, au pont d’Épinay.
Dans la circulation, on se met sur le côté.
Moi, j’ai essayé de faire ça vite fait, mais t’es dans le truc et tout.
Bon, sur le coup, moi, je me suis dit que c’était bon.
Donc après, j’ai contesté à l’assurance et puis les autres, ils m’ont dit oui, mais tel que c’est, ben non, voilà.
Donc, vous essayez de contacter l’hôte et que vous refassiez un constat.
Sauf que l’hôte, évidemment, il n’a pas forcément envie de refaire un constat, même pas du tout.
Donc, je suis un peu dans la merde.
Alors, le seul truc que j’ai trouvé, moi, c’est que là, le mec, je lui ai demandé plusieurs fois au téléphone, donc il m’a dit qu’il allait voir son responsable et tout, mais je sens bien que c’est du pipeau.
Le seul truc, c’est que je voudrais le rappeler au téléphone et puis lui faire dire qu’on roulait bien sur la même file et que j’ai tourné, donc qu’on venait bien de la rue de Paris.
Et il m’enregistrait la conversation téléphonique.
Et en plus, ce que je me dis, normalement, toi, t’es à faire monter.
Oui.
Donc, si t’es avec moi au moment où l’autre, il me dit ça, je peux avoir… Oui, oui.
Mais là, à ce moment-là, oui, le seul problème, c’est que ça va marcher devant le criminal, quoi.
Ah, mais ça, j’en sais rien.
Parce que tu le fais à l’insu de… Oui, mais moi, c’est… Non, non, je vais lui dire.
Après, quoi ?
Mais je vais lui dire.
Ah, non, mais y a pas de problème.
Tu peux compter sur moi…
Il habite à Blanc-Ménil.
À Blanc-Ménil ?
Oui.
Et il ne veut rien savoir ?
Non.
Pour l’instant, il ne me dit pas qu’il ne veut pas.
À chaque fois, il trouve un prétexte pour ne pas…
Faut pas le faire, quoi.
Oui, mais… Non, non, mais lui, à la limite, c’est une entreprise.
Lui, c’est même pas son véhicule.
C’est le véhicule de la boîte.
Donc, en fait, lui, l’autre, là, son responsable…
Maintenant qu’ils ont envoyé le constat et que pour eux ça se passe bien, donc s’ils ne prennent pas de malus ni rien, ils n’ont pas envie de refaire un constat.
Moi, je le comprends, le mec.
On en parlera avec Antonio, peut-être qu’il a une idée aussi.
Non, non, j’en ai parlé à Antonio.
Le seul truc, c’est que moi, je vais l’appeler demain en ta présence, j’enregistre la conversation.
Et puis je vais lui dire que ça a été enregistré en présence d’un agent assermenté.
Je ne vais pas lui dire que tu es agent du parc, je vais lui dire que tu es agent assermenté.
Il se doit de le faire.
Non, moi, ce que je veux, c’est lui faire un peu peur et peut-être qu’il fasse le constat.
Ou du moins… Ou du moins qu’après, moi, j’ai vu avec l’Automobile Club, là, ils sont en train de regarder mon dossier.
Et si je prends un avocat et tout, je vais lui demander s’il veut…
Si je le fais venir en tant que témoin devant le juge, est-ce qu’il va me dire qu’on venait bien tous les deux du même côté ou pas ?
Après, je me dis, si vous venez et vous dites ça, moi, il n’y a pas de problème.
Maintenant, si vous dites autre chose, on va aller devant le tribunal.
C’est tout.
Mais enregistre-le déjà, enregistre-le, d’accord ?
Oui, oui, voilà.
Bon, ok, pour aujourd’hui, 13h.
Quand il y a quelques figures, on se rejette, d’accord ?
Oui, oui, ça marche, ok.
Ok, allez, c’est Patrick, on y va, d’accord ?
Salut, oui, oui.
Salut, merci.
Merci.


Yea something like that. Need a clamp to keep it in place though.