initial commit

This commit is contained in:
yggverse 2024-06-24 23:00:45 +03:00
parent 13673da85c
commit 0b636de67c
5 changed files with 832 additions and 0 deletions

51
src/gemini-dl.php Executable file
View file

@ -0,0 +1,51 @@
#!/usr/bin/env php
<?php
// Load dependencies
require_once __DIR__ .
DIRECTORY_SEPARATOR . '..'.
DIRECTORY_SEPARATOR . 'vendor' .
DIRECTORY_SEPARATOR . 'autoload.php';
use \Yggverse\GeminiDL\Controller\Cli;
try
{
// Start application
$cli = new Cli(
getopt(
'cd:ef:hi:kl:m:rs:t:u',
[
'crawl:',
'delay:',
'external',
'follow:',
'help',
'index:',
'keep',
'level:',
'match:',
'raw',
'source:',
'target:',
'unique'
]
)
);
$cli->start();
}
// Something went wrong
catch (\Exception $data)
{
Cli::exception(
$data->getMessage(),
file_get_contents(
__DIR__ .
DIRECTORY_SEPARATOR . '..' .
DIRECTORY_SEPARATOR . 'help.gmi'
)
);
}