Screen Scraping, Sleep(), Web Services, and the Bible
I'm trying to help my friend out by automating the task of extracting Bible scriptures off her Watchtower Library CD-ROM. Of course, the data's encrypted so I have no choice but to scrape it. She wants to type a list of citations into Word and have those magically be replaced with the actual scriptures they're referencing. No problemo, I said.
When all else fails, build it yourself. So I read all about EnumWindows keybd_event, GetClipboardData, and friends and started hacking away in C++. It worked and it was much faster than the other tools. I ran into the some timing issues that required scattered calls to Sleep throughout the code, though. When I tried running the program on a different machine, it turned out that the time the script had to sleep at different points needed to be increased. Hmm.
Then I realized that when I finally gave my friend this program, I'd have to modify and recompile it to get it to work on her machine. The last thing she needs is for me to give her a copy of Visual Studio. (Besides, that would be illegal and I never break the law.)
Does it strike anyone else as ironic/odd that:
The Bible CD people felt the need to Encrypt the Bible on their CD?
Also, is it a sin to screen-scrape the bible? :)
And lastly, rather than all this machination why not just call a Bible Web Service? The wisdom of the ages is just floating out there in the cloud, right?
Check out the programmable Bible: http://www.christianitytoday.com/ct/2003/106/43.0.html
and more importantly http://www.gnpcb.org/esv/share/services/api/.