Fixed count bug

pull/2/head
Anthony Axenov 2023-08-09 21:31:08 +08:00
parent b9c804b0f6
commit 9613697ada
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
1 changed files with 2 additions and 2 deletions

View File

@ -200,10 +200,11 @@ class Processor
$this->initConverters();
$this->initCollections();
$count = count($this->collections);
$current = 1;
$current = 0;
$success = 0;
print(implode(PHP_EOL, array_merge($this->version(), $this->copyright())) . PHP_EOL . PHP_EOL);
foreach ($this->collections as $collectionName => $collection) {
++$current;
printf("Converting '%s' (%d/%d):%s", $collectionName, $current, $count, PHP_EOL);
foreach ($this->converters as $type => $exporter) {
printf(' > %s', strtolower($type));
@ -212,7 +213,6 @@ class Processor
printf(' - OK: %s%s', $exporter->getOutputPath(), PHP_EOL);
}
print(PHP_EOL);
++$current;
++$success;
}
$this->printStats($success, $current);