750words utilities

750.pl is a simple Perl script which can be used as a helper to set crossposting to or from 750words.com. It either gets the current entry from your 750words.com account and saves it into a local file, or posts a local file as the current entry (overwriting its contents).

Usage for get: 750.pl get filename
Usage for post: 750.pl put filename

750_start.pl makes Firefox log in on your 750words account without typing username and password, as a workaround for its weird login form that doesn’t work with Chrome and Firefox autofill functionality. The script only works with Firefox because it requires Firefox MozRepl extension, and uses WWW::Mechanize::Firefox.

Click to download (750_v0.85.zip).

Posted in code, perl | Tagged | Leave a comment

GCompare

This Perl script streamlines using Google search as a grammar checker. It allows searching for several (up to 4) variants of the same phrase (e.g. with or without articles, different order of words) to see which one gets more hits and therefore is more likely to be correct, or to check if certain words can be used together at all. So instead of entering these queries manually one by one and having to remember the number of results, they are typed together on the same screen and are run by the script, with only the first page of results being shown, to verify if results are reasonable or garbage.

The script can be used either from the Web interface or from the console under Linux (see gcompare_console.pl).

I can’t afford paying for Google API, and the limit of 100 free queries per day is way too low when serious editing is taking place. So I use a technique of screen-scraping and parsing the output, which is kind of illegal and will break whenever Google changes the format of their search results page.

Click to download here

Posted in code, perl | Tagged | Leave a comment