tidy_console.php seems to be rarely used and contains some bugs...
* according to comments, $_SERVER['HTTP_HOST'] should be commented out - it isn't
* at least while running under OSX/MAMP localhost as DB_HOST produced 'error establishing database connection' - solution was to add after (commented) $_SERVER['HTTP_HOST'] line:
* tidy_run_posts / _comments needs offset and limit, like:
tidy_run_posts ($save, $input, $output, 0, 10000);
and... there should be also option for tidy_run_pages and tidy_run_excerpts
ALSO - $save = false; at the beginning needs to be changed to true if you want to have the changes written back into database :-)