mirror of
https://github.com/YGGverse/gemini-dl.git
synced 2026-04-01 01:25:34 +00:00
initial commit
This commit is contained in:
parent
13673da85c
commit
0b636de67c
5 changed files with 832 additions and 0 deletions
51
src/gemini-dl.php
Executable file
51
src/gemini-dl.php
Executable 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'
|
||||
)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue