Wed, 27 Apr 2025 08:14:28 UTC
i am currently writing this blog post and saving it to an sd card. if all goes well i will put the sd card with the finished blog post into an sd card reader connected to my server and it will take care of the rest of publishing the post automatically.
did you know you cant invoke ssh from udev rules? me neither. theres probably a way but i was sick of trying to find it. the original plan for this whole thing was to use the sd card reader on the computer currently serving as my octoprint host. its very easily accessible, as opposed to my server which is tucked in a corner. its not the *most* out of the way, its right next to my desk, but my desk is also tucked in the corner. suboptimal but itll do. the sd card reader is on a usb extension so i dont have to reach around the server or anything.
i have a udev rule set up that triggers whenever a card is inserted and its filesystem uuid matches this sd card. in hindsight it would have been a bit smarter to match the filesystem label but eh, ill do it later. or never. probably whenever this card dies, lest that day come. the udev rule runs a simple script that mounts the card, copies all files from its autoupload folder to my ssg-input folder, moves the files on the card to a folder called uploaded, unmounts the card, and runs my static site generator script [ref 1].
small little projects like this are why i advocate for learning how your computer does things and how to make it do work for you. its a computer, it should be made to compute.