I keep a personal wiki to track various aspects of my life. I keep my todo list, my calendar, my notes, and various tables of information in my wiki. As two examples of "various tables of information", I track my runs (distance, duration, etc.) and interesting links I read in my wiki.

My table of interesting links poses a problem. I do most of my web reading on my phone, but I have no way to edit my wiki from my phone (it is simply a collection of markdown files in a git repo). This is a solvable problem: I could make it possible to edit my wiki on-the-go. But, that would be the wrong problem to solve. I want to (quickly) capture a piece of information while not at my computer for later processing while at my computer.

I have long solved this problem with a simple web service. A small amount of code gets me a web server (running on my VPN) that receives links and adds them to my wiki. I have run this service successfully for a year. I have a shortcut on my phone for sharing the web page I'm currently reading with that service via an HTTP POST.

And yet. Something was nagging at me. A little voice was telling me that I could simplify my setup just a little bit and deploy one fewer service.

This week, I replaced that web service with a script that I run over SSH. I set up a limited container that I can SSH to from my phone. That container has a SQLite database and a collection of scripts that receive a JSON object via stdin and insert rows into the database. Apple shortcuts has an action for "Run script over SSH". My interface to this system is unchanged: I still share links from my browser and they get automatically saved. The only thing that has changed is the mechanism.

How do entries get from that database into my wiki? The old web service I used to run had a checkout of my wiki that it could edit and push a commit to. I vaguely did not like this because I would occasionally forget to git pull before making an edit on my computer, and I would end up having to rebase my edit onto the servers edit, which was easy enough, but annoying when it happened. In the new system, I wrote a small Vim function that pulls down all rows in the database, clears the database, and inserts the rows at my cursor in Markdown table format. Now, I'm in charge of when links (and other entries) get imported into my wiki, but it's just about as easy to do as when it happened automatically.

I'm not sure I have a point here beyond this: a script suited my purposes just as well. Running one fewer service is nice and accomplishes the same thing.