Skip to content

Commit

Permalink
Add CSV bulk import command
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-meyer committed Jan 4, 2024
1 parent 29544f7 commit 7188f37
Show file tree
Hide file tree
Showing 10 changed files with 268 additions and 166 deletions.
4 changes: 2 additions & 2 deletions bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
use Exception;
use OCC\OaiPmh2\Console\AddRecordCommand;
use OCC\OaiPmh2\Console\BulkUpdateCommand;
use OCC\OaiPmh2\Console\CsvImportCommand;
use OCC\OaiPmh2\Console\DeleteRecordCommand;
use OCC\OaiPmh2\Console\PruneRecordsCommand;
use OCC\OaiPmh2\Console\PruneResumptionTokensCommand;
Expand All @@ -37,7 +37,7 @@ require __DIR__ . '/../vendor/autoload.php';

$commands = [
new AddRecordCommand(),
new BulkUpdateCommand(),
new CsvImportCommand(),
new DeleteRecordCommand(),
new PruneRecordsCommand(),
new PruneResumptionTokensCommand(),
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@
"symfony/cache": "^6.4",
"symfony/console": "^6.4",
"symfony/filesystem": "^6.4",
"symfony/serializer":"^6.4",
"symfony/validator": "^6.4",
"symfony/yaml": "^6.4"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-strict-rules": "^1.5",
"friendsofphp/php-cs-fixer": "^3.45"
"friendsofphp/php-cs-fixer": "^3.46"
},
"autoload": {
"psr-4": {
Expand Down
113 changes: 8 additions & 105 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Console/AddRecordCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

namespace OCC\OaiPmh2\Console;

use OCC\OaiPmh2\Database;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -41,6 +42,7 @@ class AddRecordCommand extends Command
{
protected function execute(InputInterface $input, OutputInterface $output): int
{
Database::getInstance()->pruneOrphanSets();
return Command::SUCCESS;
}
}
48 changes: 0 additions & 48 deletions src/Console/BulkUpdateCommand.php

This file was deleted.

Loading

0 comments on commit 7188f37

Please sign in to comment.