Denote Drafts action ๐
The other half of the “get more mobile with Denote and Emacs” conundrum — outside the stuff where you can read notes — is the capture part: Being able to get things into the system when you’re out and about and maybe don’t have a laptop along.
The glue for everything I’m doing to address the mobile stuff is Syncthing, with all the nodes connected via TailScale. On my iOS devices, I use Mobius Sync as my Syncthing client. Since I’ve got Syncthing running on a Synology, that provides me with a central node to compensate for mobile or seldom-used desktop devices coming in and out on the TailScale network as they sleep and wake up.
To make my Denote setup more mobile, I’ve got SyncThing updating my published notes folder more frequently than the default, and I’ve got a save hook for my Denote directory that both publishes my Denote notes as HTML and runs the note indexer script that FusionJS depends on to make search fast. Since org publishing is incremental, there’s not a big hit when I save a Denote file: It recreates the notes index and runs the Python script, which takes about a twentieth of a second to complete at this point because all it cares about is the filename and the tags (which are built into the filename.)
Over time, as my notes scale, that script might take longer, and that’s fine: It is also running on the Synology where performance isn’t as big of a deal. Running the indexer on the client nodes just means when SyncThing kicks in it is shipping an updated index along with the new files to the Synology.
Anyhow, that’s the background infra stuff.
To handle the other part, capture, I turned to Drafts. It needed a little bit of Javascript to create a few variables for the output template, and it can write out to on-device storage, so it was trivial to create a Drafts action that takes this:
Some note about agriculture
fruits vegetables
I am going to write today about fruits and vegetables and how important they are to our way of life.
… and turns it into a file called 20230612T121326--some-note-about-agriculture__fruits_vegetables.org
with the content
#+title: Some note about agriculture
#+date: [2023-06-12 Mon 12:13]
#+filetags: :fruits:vegetables:
#+identifier: 20230612T121326
I am going to write today about fruits and vegetables and how important they are to our way of life.
… and then deposits it into the on-device storage path for Mobius Sync and ingestion into the Syncthing network.
The use case for something like this is pretty small: I’d like to be able to make Denote notes on a phone or iPad when I’m not near a laptop or desktop machine, and it was easier to automate that up front even if Denote’s naming and formatting convention is pretty simple. Following the “convention over configuration” mindset of Denote, the top level of my notes hierarchy is empty, so it becomes the de facto inbox for when I’m back in front of a “real computer” for triaging incoming notes captured while mobile – moving them into the right folders, updating metadata, etc.
The action writes to a Drafts “bookmark,” so you can use whatever storage back end you like: If you keep your Denote notes in Dropbox, Box, Google Drive or whatever, the action will prompt you the first time you use it (on Mac or iOS/iPadOS) and you can choose the right thing for you. I suppose for Git people something like Working Copy will probably also work.
Anyhow, seems to be a fine v1.
And I guess, going wide for a few seconds, another comment on what I like about Denote generally: It’s a good convention! As I was working on the search stuff over lunch, I realized that the Python script that creates the index.json
file that Fuse.js has to consume was using file creation times to record the date of a given note in the index. That’d be fine if those notes were never regenerated, but they are. But whatever! The Denote naming convention embeds the date in the filename. So I just parse that to create the date entry for each file in the index.
If all my plaintext notes were saved with that naming convention for all eternity, it wouldn’t be the worst thing. If the space goat comes and eats Emacs, the convention-over-configuration approach means that if you understand regular expressions and any commodity scripting language, you can pipe your stuff through pandoc and be on your way in a new tool. It’s not much more complex a lift than, say, switching from Jekyll to Hugo. If you’re willing to use a tool you have to use lisp to configure, this isn’t a big thing.
The one “looking over my shoulder” question I have is around markup and future-proofing. There’s a case to be made for using Denote with its Markdown-and-YAML format and not its org-mode format. That would provide close to perfect portability into something like Obsidian without needing to run anything through pandoc first. There’s an argument to be made that parsing that format is easier, too, because YAML is a thing and “org mode file variables” are kind of not.
Eh. Whatevs.
I might need to write a script. Please don’t throw me in the briar patch.
A bit more on the Leica Q3 and the Fujifilm roadmap ๐
I loaned my Leica Q2 out, which prompted some comments from the lendee, which made me think about the Q3 in clearer terms. It sounds like actual general availability will be quite delayed, and I’m in no hurry to buy new gear anyhow, but I think I’m more curious about what’s next for Fujifilm’s X100 lineup and the eventual X100 – VI? 6? Whatever it is.
I’d love to see IBIS and I’d love for it to have the X-T5’s sensor. It feels like a faster lens is probably too much to hope for: The size difference between Fujifilm’s two faster 23mm lenses — the original XF23/1.4 and the WR remake — and the lenses you find in the X100 series and the XF23/2 WR is pretty drastic. I think an f1.8 or 1.4 would bulk the X100 up considerably.
I’m also curious about whether there’s any life left in the X-Pro series. I thought the “no chimping” design of the X-Pro 3 was a gimmick, and I am not sure what the real audience even is for an optical viewfinder. I read someone recently who put the X-Pro OVF in the context of early mirrorless technology, pointing out that it helped people get around the performance problems with early EVFs. Personally, I feel an aesthetic connection with it but prefer to just shoot with the EVF. The one exception to that is when I’m out with my little Funleader fixed-focus pancake: I use the EVF now and then to spot-check exposure, but it’s fun shooting super lo-fi with a toy lens and an OVF.
It feels to me like the X100 line could be coming close to rounding out a phase: Get IBIS squeezed in there, break the f2 barrier on the lens, and what else do you do besides iterate on the sensor as it makes sense to do so, selling it as a travel/street compact all-rounder? They added WR last go-round. There’s not much left to do if it is to stay a fixed-lens kinda-rangefinder. If they killed the OVF to make room for IBIS, and bulked it up a little for a faster lense, I think I’d take that deal. It’d just be an APS-C Leica Q-series at that point.
Fright Night (2011) ๐
We watched the 2011 Fright Night remake last night after a weekend conversation about vampire movies. I wouldn’t call it a paragon of the form, but by the time we were able to settle down for a movie it was a little late and we wanted something fizzy. I … didn’t remember Colin Farrell having so much fun the first time I saw it, which must have been in the theater or not long after its run. But he does have fun. And it left us wanting to go back to the ‘85 original, because the remake raised a few questions we couldn’t answer. It was nice of them to let Chris Sarandon turn up long enough to get eaten.
That conversation also has me wanting to do a few more pairs/trios. Like, Murnau’s Nosferatu along with Shadow of the Vampire, but also Cabinet of Dr. Caligari to get a good dose of German Expressionism.
Old man coos at cloud ๐
Possibly lost in the Denote shuffle because I’m using them and they seem to just work:
Syncthing, NextDNS, and TailScale are really doing it for me.
There’s the occasional glitch with Syncthing, but nothing too bad and probably because I have some things writing to the sync folders a little too often. But it works really well for how I’m using it:
- Syncing org files
- Syncing the HTML output of org publishing to the Synology
- Syncing back end for Mackup (configuration syncing)
- Syncing back end for my Doom Emacs configuration
- Syncing
~/bin
I haven’t been using it quite long enough to rule on whether it’s as good as Dropbox, but it’s not nearly as needy as Dropbox, and it works great over …
TailScale. I came this close to setting up a VPN on my Synology when I remembered that I meant to look into TailScale. I went in expecting I’d bounce off something about it, and didn’t expect to be able to connect iOS/iPadOS devices to it, but it’s almost magical in its just-works-ness. I’ve got a few things on Heroku I could probably pull back to the Synology at this point.
Another bonus is that I can use my NextDNS account with it, which spares me conflicting profiles on my Apple devices and hence removes the need to keep separate ad blockers going on anything: I’m subscribed to a few filters on NextDNS and it is more than adequate.
I need to take one last pass at making sure I don’t have something syncing its config on Dropbox, and get all my Dropbox stuff out, but I think that’s one more account I can kill thanks to Syncthing and TailScale.
I’m remembering back to when my world was NFS mounts and DynDNS, and this is all so much better.