Home Link

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

Jan 26
2012

Dear Macworld Diary,

My Tech Talk this morning, “40 Tips in 40 Minutes” with David Sparks and Merlin Mann went really well, I think. I had fun doing it, anyway. I put up some show notes at the soon-to-change 40tips​.com, if you’re interested. I’m looking forward to seeing David and Merlin with Rob Corddry tomorrow. If you’re around Macworld, you should probably get there early!

Lunch with Shawn Blanc, Stephen Hackett, Brett Kelly, Ben Brooks, and Thomas Brand was awesome1. Great to meet so many cool people all at once.

I just got back from a clandestine meeting at the Samovar Tea Lounge (I love that place). I had tea. We had laughs. I was shown software. It was amazing. I will pimp the hell out of it when it comes out in the next couple of months. Until then, all I can say is just prepare to have core elements of your workflow change drastically, for the better. That’s the second game-changer I’ve been shown lately but can’t disclose yet. I will go insane if this keeps happening.

Also, if you are in San Francisco right now, swing down to Jillian’s tonight before 11pm and catch up with the TUAW crew. It’s going to be a good time. Low-key, good conversation, and probably drink tickets.


  1. Sorry, total nerd namedrop linkfest. Really fun bunch, though. 

Jan 26
2012

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. 

Jan 25
2012

BooneJS tweeted me a script yesterday that takes my original “scrivwatch” script and makes it handle full Scrivener documents. It scrapes the XML file to get the order of RTF files in the document, then used the original method to convert and concatenate all of it into a plain text file. If you write in Scrivener using Markdown, you get a file that Marked can preview as a rendered document with any theme. It uses the original datestamp polling to watch for any change in any of the files in the project and update Marked within a second or two.

I took the script and ran with it this morning, switching it over to REXML parsing and adding in titles for sections and pages. The original script broke on a couple of my projects, but the recursive XML handler I set up fixes the issue.

To run it, you just need to save the script on your drive and make it executable (chmod a+x /path/to/scrivwatcher.rb). Then you can run /path/to/scrivwatcher.rb /path/to/YourProject.scriv. Marked will open automatically and changes will be reflected every time you save. To stop the script, you need to type Control-c in the terminal window you ran it from.

I’m going to try to wrap this into a droplet that you can just drop a Scrivener project on and launch both Scrivener and Marked with scrivwatcher syncing the two. Once I’ve determined whether that’s win or fail, I’ll update the Marked Bonus Pack with it. Yes, I will eventually find time to build this functionality into Marked, along with the rest of the Bonus Pack scripts.

The script is currently a gist on GitHub if you want to play with it. I’ll be updating the gist as I have time to clean it up and make a few things (much) more elegant. If you want to fork and help me out, it’s always appreciated!

Thanks for reading!

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