Initial commit
This commit is contained in:
commit
c4877471f8
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/vendor/
|
||||
/*.phar
|
||||
/*.yaml
|
13
Makefile
Normal file
13
Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
.PHONY: help all phar
|
||||
|
||||
help:
|
||||
@echo "\e[1mTargets:\e[0m"
|
||||
@echo " \e[3mall\e[0m — build everything\n \e[3mphar\e[0m — build the phar"
|
||||
|
||||
all: phar
|
||||
|
||||
phar:
|
||||
box compile
|
||||
mv bin/slotcli.phar ./slotcli.phar
|
||||
|
||||
|
4
bin/slotcli
Executable file
4
bin/slotcli
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../src/bootstrap.php";
|
31
composer.json
Normal file
31
composer.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "slotdb/cli",
|
||||
"description": "SlotDB command line client",
|
||||
"type": "application",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SlotDb\\Cli\\": "src/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Christopher Vagnetoft",
|
||||
"email": "labs@noccy.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"slotdb/client": "@dev",
|
||||
"guzzlehttp/guzzle": "^7.9",
|
||||
"symfony/console": "^7.2"
|
||||
},
|
||||
"repositories": {
|
||||
"slotdb-client": {
|
||||
"type": "vcs",
|
||||
"url": "../slotdb-client-php"
|
||||
}
|
||||
},
|
||||
"bin": [
|
||||
"bin/slotcli"
|
||||
]
|
||||
}
|
1284
composer.lock
generated
Normal file
1284
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
src/Application.php
Normal file
14
src/Application.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli;
|
||||
|
||||
class Application extends \Symfony\Component\Console\Application
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct("slotcli", "0.0.0");
|
||||
|
||||
$this->add(new Command\ImportCommand());
|
||||
$this->add(new Command\ExportCommand());
|
||||
}
|
||||
}
|
10
src/Command/BaseCommand.php
Normal file
10
src/Command/BaseCommand.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
||||
abstract class BaseCommand extends Command
|
||||
{
|
||||
|
||||
}
|
11
src/Command/ExportCommand.php
Normal file
11
src/Command/ExportCommand.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name:"export", description:"Export the database to a file")]
|
||||
class ExportCommand extends BaseCommand
|
||||
{
|
||||
|
||||
}
|
11
src/Command/ImportCommand.php
Normal file
11
src/Command/ImportCommand.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name:"import", description:"Import database from file")]
|
||||
class ImportCommand extends BaseCommand
|
||||
{
|
||||
|
||||
}
|
7
src/bootstrap.php
Normal file
7
src/bootstrap.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
$app = new SlotDb\Cli\Application();
|
||||
|
||||
$app->run();
|
Loading…
x
Reference in New Issue
Block a user