Scrivener, Obsidian, and Aeon Timeline...Oh My!

Success!

I use Scrivener, Obsidian, and Aeon Timeline 3 (“AT3”) for my novel project.

I use Aeon Timeline for outlining and tracking the many aspects of my story (even story beats), Scrivener for drafting and revising, and Obsidian for my story bible.

Sometimes, though, I want to write my manuscript draft in Obsidian, to take advantage of the amazing wiki-type linking to my story bible that also resides in Obsidian. (I realize that Scrivener has a wiki-type linking capability, but linking inside of Obsidian is a whole new ballgame for novelists, at least, for me.)

Scrivener and AT3 already sync beautifully, so I wondered if there was a way to sometimes write in Obsidian and have it sync to Scrivener, and vice versa. It turns out there is! Scrivener can use a sync folder to write and sync .md files shared with Obsidian. Who knew? (Probably everybody but me.)

So, I set up a Scrivener sync file that copies the scenes and chapters to a shared folder in the Obsidian vault. As mentioned, Scrivener can be set to share the files as text/.md files, which is just what we need.

Also, if I add, delete, or move a scene in Scrivener (which, again, already syncs with Aeon Timeline), I want that reflected in Obsidian. Guess what? I discovered that Scrivener can automatically prepend a number representing its order in the Scrivener binder to each .md file it writes to the shared Obsidian folder. Obsidian dutifully reorders the files (scenes) in the Obsidian file explorer according to the prepended number. How cool is that?

Drumroll please…

I can now write in either Obsidian or Scrivener and the two programs will sync. I can move scenes around in Scrivener or AT3, and Obsidian will reflect that new order/structure.

Not only that, but I set up syncing to be automatic on closing Scrivener, plus there is a hotkey to manually trigger syncing (or, in my case, a Stream Deck key) if I want to.

One issue is that if I create wiki-type links in Obsidian when drafting, they will show as nonfunctional [[links]] in Scrivener. I don’t mind; I can probably find a way to remove those via an AutoHotKey script if they bother me. They don’t, as most of my wiki-type links in Obsidian are in the story bible, and I don’t need to sync those to Scrivener. So there will be relatively few such [[links]] in my narrative as I write the manuscript.

I will no doubt do some tweaking, but I think this will let me use all three programs for what they are best at.

4 Likes

Thanks for posting your workflow! I know a number of people who do very similar, either for their notes or for initial drafting (Scrivener’s lack of Markdown typing aids being the main reason).

One question I had: how are you getting around the problem of Obsidian’s wiki link parser failing to recognise links properly if they contain square brackets, like sync folder names do? The only way I’ve managed to get the two working together, with functional links, is to switch off the wiki link option, so that it generates true Markdown syntax instead, like so: [4 Target [2]](4%20Target%20[2].md).

But if you figured out some other way around that, I’d like to know! I’m not much of an Obsidian expert to be honest. I use it mainly as a glorified multi-file search engine—which it is very good at.

It’s a pity that aliases work oddly (at least in my opinion, they must be solving some problem I don’t understand). To my mind a link alias is [[this is valid]], not [[original document title|this is valid]]. That’s just the visible text of the link, what need is there for a whole special feature to do that? Why would you think to go into the target document and set up aliases in YAML just to have that typed in for you, every time you refer to this section with visible text other than its name, instead of just typing it in?. Ah well, I digress. If it worked like real symlinks or aliases, it would solve the bracket problem.

One issue is that if I create wiki-type links in Obsidian when drafting, they will show as nonfunctional [[links]] in Scrivener. I don’t mind; I can probably find a way to remove those via an AutoHotKey script if they bother me…

You could probably nuke those on compile rather than removing them permanently, with the Replacements tab on the right side of the compile overview screen. A trick to know there is that $@ is a capturing wildcard, so replacing [[$@]] with $@ will effectively strip the brackets. But if you need more than that, replacements support regular expressions.

Strip sync folder from names...

This will convert “[[43 document title [18]]]” to “document title”:

