I’m curious about how folks are working with “Working Copy” now. I know Drafts doesn’t have a file structure underneath, making it somewhat less well suited than iaWriter or similar (as described in Federico Viticci’s article), but it can write/read from iCloud Drive. I wonder if there’s a way to script something that would allow you to open a file from a Working Copy repo, edit it, and save back to working copy with commit message that’s as easy as Federico describes. The action in the directory that supports working copy will write to a repo, but doesn’t have a way to grab the file (https://actions.getdrafts.com/a/1Pe). I know I can “import” the file via Drafts interface, but that doesn’t bring in the file name which that action requests.
I guess I’m just wondering before I dive into the rabbit hole here whether folks have cooked up anything that works really smoothly for them that they’d be willing to share. I’m sort of wondering if I’m about to make things more complicated than necessary …
If you’re intrested I can post the script and the action to save it to working copy.
Well, in case anyone else is curious about this, the Working Copy url scheme is actually quite forgiving and allows you to go spelunking around in different repos instead of specifying things exactly.
Basically, you can either import a file into Drafts from Working Copy using the native Drafts import function via the Files app, or use the following URL in an action to navigate to any repo and file in WC itself:
Then, after you’ve made some changes, you can write those back to Working Copy with the following URL, which opens WC, prompts you to select the repo and file, then asks you to confirm overwriting the file, then prompts for commit message. Once committed, you come back to drafts.
Obviously, if you’re working on a specific file frequently or repo, you can add those parameters to the URL, either hard coding them in via the URL or via variables that you can set up in a prompt box or whatever. Much easier than I anticipated.
Thanks for that. It’s on my list of things to dig into and you’ve saved me some spadework!