Scrivener + geektool in nanowrimo

I was messing around with geektool (http://projects.tynsoe.org/en/geektool/) this evening and thought that what would be nifty for nanowrimo this year would be to have an updating word count on my desktop, which chapter/section titles, word count, total word count and words remaining.

My plan was either a bash or a python script to grab the info from my scrivener project and having poked around inside .scriv package before, I thought this wouldn’t be too difficult. I can pull the section counts out of the BinderStrings.xml file, or go through the .rtfd files, but I couldn’t figure out how to get the chapter titles.

I guess they are contained within binder.scrivproj, which looks like a serialized data structure?

So, KB, I was curious to know if this was feasible? Is the .scrivproj in a format that could be externally accessible?

In not, I can still generate a count-per-section, but I’d sure like to have the section names in there :stuck_out_tongue:

Thanks!
Dana

Under the General pane of the Preferences, you can choose to enable “Subversion/CVS compatible saving”. Doing this causes the binder.scrivproj file to get saved as a plain text/XML file. It’s a lot of gibberish, but you can locate the titles of all the items in there, and even the ID number that relates to that title (which will tell you which RTFD files are linked to it). It might be a lot of work sifting through it and working out how to extract the information - but it should do what you are asking.
Hope that helps.
All the best,
Keith

I think that’s exactly what I want, thanks!

And kudos for using a open and accessible file format :smiley:

If you’ve made progress on this, could you post on the .scrivproj xml structure?