Replace: \[\[\d+ ([^\[]+) \[\d+\]\]\]
With: $1

Another approach is to put such links, where they might be compiled, into inline annotations. First, make sure Convert text inside (( )) and {{ }} to inline notes when syncing plain text files, is enabled, in the Sharing: Sync options tab. The double-parenthetical is what you would use to have the synced links placed inside of an inline annotation, like so.(( [[43 something something [10]]] )). It’s a bit much, visually, in my opinion (at least outside of Scrivener), but if you use live markup mode in Obsidian rather than source mode, it’s actually not too bad.

Another reason for leaving them around in the editor: such markings are not entirely without use in Scrivener. While they don’t become hyperlinks, they are still visual aids of where a useful cross-reference is, and in Scrivener you don’t actually need a link to link to something. Double-click on the text in the brackets (and sweep left or right if it is a multi-word phrase), and then right-click on the selection. At the very top of the context menu you will find a list of jump links to document title(s) that contain the selected text.

2 Likes

Great question—I hadn’t encountered this yet, so thanks for alerting me. Unfortunately, Obsidian doesn’t seem to have an escape character for such things, nor could I find a plugin to solve this. I suppose a workaround is to create an alias in the YAML of the target .md file (ugh). In mitigation, the backlinks of the target .md file seem to have no problem linking to the Scrivener-generated .md files in the sync folder, including unlinked mentions; since I do use a lot of aliases for characters and such (as do most if not all novelists, even if its just the character’s first name), Obsidian’s ability to display unlinked mentions is magical.

Actually, you can just type the alias on the fly, such as [[Winnie the Pooh|Pooh Bear]] and keep writing. There is no need to have previously added “Pooh Bear” as an alias in the metadata of the target file. That said, when I find myself frequently using an alias, I will add it to the metadata because Obsidian will give me a box to quickly select the alias as I write. Saves oodles of time and reduces friction as I write. Does this give you a new perspective on linking in Obsidian?

Ah, very cool. You’re ahead of me, as I’ve never used the compile function beyond the default settings. So, given that some of the links will have aliases, such as [[Winnie the Pooh|Pooh Bear]], my Regex would have to deal with that pipe character. So maybe a new replacement rule in the compile format pane would look something like this.

Regex:

\[\[(?:[^\]]*\|)?([^\]]+)\]\]

Which would be replaced with

$1

Thoughts?

Another approach I might try is not to touch these links in compile, but remove them in the compiled .docx file, perhaps via a script in AutoHotKey.

Interesting. This gives me a reason to learn about inline annotations in Scrivener. Cool!

How about that. Cool tip. :slight_smile:

Amber, the issue with the built-in file-name protocol using brackets has me heading down another rabbit hole. Am I correct that I could use the compile function instead of just using the sync folder function in Scrivener (which is what’s producing those file-name single brackets that Obsidian just hates)?

If so, here’s what I’d like to explore:

Aeon Timeline automatically labels each novel, chapter, scene, and subscene with a position, such as “Scene 1.2.4,” meaning Novel 1, Scene Chapter 2, Scene 4. I’m going to see if there is a way to share that as metadata in Scrivener via Aeon Timeline’s syncing function.

If successful, I wonder if I could set compile to prepend the .md file name for that scene to something like: 1.2.4 Pooh Bear meets Tigger

If I can accomplish both these things, Obsidian will dutifully order the scenes in the Obsidian file explorer, and the problem with the Obsidian links not working goes away. In other words, I sail around the storm instead of through it, right?

Any advice would be appreciated, though of course I’m off to study the manual now. I’ve never used the compile function except in its default settings. :slight_smile:

I’m back up from the rabbit hole. The answer is “no,” there is no way to get scene-ordering data to sync from Aeon Timeline 3 to a Scrivener metadata field. Also, I found no way to get scene-ordering data inside Scrivener into a Scrivener metadata field, either (a shot in the dark, that).

But even if there were, I “think” I’ve figured out what those bracketed numbers are that are appended to the text/.md file names, and, if I’m right, I dare not remove them. They seem to be an identifier Scrivener uses to sync any changes to the shared .md file (such as in Obsidian) back to Scrivener. Sure, I can find more than one way to automatically remove them (whether via Scrivener’s compile or post-compile through a script); however, if I do that, I can never use Obsidian to write the manuscript and still have it sync back to Scrivener. That would largely defeat my novelist’s use case.

