Automation init...1

This commit is contained in:
최준흠 2024-09-06 14:41:25 +09:00
parent 47cdccb74c
commit 13e9c51fb6
3 changed files with 6 additions and 9 deletions

View File

@ -17,8 +17,8 @@ $routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}
$routes->get('/', 'Home::index'); $routes->get('/', 'Home::index');
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) { $routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
$routes->cli('mangboard/level', 'Mangboard::level'); $routes->cli('mangboard/level', 'Mangboard::level');
$routes->cli('yamap/crawler', 'Yamap::crawler'); $routes->cli('crawler/yamap', 'Crawler::yamap');
$routes->cli('yamap/crawler/(:any)', 'Yamap::crawler/$1'); $routes->cli('crawler/yamap/(:any)', 'Crawler::yamap::/$1');
}); });
$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], function ($routes) { $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], function ($routes) {

View File

@ -5,24 +5,23 @@ namespace App\Controllers\CLI;
use App\Libraries\YamapLibrary; use App\Libraries\YamapLibrary;
use App\Libraries\MyWebLibrary; use App\Libraries\MyWebLibrary;
use App\Libraries\MyStorage\MyStorageFileLibrary; use App\Libraries\MyStorage\FileLibrary;
use App\Libraries\MyCrawlerLibrary; use App\Libraries\MyCrawlerLibrary;
use App\Libraries\Mangboard\GalleryBoardLibrary; use App\Libraries\Mangboard\GalleryBoardLibrary;
use App\Entities\Mangboard\BoardEntity; use App\Entities\Mangboard\BoardEntity;
use App\Controllers\BaseController; use App\Controllers\BaseController;
class Yamap extends BaseController class Crawler extends BaseController
{ {
public function yamap(...$params): bool public function yamap(...$params): bool
{ {
try { try {
$isDebug = in_array("debug", $params); $isDebug = in_array("debug", $params);
$nickname = getenv("yamap.view.default.nickname"); $nickname = getenv("yamap.view.default.nickname");
$datas = [];
//Yamap사이트에서 자유게시판에서 최근 게시물 데이터 가져오기 //Yamap사이트에서 자유게시판에서 최근 게시물 데이터 가져오기
if (!in_array("skip_build", $params)) { if (!in_array("skip_build", $params)) {
$myWeb = new MyWebLibrary(getenv('yamap.host.url')); $myWeb = new MyWebLibrary(getenv('yamap.host.url'));
$storage = new MyStorageFileLibrary(WRITEPATH . "uploads"); $storage = new FileLibrary(WRITEPATH . "uploads");
$storage->setPath("Yamap"); $storage->setPath("Yamap");
$crawler = new MyCrawlerLibrary(); $crawler = new MyCrawlerLibrary();

View File

@ -2,9 +2,7 @@
namespace App\Libraries\MyStorage; namespace App\Libraries\MyStorage;
use App\Libraries\MyStorage\MyStorageLibrary; class FileLibrary extends MyStorageLibrary
class MyStorageFileLibrary extends MyStorageLibrary
{ {
private $_uploadPath = ""; private $_uploadPath = "";
private $_path = ""; private $_path = "";