<?php
$f = file_get_contents(dirname(__DIR__).'/database/seeders/RealDataSeeder.php');
if (! preg_match('/\$appointments = \[(.*?)\];\s*\n\s*\$total = 0/s', $f, $m)) {
    fwrite(STDERR, "no match\n");
    exit(1);
}
$out = "<?php\nreturn [\n".trim($m[1])."\n];\n";
file_put_contents(__DIR__.'/appointment_rows.php', $out);
echo "Wrote appointment_rows.php\n";
