Multi-Project Statistics

I think there is value in knowing how many words are written over time (perhaps even per hour); it is an objective measure of “constructiveness” (only one amongst many) to put in relation to other things, such as lifestyle changes (i.e. regular use of psychoactives). I use windows, so beta version, but while I see statistics on a project, it does not extend across multiple projects or, as a different and (IMO) more useful option: since program installation to present, with weekly/monthly/yearly graphs. With cruder means, I did this and used the data in relation to marijuana (one year, biweekly on/off pot use, 3.5g per two weeks). Though it does interact with the creative process, I did not see a significant difference. If Scrivener could give detailed graphs over all projects, and this with stats broken down to “per day”, people could get important information out of this: how is it affected by drugs, but also sleep, diet, schedule etc. etc.

I cannot say until I try the software more, but if all writing can be integrated in it,this would be perfect (I use folder hierarchies to store current writing, both fragments and projects, but I want to integrate these fragments in Scrivener),

Bonus feature: let people insert their own variables and manual data.

Users can already insert variables, if I understand you correctly (see the Replacements pane in Compile).

As for statistics, Scrivener is a writing program rather than a statistics-gathering app, so this is out of scope - you could just use a spreadsheet to note down your progress each day, though. Eventually, when AppleScript support is added, I will expose the statistics so that you could set up an AppleScript to generate a spreadsheet automatically - that’s a few months down the line though.

Thanks for trying Scriv,

I’m happy to hear this. Thanks :slight_smile:.

Just bought Scrivener (I tried it out a couple years ago, but the project I was using it for was abandoned, and now using it for a new project, and 2.0 is a huge improvement!). The one thing I wish it had was comprehensive AppleScript support. I script things all the time (usually through Apple events in Perl, moreso than in AppleScript directly), and this would be awesome.


Thanks for buying. Full AppleScript support is on the roadmap - it is currently pencilled in as the main thing to do for 2.1, although it may end up getting moved back to 2.2. I was hoping to start coding it soon, but we have a hectic couple of months ahead of us with the Windows release (and then I’m getting married and moving house in June) so I probably won’t get time to start on it properly until August. (And Lion is coming out this year, so that may put it back a little too.) When I do embark on it, though, I’d be grateful for experienced AppleScripters such as yourself to test it out and make suggestions. It’s a big job, and there’s so much in Scrivener that could be exposed to scripting that the task is daunting to say the least, but it is something that is long overdue.

Thanks and all the best,

I’ll start keeping a list of things I want to script in the scratchpad. Right now:

  • I want to create new items and place them anywhere in the binder (or in a collection), change attributes about them, etc.

  • I want to loop through items imported from Aeon Timeline (in a particular folder), pull the label, tags, etc. out of the synopsis for each item and set them properly on the item; take the Start Date out and set it as custom metadata for the item; set the Notes for the item as its full synopsis.

Mac::Glue is a perl module that, essentially, uses an app’s existing AppleScript dictionary to provide methods and classes to Perl, and then handles communication with the app. I envision something like this (probably not exactly) for the above:

[code]my $scrivener = new Mac::Glue ‘Scrivener’;
for my $item ($scrivener->obj(folder => ‘Timeline’, folder => ‘Research’)) {
my $synopsis = $item->prop(‘synopsis’)->get;

my $match = qr{(?:Start Date|End Date|Duration|Label|Tags|Story Arc|Entities|Notes)};
my %match = $synopsis =~ m{($match): (.+?)(?=$match|$)}g;
$match{$_} =~ s/\s+$// for keys %match;
$match{Tags} = [ split ', ', $match{Tags} ];

$item->prop(‘synopsis’)->set(to => $match{Note};
$item->prop(‘label’)->set(to => $match{Label});
$item->obj(‘custom metadata’ => ‘Date’)->set(to => $match{‘Start Date’});
for my $tag ($match->{Tags}) {

Not that I expect you to do anything with this right now, just hoping to get your juices flowing. :wink: I understand all about time constraints … I’d never be working on this current project if not for the fact that I am “forced” to take a few hours on the bus every day, time which I can’t spend on family or most other things I might otherwise be doing. :slight_smile: