Scrivener 1.1 (1.055b) Public Beta - new and updated (AGAIN)

er
erooke
Posts: 7
Joined: Wed Jun 27, 2007 9:44 pm

Mon Jul 23, 2007 9:53 pm Post

I am using Scrivener 1.055b and MacOS 10.4.9. I can find Scrivener projects or "folders" - but I don't believe that I can find any documents within a Scrivener project or folder. I understand from other posts that Spotlight should find these documents. What am I doing wrong? Will these documents have Scrivener or RTF icons?

User avatar
KB
Site Admin
Posts: 19183
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Jul 23, 2007 10:15 pm Post

Hi erooke, I'm not quite sure what you mean. Try ensuring that Scrivener is installed to your Applications folder and then try logging out and back in again. It may be that .scriv files are only being recognised as folders by the Finder at the moment for you if I understand you correctly. .scriv files are just folders that are treated as packages by the OS, but Scrivener has to be installed properly for them to be recognised.
Best,
Keith

er
erooke
Posts: 7
Joined: Wed Jun 27, 2007 9:44 pm

Tue Jul 24, 2007 4:06 am Post

Keith,

Thank you for your prompt reply to my question about Spotlight not finding Scrivener documents. I have Scrivener in my Applications folder and rebooted.
Same result as before, Spotlight does not find any Scrivener documents or files within a Scrivener project package or folder. Spotlight finds the package or folder by its name - but not any files or documents inside the package. For example, I create a new project "Test" and within this project I may create Drafts "Test.A", "Test.B" and "Test.C" and Research documents "Test.D" and "Test.E". Spotlight can find the project "Test" but cannot find the documents "Test.A", "Test.B" and "Test.C", "Test.D" and "Test.E" within the package or folder.
I read forum references about a Scrivener Spotlight Importer. I checked the Spotlight Library Folders at the System and User levels and found no Scrivener Importer plugin. Is there supposed to be one?
Thank you again for a wonderful program. I already bought another copy for my daughter who is writing her Masters Thesis.
Regards,
erooke

su
suavito
Posts: 292
Joined: Sun Apr 15, 2007 11:52 pm
Platform: Mac
Location: Germany

Tue Jul 24, 2007 7:01 am Post

The Scrivener project a. k. a. Scrivener folder has the name you gave to your project and so you can find it with Spotlight by searching for that name.

But when you locate a Scrivener project folder in the finder and right-click on it and chose "show content" (this may not be the exact name of the menu item, I work with a non-English UI so I have to re-translate/guess it; but you will probably know which menu item it is) – then you will see that it contains a bunch of rtfd files: 1.rtfd, 2.rtfd and so on (plus 1_notes.rtfd etc.). The files of both the draft and the research folders simply get numbered. And if a file belongs to the research folder it might be of a different file type like 4.pdf.

This explains why you can't find the texts inside of a Scrivener project by searching for their names in Spotlight – files of these names just do not exist. Their content, on the opposite, is searchable as these are standard rtfd files with no need of a special Scrivener Spotlight plug-in.

It's a good question if it would be possible to make the binder.scrivproj (that's the file containing all the project information, isn't it?) searchable.

But it would be even better if the rtfds would not just be numbered but have their real names. That would not only enable Spotlight to find them but also make access to them easier from outside of Scrivener, for example, when you open a backup copy of your project on another computer without a Scrivener installation.
Tried working once. It didn’t work out. Too much like work.
John Steed

User avatar
KB
Site Admin
Posts: 19183
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Tue Jul 24, 2007 9:18 am Post

Same result as before, Spotlight does not find any Scrivener documents or files within a Scrivener project package or folder. Spotlight finds the package or folder by its name - but not any files or documents inside the package. For example, I create a new project "Test" and within this project I may create Drafts "Test.A", "Test.B" and "Test.C" and Research documents "Test.D" and "Test.E". Spotlight can find the project "Test" but cannot find the documents "Test.A", "Test.B" and "Test.C", "Test.D" and "Test.E" within the package or folder. I read forum references about a Scrivener Spotlight Importer. I checked the Spotlight Library Folders at the System and User levels and found no Scrivener Importer plugin. Is there supposed to be one?


