Best way to create persistent document and/or paragraph identifiers

I’m dealing with a writing project where I need to reconcile / merge / select between various similar versions of the same material.

I just found an old x-scrivener-item:// link that no longer works because presumably the id has been changed either through deletion or merging the document with another.

I had been using those links to maintain a list of documents to review and revise but that doesn’t seem to be sustainable in the longer term (and it’s Mac only if I’m not mistaken).

I’m wondering what would be the best way to create a unique and persistent identifier for every document, that ideally would allow it to be located on Mac or iOS. Every paragraph would be helpful too but I realise that might be more involved. I’m open to using Scrivener metadata, or embedding it in the text. I could write an automated Alfred snippet that would increment a unique ID each time I pasted it, but that would still require pasting it in every document.

Any suggestions? AppleScript would be great here but I realise Scrivener’s AppleScript dreams were shattered long ago.

You might find it worth looking at the Zettelkasten website (if you haven’t already seen it): http://www.zettelkasten.de. There is a LOT of discussion about keeping track of research material there.

But cutting to the essential, a method I took from that site is simply using a string which is the creation date of the file / document – it would look like 20190123100118. The chances of two docs having the same creation date is small unless they are created by the machine itself only milliseconds apart. The ID can be at the head or foot of the document, or even in the meta data, according to taste. I have Keyboard Maestro macro that inserts the current date and time into the text in compressed format, which makes it a very rapid operation.

Thanks. I know the site, and I had built an Alfred workflow to generate new notes in NVAlt with a unique date-based ID, but then I switched to a counter-based ID b/c I couldn’t bear looking at all those date-time strings every time I wanted a link :slight_smile: . I’ve subsequently moved all of that note-taking & related material into Ulysses but I could dig that workflow out and turn it into a custom snippet.

I’d rather not have them in the text though - maybe in the synopsis or custom metadata field. Just discovering the power of Scrivener 3 metadata search…

Yeah, I never used the idea of putting the date-time string in the filename – it seemed a bit ridiculous to me, and based on ideas that didn’t stand up, in my view.

I’ve created a custom meta data field for my Scrivener notes project, which has the ID in it. But I have to say that I find DEVONthink better for notes. The UUID item links don’t break, unless you delete an item from the database, and the UUIDs don’t have to be visible in the item. So you can move an item all over the place, rename it, and still find it. And a link from Scrivener to the item in DT works fine. So my working split is: notes and other material in DT, writing in Scriv.