Searching Snapshots for italics

is there a way to do a project search across all snapshots for character formats, such as italics?

Thanks

This would work across the project, but not for Snapshots.

I believe that in order to accomplish a search by formatting within the snapshots, you’d need to rather use Edit/Find/Find with some RegEx formula.

Perhaps @AntoniDol could help with that.

Remember, you could search current version of project for italics. If use a previous snapshot use compare to current file and would see italics as a change and would know where they are if use rollback function.

1 Like

@mbrownri This is one of the many reasons I don’t use snapshots. If you used a zip backup as your snapshot, you could open it and have every search capability and all metadata is current as of the time the backup was made.

Searching in Snapshots is available in the Documents > Snapshots > Snapshot Manager, but not for italics, I’m afraid.

Find by Formatting does look for Preserved Formatting Text, but not in Snapshots, I’m afraid.

Wouldn’t there be some fabulous RegEx formula that could allow it ?

No. RegEx knows nothing about formatting. Only text.

RegEx can’t search for formatting, I’m afraid.

Thanks everyone. That’s what I was afraid of. I am on the last edit of a novel and using cut and paste with Grammarly, which eliminated italics.

I have 249 scenes with from 5 to 8 snapshots in each scene; so I think I’m going to need to look at each previous snapshot to the last for each scene to see if italics was eliminated. Tedious. but oh well.

Do you have a Scrivener auto-backup (zipped file) taken immediately prior to making your Grammarly changes?

If so, create a temp folder, unzip that backup into the temp folder, and rename the unzipped .scriv project folder to differentiate it from your live project folder (e.g., MyTempProject.scriv ) Then open both projects and find by formatting on MyTempProject to drive your updates to the live project.

If you didn’t make a zipped backup prior to doing the massive Grammerly update, I respectfully suggest you rethink your processes. Always make a zipped backup before major changes. And be sure to set File > Options > Backup > Retain backup files to 25. :nerd_face:

Best,
Jim

2 Likes

I know that Grammarly suddenly stopped working for Scrivener users…
But: if you have another text editor for which Grammarly still works, or if Grammarly itself has its own text editor (or something the like – able to load RTF files), you could preserve your formatting by using synced files instead of copy/paste.

I personally in this case would:
Create a dummy document and paste the snapshot content to it so that I can then use the search by format feature. :wink:

After which select all text from that dummy, delete, and on to the next.

1 Like

@Vincent_Vincent : Create a dummy document and paste the snapshot content to it so that I can then use the search by format feature. :wink:

After which select all text from that dummy, delete, and on to the next.

There is a another way to do all of this that wouldn’t involve so much procedural work in the overall.

Bulk Export Snapshots

Windows Workaround

Firstly, the procedure described below is effectively broken on Windows. It will overwrite all snapshots with the same name over and over, so you’ll only end up with one for each name used. If you give each snapshot its own name, then maybe it will work fine, but if you just tend to leave them untitled you’ll get one whole snapshot. So instead, skip the export stuff and jump down to import.

Normal Export

Use the Documents ▸ Snapshots ▸ Snapshots Manager menu command. Something to consider first of all is whether you will want all of your snapshots exported. My guess is that you probably don’t need everything (all 1,600 of them, if I understand you correctly). Fortunately you can easily weed out the old stuff with a search like “>1m”, for everything newer than one month. But if in scrolling through that it looks like you’ll be missing the last snapshot for a number of your items, it might be easier to just export everything and wait longer for progress bars.

  1. Click into the snapshots sidebar and press ⌘A / Ctrl+A to select everything.
  2. Click the ... button in the lower left of the window, and select “Export…”
  3. Select a target location, and choose a folder name at the top of the file dialogue.
  4. Use the RTF format.

Import Snapshots into a Project

Next, I would recommend creating a new blank project to hold the snapshots. You could also import them into your main project, but there will be little advantage in doing so, and the downside of increasing the bulk of your project considerably and having to clean it up later.

  1. Using your file manager, navigate to the folder where the snapshots are located.
    • macOS: drag and drop the whole folder into the binder.
    • Windows: since the snapshots weren’t actually exported, you’ll be importing the original project’s Snapshots subfolder directly. You’ll get a bunch of ‘index’ and ‘snapshot’ files imported that are of no use to you. If it bothers you, just run a project search for these by title and trash them all.
  2. If you used a separate blank project, arrange it alongside your main project. If you imported them directly, then using a vertical split in the editor will work best.

Restoring Italics

So that’s a bit of work, but now that we have all of the snapshots in the binder as normal items, we can use all of Scrivener’s features on them.

Select the first snapshot in the imported folder, and use the Edit ▸ Find ▸ Find by Formatting menu command to run your italics search from that point downward in the project. As you’ll note, whether on a Mac or PC, the snapshots will not be named in accordance with the binder item they came from, but in practice this shouldn’t be a huge issue, since the content itself is easy enough to locate. I’d do something like this:

  1. Find an italic match. Note that in doing so, the italic text is selected, so just press ⌘C / Ctrl+C to copy it.

  2. Use the ⌥⌘G / Win+Ctrl+G shortcut to open the Quick Search tool in the main project, and paste the copied text into it. The first result should take you straight to the spot that needs to be fixed, and you can paste it right over to italicise it, or just hit the italics shortcut.

    Naturally if italic text was changed since the last snapshot, you may not always find it in the first go and will need to reduce the selection scope a bit.

If you use italics a lot you might be in that one binder item for a bit, and can more easily just work between project windows/splits rather than use quick search, but once the tool switches items you can repeat the above to figure out where to go.