Page 1 of 2

Make .scriv a file format that scrivener opens.

Posted: Fri Aug 24, 2012 12:09 am
by Thaoh
I would very much like scrivener to save project files to .scriv files which in effect are .zip archives with the project inside. That way we have PROJECT.scriv and that runs scrivener and loads the files.

Older folder structure should be saved as a file the next time you save it. (though some ninja might be required to avoid "this is the same file" (save the zip file with a temp name, rename the folder, verify files in the .zip, then if everything is okay, erase the folder and go with the zip))

Having messy structure like it is now is a thorn in my side :P

The reason why I'm outlining this as a .zip is because scrivener already supports zip archives as a backup method.

Re: Make .scriv a file format that scrivener opens.

Posted: Fri Aug 24, 2012 7:28 am
by mbbntu
Scrivener originated on the Apple Mac (several years before there was a Windows version), and the Mac has a special type of "file" or "document" called a "package" -- which is what a Scrivener project is on a Mac. In reality a package is a folder, but to the ordinary user it doesn't look or behave like one. To all intents and purposes it behaves like any other file or document on the Mac. Double clicking on its icon (which doesn't look like a folder icon) launches Scrivener, and you can carry out most normal file operations on it without thinking twice -- in fact, I'm sure that most Mac Scrivener users have no idea that they are dealing with a folder containing perhaps hundreds of other folders and files. Problems only arise when it comes to cloud storage methods, to which packages are not well suited (see various threads on the forum). And of course the nifty little Mac idea of the package caused a bit of a problem when it came to programming a Windows version. It is still a problem, because to maintain cross-platform compatibility, any changes that are made in one version have to be made to work in the other version.

Martin.

Re: Make .scriv a file format that scrivener opens.

Posted: Fri Aug 24, 2012 11:25 am
by phil
If projects were stored in zip archives, then every time Scrivener saved a document (which it does whenever you stop typing for 2 seconds, navigate away from a document or hit Ctrl-S), it would have to rebuild the archive, which means copying all the content out to disk and then copying it back with the recently altered document replacing the older version. The only exception to this is when you add a new document, and the zip table of contents (which lies at the tail of the archive) can be copied out, the new file written over it, the table of contents written back and updated, and the header of the zip updated to reflect the new location of the TOC.

Whether this is done through a zip library linked into Scrivener, or there is custom code written by L&L to handle zip archives (something I have done in the past), it doesn't matter. Working with documents that need to be extracted from and then put back into zip archives is a highly inefficient way to work, and the program will seem to pause while this work is going on - and you have to pause the program because the program is working on all the documents in the project at the same time, so you can't do anything until it has finished. The larger your project gets, the longer this delay.

I don't see the folder structure Scrivener currently uses as 'messy'. I store all my work in a directory I created specifically for that purpose, and the projects appear as folders with the project names (plus .scriv) within it. Step into any of those projects and double click on the project file will launch Scrivener, loading that project. I can backup my projects to a usb disk by either copying the project folder or all the projects at once by copying the parent folder.

Perhaps what you are looking for is something a bit more universal, something that would work in a very natural way on Windows, Mac and Linux equally naturally. How about Scrivener creating a shortcut in the project root folder (where all the project folders are stored) to the project files within the project folders, with the shortcut being named after the project instead of just 'project.scrivx'? That way, when you double-click it, it will launch scrivener with that project, and all the shortcuts will be located in a central/common location.

Re: Make .scriv a file format that scrivener opens.

Posted: Sat Aug 25, 2012 2:07 pm
by Thaoh
This got me thinking, maybe there's a way to get windows to handle .scrivs as files and launch the project file inside the folder with scrivener. /me looks into registry hacks

I thought one could use zips as a file-system, sort of but if you have to unzip all the files before re-zipping them then I see why that wouldn't work.

Your special file on OSX sounds like windows' "briefcase" though it's main reason of existence is mainly syncing files it would seem.

Well, another archiving method that allows for editing without having to recreate the entire archive would function.

