<?php

require __DIR__ . "/../header.php";

$images = MTGImage::getList();

echo "\n";
echo "Running OCR on all images...\n";
foreach ( $images as $image ) {
    $updated = $image->updateOCR();
    if ( $updated === true ) {
        $image->save();
        echo "   Success on: {$image->getFileName()}\n";
    } else {
        echo "Error: " . $updated;
    }
}

// vim: ts=4 sw=4:
