Scrivener files and version 3.5

I notice in the new 3.5 version release notes the item, “Improved syncing when Scrivener’s files are in a database”.

I’m not sure what this means, but does it mean I can place Scrivener projects in a Dropbox syncing (non-indexed) database? I was under the impression that this wasn’t possible; that the location of the component files in DT3 would compromise a Scrivener project’s integrity.

As far as I know, placing the scrivener project in the database and syncing by whatever methods are available (as long as DT3 is doing the syncing) should be OK.

I could be mistaken, but I believe this fix addresses an issue that could happen when indexed project files were not being fully updated before being synced. This, in turn, could cause a message to show up from time to time saying that the file was still open in another device.

I like Scrivener, but don’t actually use it at the moment. Back when Scrivener was a front-end tool, I often put Scriv projects in DT databases with no problems.

Your mileage may vary, but I think it’s just fine.

Well this is news to me; good news - if it’s true. Storing my Scrivener projects in DT3 and syncing them via DT3 would simplify my workflow considerably. I’m guessing that you obviously wouldn’t edit the Scrivener files in place (in the DT3 editor) but that wouldn’t matter as it would only take a moment to open them ‘externally’ (i.e., in Scrivener), and I could keep other relevant files next to the Scrivener projects. All my writing stuff would be in one place.

Just to be clear, I’m not talking about storing and syncing Scrivener projects as indexed files, but importing them into a regular database.

But I’d thought for some reason that this wouldn’t work, or that it might appear to work but actually be fraught with danger, because of the way DT3 reassigns the locations of imported files according to its own requirements, thus messing up the components of the Scrivener project packages.

In a similar way, I remember a while back noting that an imported HTML file wasn’t able to use its ancillary but necessary javascript or css files, because the file structure (and thus the file paths) would be changed; the css or javascript files would no longer have the same relative locations in the Finder, and thus the HTML page wouldn’t be able to ‘find’ them and so not render properly. The answer back then was to index the files instead of importing them, in order to maintain the folder structure and thus the paths that the HTML file expects.

This used to be the case in DTPO - but, a quick test just now in DT3 using an HTML file with a dependent css file in a subfolder shows that it appears to render the css as expected! I don’t know how it’s managing to do that, since DT3’s ‘show in Finder’ on the HTML file shows me that the dependent css file is no longer located where it’s specified to be in the HTML file. So something’s changed since that old post, maybe to help that kind of thing along, but I don’t know if that ‘thing’ is safe for Scrivener projects. I wouldn’t like to go ahead and import them if they’re going to get minced somewhere down the line.

Perhaps I’ve been living under a rock and keeping Scrivener projects in DT3 is now perfectly safe. Does anyone already do this successfully?

It would be nice if development could chime in here for some clarity.

DEVONthink doesn’t change the internals of document packages like the ones of Scrivener. In addition, document packages are usually self-contained and therefore it doesn’t matter where exactly in the database package they’re stored, not even whether they’re indexed or imported makes a difference for the sync.

1 Like

Well that’s great if packages are truly not messed up at all. Maybe therefore I can go ahead and import Scrivener projects. If anyone is actually doing this without problems, I’d be interested to know.

The example I gave of HTML and dependent files is different now though, so I’m not sure what changed there.

I’ve been doing it for years and never experienced any problems. Indeed, it never occurred to me to think there might be problems. It is not the same as putting a Scrivener project in Google Drive or the like, and HTML with dependent files is completely different. As was stated above, the package is self-contained and DEVONthink doesn’t touch the internals. But Google Drive and others don’t know what a package is (because they are not Mac based) so they just treat it like a hierarchy of normal folders. That is what causes the problems.

That’s great. I presume syncing the files via DT3’s Dropbox sync is OK too?

The used sync location doesn’t matter, all of them handle document packages the same way.

Fantastic. I guess I’ve been unnecessarily over-cautious. Thanks all for the info and help with this.

That’s default no mistake and a good backup strategy is always recommended.

Is there any difference between index and import a Scrivener package into DT? Import as a convenient backup strategy or simply for the convenience of accessing Scrivener in DT?

Since you use Scrivener and DT3 in this way, I’m wondering: not every Scrivener file is encapsulated inside its project package, for instance the Scratch Pad notes files (Scrivener preferences: General > Scratch Pad > Notes location). I can’t see that one can specify a location inside DT3 for that (at least I’m sure it wouldn’t be wise), so I guess things like would have to be located in some ‘Scrivener support’ folder outside DT3 in the Finder?