Re: Make .scriv a file format that scrivener opens.

Posted: Sat Aug 25, 2012 3:54 pm
by phil
I think you are making a mountain out of a pimple. If you can see the folder, double-click on it and then double-click the project.scrivx file. When I was programming, I often had people ask me to do things for them that would have cost me several days of my time just to save them 1 second of effort per day.

For four clicks and a twitch of the mouse, you have exactly what you want.

Alternately, create the shortcuts I mentioned in my earlier post, which you can drag to your desktop or other convenient location. That will only take you ten seconds to do at most, and even then only if you have never done it before. Just right-click the project.scrivx file, create shortcut, rename it to reflect the name of your project and place it where you will. You'll only have to do that once per project, and it gives you exactly what you want with the added benefit that the shortcut can be moved to a more convenient location without relocating the entire project.

Re: Make .scriv a file format that scrivener opens.

Posted: Sun Aug 26, 2012 11:34 am
by Thaoh
Yes, sure.. they go by in an instant, those four clicks. Have you never heard the slogan "Don't make me click"?

It's about convenience. Me having to make a new shortcut each time another project wrestles itself into existence is not convenient, neither is twitching with the mouse and clicking four times. Yes, sure it takes me a second, but that is a second breaking flow, flow that could've been used much better writing the next hamlet.

While I do understand how this might seem like I make a mountain out of nothing... A second wasted isn't just one second it's ANOTHER second wasted among the countless others.

That said, I do understand it if the developers decide to go ahead and ignore my little thorn :) And yes, beyond all belief I will survive having to waste time.

Re: Make .scriv a file format that scrivener opens.

Posted: Sun Aug 26, 2012 8:37 pm
by phil
What might b on the cards if you ask nicely, is for Scrivener to creat the shortcut for you in the root folder the projects are stored in, so all you'd have to do is copy it to a more convenient location if you don't want it there.

Re: Make .scriv a file format that scrivener opens.

Posted: Sun Aug 26, 2012 9:32 pm
by AmberV
I really don't see how the .zip file format would be feasible for the breadth and scale of what Scrivener's project format is capable of. You might not demand much of it, but understand there are many who store several to dozens of gigabytes of research data in the format. Can you imagine slinging a 40gb .zip file around? Yet, this is no problem with the files and folder architecture because we're just relying upon the computer's ability to work with files and folders which is quite robust. It is possible to use .zip in an archival mode where pieces are extracted out of it, stored in temporary files in a cache area, and then re-archived back into the .zip without re-compressing the whole lot. So you could extract /Files/Docs/23.rtf, work on it, and then stash it back into a 40gb Zip without having to re-compress all 40gb. So that isn't the major problem, the major problem is performance, the dramatic increase in complexity (and thus risk of failure) for caching out of a static archive and back in (including orphan cases where a crash happened while stuff was cached out), and initial assembly is going to be a problem as well. It's also just flat out riskier to put everything into one long serialised string of bits, rather than distributing the data amongst many files. One harddrive or network I/O error can damage the zip from top to bottom, where it would otherwise only damage one single file amongst thousands. Re-compressing 2,500 PDF files that you just imported into the project is going to take a long time to do---nevermind that Zip compressing most of the stuff one would archive as research is pointless in the first place since it is already compressed. No longer will people be able to quickly import and move on, they'll have to sit and wait a lot more while using the software. And there goes your 2 second finger click optimisation for loading the project one level of hierarchy higher.

I do know of a variety of programs that use a .zip container mechanism for their format, but they tend to be word processors or other such things with much less or no support at all for attaching research material to the format. You can't import pictures, PDFs, movies, web pages, other documents, etc. It's just a "document".

Meanwhile I've used formats on Windows that are similar to Scrivener's project design---this isn't exclusive to Mac formats being ported over. There are many tools that utilise a multi-file structure for all of the advantages I have put forth above, and they all tend to work on a folder/primary-file mechanic just like Scrivener. This isn't even that odd for Windows.

Re: Make .scriv a file format that scrivener opens.

