Coding · google docs · Python

Getting the number of characters of Google documents

I did something very similar to my previous post of a couple of days ago, in which I take the sum of the number of characters of each document in a google drive folder. Today I adapted the code slightly to query individual documents, and added a Class for Documents with a method for counting the number of characters.

Not very creative, but useful nonetheless.Since I’m reusing functions from last week I should probably put these in a module and import this, rather than keeping code duplicated. But that organisation will be for a later time.

I’ll also run this hourly in a cron job. This will give me some data to analyse my writing behaviour…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s