Add syntax for random digits and letters to the Zettelkasten prefixer

I would prefer to use truly meaningless and broadly compatible UUIDs instead of datetime stamps for my Zettelkasten notes. This would possible if there were syntax for specifying random characters. For UUIDs, I need to specify a random hexadecimal digit. But there’s no reason a more comprehensive set of options couldn’t be added:

  • Random digits in bases 2, 8, 10, 12 (you’ll make the Dozenal Society very happy), 16, and 64.
  • Random upper and/or lowercase letters.
  • Random dictionary words in lowercase, uppercase, and titlecase.

Obviously, the more options that are added, the closer you get to pattern specification with straight up regexes. So maybe that also can be an option, albeit tucked behind a switch for advanced users.

Random can’t exclude the possibility of a clash in the way date/time does.

No it can’t, but I’m not suggesting that the syntax for dates be removed. Just that syntax for random digits and characters be added as options. Then, people who want to use datetimes can use them, and people like me who want to use UUIDs can use them too.

In fact, UUID v1 embeds a datetime in the ID, so its possible to have both datetime stamps to guarantee no internal collisions and still have a UUID that many other applications can use. Although to support it, a syntax would have to be added to specifically ask for the current datetime as “the number of 100-nanosecond intervals since midnight 15 October 1582 Coordinated Universal Time (UTC)”.

  1. Before UUID is issued, program can check if such filename already exists in vault, just like Obsidian does when creating or renaming filename manually. In case of collision, it can issue another one.

  2. If human readable title is already given at time of issue, then some smart algorithm for UUID could take it into account so that it is mnemonic, easy to remember/associate UUID with title. E.g. like vocabulary for Lojban (artificial logical language) was made.