Posted: Mon Aug 27, 2012 4:43 am
by kewms
Thaoh wrote:It's about convenience. Me having to make a new shortcut each time another project wrestles itself into existence is not convenient, neither is twitching with the mouse and clicking four times. Yes, sure it takes me a second, but that is a second breaking flow, flow that could've been used much better writing the next hamlet.


How often do you create new projects, anyway? I would think the whole process of choosing the template, choosing a location, and naming the file would be inherently disruptive already.

Katherine

Re: Make .scriv a file format that scrivener opens.

Posted: Tue Aug 28, 2012 4:39 am
by Thaoh
I hadn't thought about 40gig projects, yes, I see the impracticality and breakability of a single-file structure.

What I tried to put forward, maybe inadequately is to have windows understand that .scriv-folders should be opened in scrivener. Sort of autorun-ish (winXP), A link in the "root" is a step in the right direction. So consider yourself nicely asked :)

And yes, Katherine.. It is.

Re: Make .scriv a file format that scrivener opens.

Posted: Tue Aug 28, 2012 7:18 pm
by AmberV
I think if it were possible to target a "my project.scriv" folder and have it go from there without any further ado, that would be a nice scenario. Of course that only helps you from the Ctrl-O route; if you're using Explorer to interface with projects I really don't think there is anything in the built-in Windows technology that would allow a folder to masquerade as a file for the purposes of UX interaction.

The shortcut thing would definitely need to be an option---maybe we could hang it off of the Options button in the new project window, as I doubt everyone would appreciate that. I've added that to the list of things to consider.

Re: Make .scriv a file format that scrivener opens.

Posted: Wed Aug 29, 2012 9:24 am
by KB
Actually, I seem to recall that an early beta of the Windows version did allow you to open .scriv folders from within the app itself. I think that we decided against this approach because it was misleading, because it meant that the way you opened projects from within Scrivener was different to how you opened them in Windows Explorer. I think the problem was that Lee could only make it so that Scrivener could open *either* .scriv *or* .scrivx files - in order for Scrivener to be able to open .scriv files, it had to be tricked into seeing them as single files rather than as folders, and thus could then only open the .scriv package and never see the .scrivx file. This, we felt, would lead to confusion - to open a file from within Scrivener, you would navigate with the Open panel to a .scriv file and double-click on it. But in Windows Explorer, the same action would open the folder and you'd have to double-click on the .scrivx file. That would be a pretty serious inconsistency and very confusing for new users.

This was a while ago, though, so I'll leave it to Lee to explain what is possible when he returns.

All the best,
Keith

Re: Make .scriv a file format that scrivener opens.

Posted: Wed Aug 29, 2012 9:26 pm
by AmberV
And there might also be a solution to the problem that is more Mac-like in nature as well, I was informed of that the other day. The problem will be that if it does work at all, it would only work for Win7+, leading to a schism in how projects are interacted with depending on OS version. I'm not sure if that is ultimately a better solution than something that might not be as "normal" but is at least consistent.

Re: Make .scriv a file format that scrivener opens.

Posted: Thu Aug 30, 2012 1:24 pm
by robertdguthrie
What are the chances that anyone will be running a OS older than windows 7 in the next year or two* (says the man whose work computer was upgraded from XP last week)?

My many years of dealing with Windows from a mostly consumer standpoint has led me to expect radical changes in the UI experience from one computer to the next. I think it might be a nice thing to have the project folder look like a bundle the way it does in Mac OS, even if it doesn't apply to every windows version. Plus, several months ago, I could have sworn that someone outlined this solution, only it worked with Vista, at the least. I've searched for the thread with that explanation, but sadly had no luck in finding it.

* Sarcasm, FYI

Re: Make .scriv a file format that scrivener opens.

Posted: Thu Aug 30, 2012 3:17 pm
by AmberV
There is that. Everyone is going to jump on Windows 8 like 7 never existed, no doubt. I love the Start menu that takes up the entire desktop and streamlines itself to 25% of what it used to do.