Scrivener API for extracting stats?

There are among us freakish folks that love stats. Mostly so we can be cool and track word counts per day, time spent, etc., on our various scrivener projects. One approach I’ve used is to pull out the line matching

Words=

in the scrivx file (MAC), filtering on today’s date ("+%Y-%m-%d"), and storing that number. That works, but it seems a little hokey. Is there an API, or plans to expose one, where we could query to pull out writing stats daily to then do compiling and spreadsheet and graphs (OH GLORIOUS GRAPHS!) galore?

Had to ask :slight_smile:

Thanks!

That’s a safe approach, though if your scripting language can parse XML, having it grab the Words attribute from PreviousSession, as well as Date, would be a bit safer as that attribute might get used elsewhere (I don’t believe it is, currently).

There isn’t an API right now, though. This is on the roadmap, but I must stress, the long-term roadmap. :slight_smile:

Honestly, my fu is weak, but my bash (sed/awk) are strong :wink:

It was worth asking, thanks for the super fast reply!