Knowing that, I’ll leave things as they are. In my workflow, I typically do not link items from my story bible to a manuscript scene (aka Obsidian .md file); rather, I do the reverse, which works perfectly. Plus, as I mentioned earlier, the backlinks on those story bible Obsidian items have no problem displaying the manuscript scene that links to them. But if it was important enough to do so, I’d add an alias name to the target file’s YAML and create an Obsidian link using that–not ideal, but it will work on the rare occasion I need to do that. In other words, it’s a teeny, tiny issue in what otherwise is a massively useful discovery that I can sync Scrivener, Obsidian, and Aeon Timeline in one very powerful novel-writing environment.

Now that I’ve crawled out of the rabbit hole, I guess I’d better get in some writing now. :slight_smile:

3 Likes

In the future we might adopt a different naming scheme, maybe something like -32- instead of [32].

But like I say to those that really want links, using the standard Markdown link, instead of the WikiMedia syntax, is the way to go.

That said, when I find myself frequently using an alias, I will add it to the metadata because Obsidian will give me a box to quickly select the alias as I write. Saves oodles of time and reduces friction as I write. Does this give you a new perspective on linking in Obsidian?

I would still call that the “display text” part of a URL, not an “alias”, but semantics aside, maybe what I’m missing is that this only makes sense to those that use the editor mode that hides your markup aggressively? Otherwise I don’t see why you would want to bulk up the link markup with more text.

But, I’ll also admit I don’t really use Obsidian for its linking at all, so I’m kind of outside of its thought zone to begin with. I have my own link markup I’ve been using for ages, that works better for me (and is capable of traditional aliasing, where we can link to ‘x’ with nothing by ‘y’, not ‘x+y’).


On the RegEx replacement: yup that looks robust to me, if you want to capture the second part of the link in preference to the first part, and fall back to the first part if there is no second part.


Other non-sync alternatives, like compile, I think you exhausted all of the potential problems there, but here are some further tips that might still yet be useful to you at some point, even if not for this.

Amber, the issue with the built-in file-name protocol using brackets has me heading down another rabbit hole. Am I correct that I could use the compile function instead of just using the sync folder function in Scrivener (which is what’s producing those file-name single brackets that Obsidian just hates)?

You can certainly, in a Markdown or TXT-based workflow, compile to multiple files. The main issue with any kind of compile-based round trip workflow though is no efficient means of getting those files back into the original binder items. It hugely limits your ability to use the software since you would no longer be able to use Scrivener’s bookmarks, metadata, custom section types, collections, the very outline hierarchy itself (in most cases). I.e. you’d be down to a flat list of files in the Draft that do nothing other than title+mainText.

It’s barely even using Scrivener at that point, at least in my opinion.

Aeon Timeline automatically labels…

Ah, and forget about any of that, since Aeon uses custom metadata on the original binder items to orchestrate its integrated feature set. Importing what had been compiled, as a replacement hierarchy, would lose all the original Aeon markup.

Also, I found no way to get scene-ordering data inside Scrivener into a Scrivener metadata field, either (a shot in the dark, that).

I’m not 100% on what that means, but this kind of sounds like the sort of thing you would do by adding <$n> (or <$n:scene>, if you want multiple counters) to the Section Layout for each scene. Or if not that, if you were using a file splitter setup like I linked to above, the numbering could very easily be handled at that stage.

1 Like

That would be cool. Or even {32} could work.

But like I say to those that really want links, using the standard Markdown link, instead of the WikiMedia syntax, is the way to go.

Ordinarily, I’d agree with you, as I generally prefer to work with markdown’s canon for portability to other markdown apps. However, Obsidian has powerful advantages for novelists using the wiki-type linking option:

  • When typing a wiki link, it offers auto-complete suggestions–a huge benefit in a novel rich with characters (and their aliases), locations, objects, spells, story beats, and so on. Sometimes I forget the name of something, but I can remember part of it. This quickly gets me to the link so that I’m back to writing.
  • The links automatically update when the note name they link to changes, yet they will preserve any alias added to the link.
  • The links enable backlinking (extremely important for novelists) as well as the graph view.
  • If I create, say, a character on the fly, I merely have to create the link and it will create the new .md file for it. (I believe Scrivener does something similar, if I recall correctly.)