Ah, Spotlight - you didn't mention Spotlight in your previous post so I didn't realise that this was what you meant. The Spotlight importer is built into the application itself, as it should be - provided the app is placed in the Applications folder, Spotlight uses the importer. And in fact, it sounds like it is working just fine. The documents inside the binder of your Scrivener file are not really files as such, so Spotlight cannot find them. The Scrivener Spotlight importer just tells Spotlight what text there is inside the project - based on all of the text in all of the documents. So when you search for a term that is contained in any document inside of a Scrivener project, the Scrivener project itself is returned. Spotlight can only show real files on disk - what you see in the binder are virtual documents, so there is no way of Scrivener presenting them to Spotlight, let alone make it so that you could click on one in Spotlight and then have it open that document in that project in Scrivener. I'm afraid that sort of functionality just isn't possible, as nice as it would be.

To understand this better, it helps to understand how a Scrivener project works. A .scriv file is really just a Mac OS X package - that is, a regular folder with an extension and an icon that presents itself to the Finder as though it were a file. Ctrl-click on the .scriv file and select "Show Package Contents" in Finder, though, and you will see its contents. However, what you see inside the .scriv file bears no real resemblance to what you see in the binder. For a start, all of those files that exist in the binder with meaningful titles only have arbitrary numbers inside the file package. Why is this? Well, in Scrivener Gold (an older version of Scrivener), those files had the names of the items in the binder. But that meant that no two files in the binder could have the same name, otherwise they would overwrite each other on disk - annoying. And creating a corresponding directory structure within the file package would slow down the app considerably. In short, what goes on inside a .scriv file users should judge, for the most part, as none of their business. :) All users need to know is that all of their files are contained inside the file package in forms (RTFD, TXT, XML) that can be read in most text editors. This is just a safety net - the reason I chose this file format. It means that in the worst possible scenario, were your project to become so corrupted for some reason that Scrivener could no longer open it, you could still get all of your text out of the file package and into another word processor. But this would be a last resort. It would be painful, because of the numbering system within the file package, and it would take a lot of work, but at least you could recover anything. So there is a balancing act/pay off here: the internal structure of a .scriv file is designed so that Scrivener is fast and efficient and as flexible as possible; but it is also designed so that you could rescue your text in a worst case scenario. Scrivener would not be doing its job right, however, if it put getting the text out of a .scriv file manually before running efficiently. If the app ran slowly and you couldn't have more than one file with the same name inside the binder just because I chose to mirror the binder structure in the file system inside the .scriv file, Scrivener would be a poorer application. So, it puts efficiently first but you still have the comfort of knowing that your text is safe - if arcanely labelled - inside the package.

Coming back to Spotlight, it is thus preferable for Spotlight to see the project as a whole. If it could see through the .scriv file into its contents, you would see only files labelled 1.rtfd, 2.rtfd, 3_notes.rtfd etc. This, in fact, happens if the Spotlight importer isn't working properly (for instance, if Scrivener isn't installed to the Applications directory, or if you haven't logged out and back in again after installing for the first time). Even worse, if you could see through to those files and then opened one and edited it directly, you could throw off the synchronisation in word counts or mess up any annotations or footnotes you have in the Scrivener project.

In other words, you should stay away from the contents of .scriv files unless your Scrivener file is completely corrupted; the Spotlight importer makes sure you can't mess up your project accidentally.

The Scrivener project a. k. a. Scrivener folder has the name you gave to your project and so you can find it with Spotlight by searching for that name.


You can also find it in Spotlight by searching for any text contained within the project (in text documents, web archives or PDF files).

This explains why you can't find the texts inside of a Scrivener project by searching for their names in Spotlight – files of these names just do not exist. Their content, on the opposite, is searchable as these are standard rtfd files with no need of a special Scrivener Spotlight plug-in.


If the Spotlight is working correctly, none of these files - 1.rtfd etc - should be returned by Spotlight. Searching by content should return the project itself, and not the files contained therein.

