The Google Docs Writing Tracker automates the process of logging and tracking how much you write each day:
The Google Docs Writing Tracking is designed primarily for those who do their writing in Google Docs. However, I recently modified the code to allow any kind of text-based files to be tracked as well. So plain text files, markdown files, HTML, or any other file type that is plain text (not .DOC or DOCX, for instance) will work with the system.
Keep in mind that I originally developed this code for me, without thinking others would be using it. If it seems cumbersome to setup, sorry! Also, USE IT AT YOUR OWN RISK It works well for me, but I've been using it for over a year and it was designed around my work-style. People have asked that I make the code available, and I have done that, but I have no time to support it. Feel free to email me at feedback [at] jamietoddrubin dot com with questions, but there is no guarantee that I will be able to reply, or answer the questions. Again, sorry about this.
Below is an overview of the process of getting started with the Google Docs Writing tracker. Note that the initial setup is a one-time only deal. Once they are setup and configured, the scripts should run in the background and track your writing automatically.
All of the data and settings meta-data for the Google Writing Tracker are now stored in the Writing Tracker spreadsheet. You can get a clean version of the spreadsheet here.
Copy this file to a folder in your Google Drive.
Note the file ID of the spreadsheet in your folder. The ID is the part between key= and #gid in the URL. So if your URL is:
https://docs.google.com/spreadsheet/ccc?key=0AmEvY6JjICyzdGU3aVFqeGVQX3JNRElaWDJlV2pxdlE#gid=42
the ID is
0AmEvY6JjICyzdGU3aVFqeGVQX3JNRElaWDJlV2pxdlE
Verify your spreadsheet has 6 tabs as follows:
If you are using an old version of the spreadsheet, copy your data from the Writing, Goals, Record, and Data tabs into the appropriate tabs on the new spreadsheet.
Go to the Config tab. You will see something that looks like this:
Fill in each of the blank required fields.
The Sandbox location is the folder in which your Sandbox resides. This is where your working documents will live. If this folder is on your Google Drive root, simply provide the folder name:
Sandbox
If the Sandbox is located in a sub-folder off the root, you would assume your path starts at the root, e.g.:
Writing/Sandbox
The Snapshot location is what used to be called the "Earlier" folder. I tend to keep this as a subfolder of my Sandbox, e.g.:
Sandbox/Earlier
Writing/Sandbox/Earlier
You can now call either of this folders whatever you want.
Don't include the full path of the Snapshot folder, just the name of the folder itself, .e.g. "Earlier"
The email address is where the Daily Writing Summary and Daily Almanac will be sent. If you want these to go into Evernote automatically, use your Evernote email address.
Set Test Mode to 1 if you want to run the scripts in test mode. This will still send email, but it will not make updates to the spreadsheet. It will also do some additional logging.
Offset Days is the number of days to offset the date the Daily Almanac sends a summary for. If today is July 31, the table below gives some examples of how the offset setting works:.
Today's Date | Offset Setting | Date Almanac will Summarize |
---|---|---|
7/31/2014 | 1 | 7/30/2014 |
7/31/2014 | 0 | 7/31/2014 |
7/31/2014 | 2 | 7/29/2014 |
By default, the Google Docs Writing Tracker will capture total daily word counts for documents in your sandbox. It can also break word counts into fiction and nonfiction. If you want to track fiction and non-fiction breakdowns, do the following:
Once enabled, the script will use these tags to break down word counts into fiction and non-fiction and include the total in the total column. These breakdowns get reported in the Daily Almanac as well.
There are two sets of instructions here, one for new users, another for existing users:
The process for installing the scripts involves 3 steps:
The following steps install the Google Docs Writing Tracker
The following steps install the Daily Almanac
The triggers are what make the scripts run automatically each night to tally your word counts and send out email updates.
This section describes how the scripts work and offers suggestions on how to use them.
Once everything is properly installed, you only need to do 2 things:
Each night, the scripts will look into your Sandbox folder for any Document files that have changed on that day. For each file that has changed, it will check to see if an earlier version exists in the snapshot folder. If it does, It will compared the two files, to get a word count for today. If no earlier version exists, it simply counts the words in the Sandbox version. It repeats this for all modified files.
You may do your writing in tools other than Google Docs, so long as the following criteria are met:
Once the words have been tallied, they are written to a new row on the Writing tab of the spreadsheet, and a summary of the changes, including differences from previous version is sent to the email address you specify in your configuration settings.
Later, the Daily Almanac script runs. It collects data about the day's writing, and also looks for any records or trends in the data. Then it generates and sends a summary email message about your progress for the day.
When I have finished a draft, I usually move the document out of my SANDBOX and into some other folder. I purge the Spanshot version as well. When I start a new draft, I create a new file and drop it in my Sandbox. Wash. Rinse. Repeat.
The script should run each night between 11pm and midnight. The script uses your browser time zone to determine your time zone. I run the script at this time because I am generally done for the day and I want the script to capture the day's work. Some people may be night owls and want the script to run at other times. That's fine, but depending on when you run it, you might have to alter the date of the files the script looks for. Again, this was written with me and my habits in mind.
CAUTION: You never want to edit the version of the file in the Snapshot (formerly called "Earlier") folder. These edits will be over-written each night. When you go to edit a file in your Sandbox, be sure you are editing the Sandbox version and not the Snapshot version. Changes to the latter will likely be overwritten by the script.
I made my Sandbox folder a starred folder and have a shortcut to that folder that I use so that I don't accidentally edit the earlier version of the file and lose my changes.
I use goals as an arbitrary measure of what I aim for each day. Your daily goal will get recorded on the Writing tab of the spreadsheet each day, and will also be reported in the Daily Almanac
Date | Goal |
---|---|
7/29/2014 | 500 |
Note: as your goal changes over time, don't erase it, just add the new goal, and the date on which you started the new goal below. This will provide a history in the data.
If you use RescueTime to track your application usage, the Google Docs Writing Tracker can automatically capture the time you spend writing each day and add it to your spreadsheet. You will need to create an API Key Unless you know something about how API keys work, I don't recommend doing this. However, if you do have a RescueTime token, you can put that token in the appropriate setting field on the Config tab of your spreadsheet.
If the token is there, the script will grab a list of all of the time you spent on docs.google.com for that day, and filter it to just session involving Google Docs. It will total the time spent and add that to the Time column on your spreadsheet. This is experimental but so far, it's working pretty well for me, and the time is accurate based on my own control tracking.
Currently, you can customize the subject lines of the email message that goes our for the Daily Almanac and the Writing Summary. To customize these, place your desired subject line text in "Almanac Subject" or "Daily Writing Subject" value fields on the Config tab. If your version of the spreadsheet does not have these fields, you will need too add them in.
Each field can perform some simple keyword substitution.
Field | Substitution String | Description |
---|---|---|
Almanac Date | {{AlmanacDate}} | The date for which the Almanac is reporting |
Total words | {{TotalWords}} | The total number of words written |
Record Words | {{RecordWords}} | The most words ever written on a single day |
Record Date | {{RecordDate}} | The date on which the above record was set |
Total Days | {{TotalDays}} | The total number of days captured in the spreadsheet |
Writing Days | {{WritingDays}} | The total number of days you've written |
Consecutive Days | {{ConsecutiveDays}} | The total number of consecutive days you've written |
Goal Streak | {{GoalStreak}} | The total number of consecutive days you've hit your goal |
Goal Words | {{GoalWords}} | The current daily word goal |
Below are some examples of how you can set the subject line in the Config tab:
Daily Almanac for {{Almanac Date}}
Daily Almanac for {{Almanac Date}} ({{ConsecutiveDays}} days)
{{AlmanacDate}} Writing Summary: {{TotalWords}} words
{{AlmanacDate}} Writing Stats: {{TotalWords}} / {{GoalWords}}
These correspond to the following output:
So you now have flexibility to completely customize the subject line. And yes, eventually I'm looking into making the email message a template that can also be customized.
Field | Substitution String | Description |
---|---|---|
Writing Date | {{WritingDate}} | The date for which the summary is reporting |
Fiction Words | {{FictionWords}} | The total number of fiction words written |
Nonfiction Words | {{NonfictionWords}} | The total number of nonfiction words written |
Total Words | {{WritingDays}} | The total number of words you've written |
Goal Words | {{GoalWords}} | The current daily word goal |
Released under Creative Commons
Google Writing Tracker by Jamie Todd Rubin is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.