To the best of my knowledge, none of these important functions works in Obsidian when using the markdown link option.

I would still call that the “display text” part of a URL, not an “alias”, but semantics aside, maybe what I’m missing is that this only makes sense to those that use the editor mode that hides your markup aggressively? Otherwise I don’t see why you would want to bulk up the link markup with more text.

Sure, I like “display text” better, too, but Obsidian calls it alias, so that’s what I’m calling it in the context of this discussion. When in Rome…

You guessed correctly that I write in editor rather than source mode. After making the link and clicking away, it displays it (or its alias, if present) underlined and without the code. It’s very graceful in that way. When writing my novel and using an alias in the link, it will display, for example, “Pooh Bear” rather than “Winnie the Pooh” even though it’s linking to an .md file named “Winnie the Pooh.”

What I love about Obsidian is that there is almost no friction when inventing a story element. It’s what drove me to figure out how to use Obsidian and only Obsidian to write a fantasy novel. Here’s a video I created for another writing discussion community: Writing my novel in Obsidian

When I made this video, I had not yet gone back to Scrivener as my narrative-writing tool, Aeon Timeline as my story discovery, outlining, and tracking tool, and Obsidian for my story bible. But it’s still a very powerful tool for novelists.

1 Like

To the best of my knowledge, none of these important functions works in Obsidian when using the markdown link option.

Definitely give it a try, perhaps in a test vault! To be clear I’m talking about turning wikilinks off entirely, in the Files and links preferences, which causes regular Markdown links to adopt the behaviour of internal links in every way (at least as far as I know, and as far as your list goes):

  • You still type in internal links by starting with [[, and complete them with Enter. So no muscle memory updates.
  • Upon doing so they will be formatted as standard links.
    • [[target]] ⇒ [target](target)
    • [[target|display]] ⇒ [display](target)
  • Standard links will be recognised as backlinks, and show up in the graph.
  • Since you are using the core WikiMedia syntax to input links, there is also no difference in terms of creating dangling links to sections that don’t exist yet. They will be created when you click on them (that is the main difference to how Scrivener does things).
  • Renaming notes will intelligently update internal Markdown links pointing to them. If ‘target’ = ‘display’ then both sides are updated, but if ‘display’ is different, then only the filename side is updated.

It’s what drove me to figure out how to use Obsidian and only Obsidian to write a fantasy novel.

Thanks for posting the video of your working process with it. I’ve definitely heard of people using it for long-form writing. I don’t think I could wrap my head around the process in a practical way. I’m just too wedded to fine-grained detailed outlining as a way of brainstorming, developing, structuring and thinking about long-form text. So it’s interesting to see how this could work for those that do it.

I do agree that it does have the slight edge on Scrivener here and there where it comes to tags and links. It should, of course, since that is pretty much its bread and butter (not having an outliner). I wouldn’t underestimate Scrivener’s agility on those fronts though. This is my biggest annotated round-up of articles and discussion links on using Scrivener in this space. That’s rather a lot, but mainly what I wanted to draw attention to was the section toward the bottom on Linking.

There are some thoughts in there that specifically go over the pros and cons, similarities and differences. Backlinks definitely exist in Scrivener, but it takes that concept to a very different place than most automatically generated approaches do, one that gives you more authority over the product of that concept, at the expense of being purely additive rather than trimmed to the present tense. I.e. Scrivener’s backlinks show everything that does or has linked to the section, until you yourself decide if any of those references are no longer useful.

3 Likes

I see now I was wrong about Obsidian’s internal links. I haven’t yet tested out the markdown link format, but I read the documentation: Internal links - Obsidian Help. Thank you for steering me in the right direction.

I continue to marvel at Scrivener’s capabilities. I’ve assigned myself the homework of reading through your annotated round-up of articles and discussion links on using Scrivener.

Thank you for being our Scrivener sherpa!

1 Like