Home Link

Hello, my name is Brett Terpstra, and it’s nice to meet you. Elegant solutions to complex problems. Curious?

ScrivWatcher droplet, an easier live Scrivener preview

ScrivWatcher droplet, an easier live Scrivener preview

I got the droplet for ScrivWatcher working, so you don’t need to run the script from the command line if you don’t want to. I made some further updates to the script1, and the version on GitHub will stay in sync with this application as it develops, so you can choose to go either way.

Just unzip the download below and put the app in your Applications folder (or wherever). Then drop a Scrivener project on it and it will open the compiled file as a Marked preview and start watching. You can also launch the application and you’ll get a droppable window that you can drag Scrivener projects to, or put it in your Dock for easy access.

Let me know how it works. If everything’s groovy, I’ll be adding this and some other updates to the Bonus Pack as soon as possible. I’ll probably try to get droplets for the MarsEdit, nvALT, etc. watchers working as well. I present at Macworld | iWorld at 10am today, so that’s going to have to wait while I rehearse!

download image for ScrivWatcher
Download

ScrivWatcher — Watch a Scrivener project and preview it in Marked by dragging the .scriv file to this droplet. More Info

Changelog

1.3

  • Script detects whether it’s running on the command line or in the droplet. If it’s on the command line, adds progress bar support for caching and concatenating.

1.2

  • Error catcher for some XML parsing issues on more complex document structures
  • Rewrote the whole system to cache textutil conversions and only update when the rtf version is newer than the text version. It can now handle files with many sections much, much faster.
  • Turned off headline generation from page titles by default. If you want it back, you can edit the script inside the app bundle and set titles_as_headers to true. I’ll try to build a more external configuration for it soon.

1.1

  • Watches project XML file so changes to sorting and order update the preview as well
  • Names preview files based on project name to avoid overwriting other open previews
  • Opens dragged document in Scrivener if it’s not already open

  1. mostly just in error handling, but it also quits when Marked quits now. That’s handy if you’re running in the background. 

22 Responses to “ScrivWatcher droplet, an easier live Scrivener preview”

  1. Mathew says:

    Wow, thanks for this! I seem to be noticing a bug (or I’m doing something wrong). ScrivWatcher seems to “remember” the first Scrivener project I drag to it. If I close, then open with a second project it still wants to preview the initial project file. So I have no idea how to switch ScrivWatch to preview 2 different projects currently. I’m guessing this is a bug, but may be wrong.

    • Brett says:

      I’ll take a look at it this afternoon. Are you closing everything (ScrivWatch, Marked and Scrivener project) before opening a new one? Just curious.

      • Brett says:

        Just updated the download on this page to 1.1, could you download and see if you still have the same issue?

        • Mathew says:

          Seems to now work fine with 4 Scrivener projects, but shows nothing, zilch with a fifth. Weird. I can send you a link to the “bad” Scrivener project if you want. Don’t know why there’s a hang up with just this one.

  2. Mathew says:

    I don’t recall if I closed everything before opening a new one when I first tested. But in subsequent tests I definitely have closed everything. Also repaired permissions, logged out, restarted, etc.

  3. Frédéric says:

    Really wonderful!! At last, I can smoothly write in markdown (with equations) in scrivener and follow the preview. Thanks. :o))) One point : when reorganizing the scrivener document and saving, the preview doesn’t update.

  4. Paul says:

    Pure awesomeness.…

    Thanks!

  5. I’ve found that if you have more than one Scrivener Project open that Marked doesn’t display anything. Not sure if that’s a feature or a bug.

    Still a great feature for Marked.

    • Brett says:

      Open in Scrivener? I’m not having any trouble, as long as I only view one document in Marked at a time. It always uses the same temp preview file, so multiple Scrivener projects can’t currently be previewed in Marked…

  6. tombarys says:

    Absolutely great! Thanks! Thanks!

  7. Tristan says:

    Doesnt work for me. Scrivener and Marked are running. When I drop my scriv file into the droplet nothing happens. Any suggestions?

    • Brett says:

      Close both Scrivener and Marked and drop a file, let me know if either one opens or not. Just wondering if it’s having trouble starting or after it gets to the parsing part.

      Have you tried multiple .scriv files? Also try starting a new project with just a couple of pages and see if that works. Let me know.

  8. Tristan says:

    I closed both apps but nothing is starting after I droped the scriv file into the droplet. Also created a new document as advised.

    • Brett says:

      Are you Terminal-savvy enough to try running the raw script? If so, save [this code] as scrivwatcher.rb and make it executable with chmod a+x /path/to/scrivwatcher.rb. Edit the code in the first section to set debug to “true”. Then run /path/to/scrivwatcher.rb /path/to/yourdoc.scriv and see if it gives you any helpful messages.

  9. Tristan says:

    Thank you for your support. Here’s the terminal output:

    /Users/tristank/Downloads/scrivwatcher.rb:93:in ‘delete’: No such file or directory — /Users/tristank/ScrivWatcher/ScrivWatcher — test​.md (Errno::ENOENT) from /Users/tristank/Downloads/scrivwatcher.rb:93

  10. Frédéric says:

    I have the same behavior as Tristan with new version : it doesn’t start and the terminal output is the same.

  11. Tristan says:

    Same for me. Thanks.

Leave a Reply

Comments may use standard Markdown formatting


Notify me of followup comments via e-mail. You can also subscribe without commenting.

Entries (RSS) and Comments (RSS), or Subscribe by Email