Hi all,
I wasn’t completely happy with some of the alternative solutions posted for exporting Drafts notes, so I wrote my own.
Some of the features implemented by this script are:
- Filename generation. For each note, this script determines a suitable filename based on the initial line/sentance of the note itself.
- Filename de-duplication. In the likely event of notes with duplicate filenames, this script attempts to construct unique filenames by adding unique information such as date/time and sequence numbers.
- Metadata preservation. Some Drafts metadata - such as location information - is not currently convertible to Obsidian, but this script attempts to at least preserve it for future use.
I haven’t had a chance to test it very widely so I’d really appreciate some feedback.
Hope this is useful for someone.