Scrivener has its own backup system so that seems OK.

Conceptually speaking, I don’t think it is correct to think of scratchpad files as Scrivener files. They are files that live on the filesystem somewhere, and are potentially accessible to any other program. All Scrivener has is a preferences file that tells it where the scratchpad folder is located in the filesystem. In the days when I used nvALT as my note-taking program, I stored its files in a folder on Dropbox, and set Scrivener’s preferences to use that as the scratchpad folder. That had the advantage that I could use any text editor to work on those files, including some that worked on my iPhone (Editorial or Byword, for instance). I follow the same sort of practice today, except that I don’t use nvALT any more, and I tend to use 1Writer on my iPhone. What I also did at times was to index that folder using DEVONthink. I’m not sure that was the best idea, but it meant that I could consult those notes coming from almost any direction and using several different tools. I suspect you have a few misconceptions about how these things work, but safety first is a good strategy. And on that subject, I would say it is essential to have backups both in the cloud and on an external hard drive. And note that there is a difference between a sync service like Dropbox or iCloud and a proper cloud backup service like Backblaze. The latter is inexpensive and worth investigating, in my view.

Well I’ve just used a ‘scrivener support folder’ in the Finder Dropbox folder to house all Scrivener’s ancillary files (scratch pad files, background images/textures, preferences, themes and so-on). I know that the the scratchpad files are accessible to other apps, but frankly I prefer to keep them within Scrivener’s domain of use and not index them with other apps, otherwise things gets messy.

As for backups, my nightly CCC whole-drive clone evokes a pre-flight shell script before running which zips and time-stamps a number of copies of important files and folders such as these; after the whole-drive clone these are then added to the nightly Arq backup to the cloud (which also incidentally includes all my DT3 databases). I’ll add my ‘scrivener support folder’ to this.

I’m looking forward to using Scrivener projects in DT3.

Scrivener isn’t the only thing out there using packages. Mind Node, for example, has an option to store its output as either flat flies or packages, and Mind Node files in DT seem to work perfectly.

Word is Windows-centric, but it’s not really so different. A docx file is actually a zip file with an internal tree structure and lots of files that comprise a single document.

Another reason to trust Scrivener is that it’s built with very simple internals. L&L makes that internal structure available on request. With that information, you can create a Scrivener project with nothing more than TextEdit, not using Scrivener at all. Tedious to do, perhaps, but not really hard.

DT is a wonderful tool, but it’s OK to use it for simple tasks, too, like serving as a sync manager.

Always keep independent backups, of course.

I don’t think there is any real difference, to be honest. For markdown files, it is convenient to have the folder with the files accessible to use them from other apps like nvUltra or BBedit, but for Scrivener files this is not so relevant.

If you use backup strategies, like Scrivener’s own backup mechanism and Arq, then you’re safe regardless. (I am a bit paranoid in this regard and go as far as backing up Scrivener’s backup folder with Arq! And to two or three different locations!)

I am curious about your own strategy in this regards, George @ngan.

Simple and naive…

Time machine + ChronSync weekly back up of Document and iCloud folders to one external ssd and one external hard disk. I use iMac 95% of the time for DT and Scrivener (currently). So sync between devices is less of an concern for me.

1 Like

This might seem a very dim question, in which case I apologise for any irritation it might cause, but…
What is the advantage of syncing Scrivener and DT3? What is the purpose behind it and what do you do with the resulting syncing? How does it help you do whatever it is you are doing?
For myself, I’ve used DT3 to develop a large database of material which I then used to refer to when writing a book. Would syncing have helped this process in any way? I’m currently gathering a large amount of data in preparation for another book, so I’m interested in seeing if I can become more efficient in what I do – I’m assuming that efficiency is behind the idea of syncing?
Thanks for bearing with me.

If you have a large number of Scrivener projects that you index in a database acting as a main library for all your research and writing, then I suppose it could be useful to be able to do a search in DT and also find Scrivener projects in which the text or theme occurs. It would beat opening and closing a series of projects to find the one that had a particular item in it. I sometimes have a vague memory of having used something somewhere, and then having to hunt for it.

1 Like