Reading from files

Are there good, robust ways to edit files in place in Drafts?

As I use Obsidian, Vim, and command line tools more and more, Drafts remains the place where I do my writing; mainly essays. But it can be challenging to edit files in place as Obsidian does (as opposed to importing them, editing them in Drafts, then exporting them to the same folder and file as the input). But maybe I’m missing something.

@derekvan has a great pair of actions, Write Files and Read Files that I was using successfully in 2021. But these days they seem to be breaking with JSON parse errors. :slightly_frowning_face:

I don’t know why the existing actions are breaking (something unusual in your file paths?), but I did have a few actions in my Power Users action group that let you set a file path for a draft and also to import and export between the draft and the file path. It also accommodates some versioning too, using Drafts’ inbuilt version functionality.

I am pretty sure it could probably be revised to work with Drafts’ bookmarks, but if your Obsidian folder is inside your Drafts folder (which it might be given how long ago you say this was working), then maybe give it a try?

ThoughtAsylum - Power User Action Group:

Docs section on Meta Based File Management:

Hope that helps.

1 Like

Oh cool! You’re the TAD person—thank you for this amazing library of actions. I didn’t know that the Power User group had these actions; I was looking at the Export/Import/Share group which didn’t have exactly what I wanted.

I don’t know why @derekvan’s actions are breaking for me either but they were a great pair of actions while they lasted.