But it would be even better if the rtfds would not just be numbered but have their real names. That would not only enable Spotlight to find them but also make access to them easier from outside of Scrivener, for example, when you open a backup copy of your project on another computer without a Scrivener installation.


Hopefully I've explained all of this above, but to recap:

1) This is how Scrivener Gold worked. Most users felt that having the underlying files in the package use the actual title of the binder document was too restrictive because, a) you could only use each title once, b) you cannot use certain special characters in your titles that are disallowed by the file system. There were a number of other problems associated with this, too, and it was also slower.
2) You should never, ever, ever play with the underlying RTFD files contained within a project. The Help file and tutorial (I hope) make it clear that you do so at your own risk, and that doing so can mess up a project. The file format is used for extra safety, not to encourage toying with the contents. You should always use Export > Files... if you want to use RTFD files directly (which will set up a directory structure and give the RTFD files the names they have in the binder).

Phew! That was a long post for first thing in the morning.

Hope it answers your questions.

Best,
Keith

User avatar
Lord Lightning
Posts: 652
Joined: Fri Jun 23, 2006 4:58 am
Location: Somewhere else!

Tue Jul 24, 2007 1:20 pm Post

Hi erooke,

I am not confident that I fully understand your question, but applying Okham's razor (or Occam's law of parsimony) have you looked in your Documents Folder - that is your computer Documents folder and then scrolled down to Scrivener Documents?

:?
Lord Lightning

I'm a writer. I create worlds!
When I make a declarative statement it applies to ME. Not to everyone.

su
suavito
Posts: 292
Joined: Sun Apr 15, 2007 11:52 pm
Platform: Mac
Location: Germany

Tue Jul 24, 2007 4:33 pm Post

Very interesting and detailed explanation.

Of course there had to be a very good reason for the use of numbered file names. This is the program made the guy with the brain! (Almost everywhere else this would be meant sarcastically, but not here – what a great place to be!)

One little thing: Erooke, you could give your files headings with their names. Headings are content, and alas, the files could be found by Spotlight when searching for their names.
Tried working once. It didn’t work out. Too much like work.
John Steed

er
erooke
Posts: 7
Joined: Wed Jun 27, 2007 9:44 pm

Tue Jul 24, 2007 5:07 pm Post

Keith,

Thank you for your prompt and complete explanation about using Spotlight with Scrivener projects and files. I'm glad I asked because I did not realize before that Scrivener renames files differently than in the binder and thus their "binder names" cannot be found by Spotlight. And I did not realize that opening a file from a Spotlight search might corrupt the Scrivener project or package.

As an attorney, I use Scrivener to draft all kinds of "creative" contracts and documents. Different file names are an important "tagging" system for me, and I was working with the assumption that I could treat the Scrivener project packages as finder folders. Would aliases to the "binder names" work with Spotlight without slowing Scrivener down - and allow packages rather than the file to be opened?

And Suavito and Lord Lightning, thank you also for your responses and thoughts. Yes we are lucky that Keith has thought through these choices.

Keith, thank you again for a wonderful writing tool.

Regards,
Gene

er
erooke
Posts: 7
Joined: Wed Jun 27, 2007 9:44 pm

Tue Jul 24, 2007 5:08 pm Post

Keith,

Thank you for your prompt and complete explanation about using Spotlight with Scrivener projects and files. I'm glad I asked because I did not realize before that Scrivener renames files differently than in the binder and thus their "binder names" cannot be found by Spotlight. And I did not realize that opening a file from a Spotlight search might corrupt the Scrivener project or package.

As an attorney, I use Scrivener to draft all kinds of "creative" contracts and documents. Different file names are an important "tagging" system for me, and I was working with the assumption that I could treat the Scrivener project packages as finder folders. Would aliases to the "binder names" work with Spotlight without slowing Scrivener down - and allow packages rather than the file to be opened?

And Suavito and Lord Lightning, thank you also for your responses and thoughts. Yes we are lucky that Keith has thought through these choices.

Keith, thank you again for a wonderful writing tool.

Regards,
Gene