Sunday, April 25, 2010

Wordcount Widget!

Note the awesome wordcount widget I added to the right sidebar. This widget is awesome because it AUTOMATICALLY tracks the wordcount on my latest work-in-progress, no manual updating needed.

For those who are interested in the technical side of it, here's how it works:

1. My computer automatically backs up all my files to a remote server every night.
2. Since I use OpenOffice, the document in question is in .odt format. I discovered that a nice feature of this format is that the word count of the document is availabe in the raw document code (search for "meta:word-count").
3. The image you see is actually a PHP script on the same remote server. When viewed in a browser, the script extracts the wordcount directly from the document and generates the image on the fly.



K La said...

Genius! Can't wait to read the new novel!

Charity Z said...

How do you know that your book will be 90,000 words long? :)

The Writer said...

It's the goal. :)

I could have made it just show the wordcount, but without a reference point it's not as interesting.

Unknown said...

That's pretty sweet. Good to know about that openoffice metadata deal.