Happy to.
No batch file is needed. I use Scrivener’s built-in sync folder function to create a shared folder inside the Obsidian vault. Scrivener can then write, monitor, and update/sync the shared .md files any time you change them from either Obsidian or Scrivener (or, through syncing between AT3 and Scrivener, in AT3).
My assumptions:
-
You want to sync AT3’s Narrative or Outline views, rather than the Timeline or Spreadsheet views.
-
You want to do your writing primarily in Obsidian, yet be able to make changes and move things around in AT3 and have such changes reflected in Obsidian, even the order of things.
-
You have an active AT3 project.
-
You do not have an active Scrivener project.
-
I use Scrivener 3 for Windows; if you don’t, I assume this will all work with the Mac version, too, but you’ll need to verify that.
The first step is to create a blank Scrivener project and, following the AT3 documentation, sync AT3 to that Scrivener project. Your Scrivener project will automatically be populated with all the AT3 narrative events plus any metadata you choose to sync.
Next, consult the Scrivener documentation to set up a shared folder. Be sure to create it inside the Obsidian vault. Call it something like “Scrivener sync.”
Lastly, inside Scrivener, initiate the sync process. Scrivener will write its documents to that shared file, but you will configure syncing so that Scrivener writes them as .md files rather than its native .rtf files. Initially, since your Scrivener documents are blank (because you’re working with a new Scrivener project), it will create .md files without content. You can then copy/paste whatever content you’ve already written into the relevant .md file. You can paste in any YAML block text as well. From that point forward, you can write to these .md files, and Scrivener will sync them back to Scrivener (syncing can be automated to trigger when closing Scrivener and can be manually done, too). Then, you can sync Scrivener to AT3 using AT3’s syncing.
If you want, you can configure the Scrivener sync function to prepend to the .md file name a number representing its position of the Scrivener (and, through syncing between AT3 and Scrivener, AT3) narrative. It will then show the files in the narrative order in Obsidian’s file manager. Here’s what they look like in Obsidian (disregard those small numbers representing word count; those are added by a plugin called Novel Word Count):
Unfortunately, as you can see, Scrivener insists on appending a bracketed number, such as [2] in the highlighted .md file, to each .md file name. It uses this number to enable any changes made to the file to be synced back to Scrivener. That can create an issue with Obsidian’s wiki-like linking when linking to that file. I’ve discussed this issue, and how it doesn’t impact my workflow, in the Scrivener forum, here: Scrivener, Obsidian, and Aeon Timeline…Oh My! - Scrivener - Literature & Latte Forums. I also discuss using link aliases as a workaround if this is truly a problem in your workflow.
I hope this gets you started. Let me know if I can answer any questions.