szurubooru/scripts/find-posts.php
Marcin Kurczewski ed74a9f470 Fixed scripts
I haven't updated these in a loooong time...
2014-05-18 21:59:56 +02:00

19 lines
361 B
PHP

<?php
require_once __DIR__ . '/../src/core.php';
Access::disablePrivilegeChecking();
array_shift($argv);
$query = array_shift($argv);
$posts = PostSearchService::getEntities($query, null, null);
foreach ($posts as $post)
{
echo implode("\t",
[
$post->getId(),
$post->getName(),
$post->tryGetWorkingFullPath(),
$post->getMimeType(),
]). PHP_EOL;
}