A simple command-line script in PHP which allows to post contents of a file, or a text string, to a blog that supports metaWeblog API through XML-RPC. (Tested only with WordPress blogs.) Its usability lies in being easy to use it from other scripts, e.g. generating a file and automatically posting or crossposting it with auto-generated tags, categories etc.

Example of usage:

php wp_post.php -file="contents.txt" -subject="Beautiful Day" -tags="daily, photo" -categories="Forest" -blog=photo365

Click to download – wp_post-1.0.zip

Posted in code, php | Tagged | Leave a comment


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