Try this next time you have word counts to do
Posted: February 26th, 2010, 6:23 am
I recently had my first experience of setting up the Magic Window and, I don't know about you, but I found the word counts a bit tedious.
Since I have a sore throat at the moment and I am unable to record, and I'm a bit of a dabbler in computers, I knocked up a little script which may make the job a bit easier.
The script runs against the HTML ebooks on Gutenberg.
- you click the paragraph where you want to start the count,
- it asks you the target number of words,
- it quickly goes through every paragraph from that point onwards and counts the words and the running total
- it stops when it reaches the target, or the end of the chapter if before
- the page is temporarily changed to display the word counts right there at the end of each paragraph
- you can repeat this as many times as you like, each time you click a paragraph the temporary page changes are removed
In the spirit of a picture being worth a thousand words, I've posted a few screenshots to illustrate it:
http://picasaweb.google.com/100844930061266895472/WordCountScreenshots
If you would like to try it out, you will first need the GreaseMonkey add-on for Firefox (skip this step for Chrome):
https://addons.mozilla.org/en-US/firefox/addon/748
Firefox : Once you have GreaseMonkey installed, go here to install my word counter script.
http://userscripts.org/scripts/show/69969
Chrome: go here to install the Chrome version (GreaseMonkey not needed)
http://userscripts.org/scripts/show/70234
After that all you need to do is visit Project Gutenberg and choose the HTML ebook you want to count.
It's a bit limited because its only available for Firefox/Chrome (there's no reason it couldn't work on other web browsers but they would need to have a GreaseMonkey equivalent), and it only works on the Gutenberg online HTML books, not the text or zipped HTML, or other formats. If there's any interest I'm sure it would be possible to extend it's reach (though I would rather spend my spare time recording than scripting .
If you care to give it a go I hope it helps you out!
If you have any problems or need more specific help then please post here or PM me and I'll do what I can to help.
enjoy!
Phil
Since I have a sore throat at the moment and I am unable to record, and I'm a bit of a dabbler in computers, I knocked up a little script which may make the job a bit easier.
The script runs against the HTML ebooks on Gutenberg.
- you click the paragraph where you want to start the count,
- it asks you the target number of words,
- it quickly goes through every paragraph from that point onwards and counts the words and the running total
- it stops when it reaches the target, or the end of the chapter if before
- the page is temporarily changed to display the word counts right there at the end of each paragraph
- you can repeat this as many times as you like, each time you click a paragraph the temporary page changes are removed
In the spirit of a picture being worth a thousand words, I've posted a few screenshots to illustrate it:
http://picasaweb.google.com/100844930061266895472/WordCountScreenshots
If you would like to try it out, you will first need the GreaseMonkey add-on for Firefox (skip this step for Chrome):
https://addons.mozilla.org/en-US/firefox/addon/748
Firefox : Once you have GreaseMonkey installed, go here to install my word counter script.
http://userscripts.org/scripts/show/69969
Chrome: go here to install the Chrome version (GreaseMonkey not needed)
http://userscripts.org/scripts/show/70234
After that all you need to do is visit Project Gutenberg and choose the HTML ebook you want to count.
It's a bit limited because its only available for Firefox/Chrome (there's no reason it couldn't work on other web browsers but they would need to have a GreaseMonkey equivalent), and it only works on the Gutenberg online HTML books, not the text or zipped HTML, or other formats. If there's any interest I'm sure it would be possible to extend it's reach (though I would rather spend my spare time recording than scripting .
If you care to give it a go I hope it helps you out!
If you have any problems or need more specific help then please post here or PM me and I'll do what I can to help.
enjoy!
Phil