diff --git a/.gitignore b/.gitignore index e8ddce8..dacc4f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /storage/ /vendor/ -composer.lock \ No newline at end of file +composer.lock +config.json \ No newline at end of file diff --git a/README.md b/README.md index fcde31b..600eb11 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,16 @@ Next generation of [YGGo!](https://github.com/YGGverse/YGGo) project with goal to reduce server requirements and make deployment process simpler - - Index model changed to the distributed cluster model, and oriented to aggregate search results from different instances trough API - - Refactored data exchange model with drop all primary keys dependencies + - Index model changed to distributed cluster model, and now oriented to aggregate search results from network instances trough API + - Refactored data exchange model where drop all internal keys dependencies - Snaps now using tar.gz compression to reduce storage requirements and still supporting remote mirrors, FTP including - Minimalism everywhere ## Implementation -Engine written in PHP and uses [Manticore](https://github.com/manticoresoftware) on backend. +Engine written in PHP 8 and uses [Manticore](https://github.com/manticoresoftware) on backend. -Default build inspired and adapted for [Yggdrasil](https://github.com/yggdrasil-network) but could be used to make internet search portal. +Default build adapted for [Yggdrasil](https://github.com/yggdrasil-network) but could be used to make internet search portal. ## Components @@ -29,7 +29,7 @@ Default build inspired and adapted for [Yggdrasil](https://github.com/yggdrasil- 1. Install `composer`, `php` and `manticore` 2. Grab latest `Yo` version `git clone https://github.com/YGGverse/Yo.git` 3. Run `composer update` inside the project directory -4. Check `src/config.json` for any customizations +4. Copy and customize config file `cp example/config.json config.json` 5. Make sure `storage` folder writable 6. Run indexes init script `php src/cli/index/init.php` 7. Add new URL `php src/cli/document/add.php URL` diff --git a/src/cli/document/add.php b/src/cli/document/add.php index 4f675cd..04368fc 100644 --- a/src/cli/document/add.php +++ b/src/cli/document/add.php @@ -6,7 +6,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php'; // Init config $config = json_decode( file_get_contents( - __DIR__ . '/../../config.json' + __DIR__ . '/../../../config.json' ) ); diff --git a/src/cli/document/crawl.php b/src/cli/document/crawl.php index c847ccd..edf362e 100644 --- a/src/cli/document/crawl.php +++ b/src/cli/document/crawl.php @@ -14,7 +14,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php'; // Init config $config = json_decode( file_get_contents( - __DIR__ . '/../../config.json' + __DIR__ . '/../../../config.json' ) ); diff --git a/src/cli/document/search.php b/src/cli/document/search.php index f990cdb..aec4381 100644 --- a/src/cli/document/search.php +++ b/src/cli/document/search.php @@ -6,7 +6,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php'; // Init config $config = json_decode( file_get_contents( - __DIR__ . '/../../config.json' + __DIR__ . '/../../../config.json' ) ); diff --git a/src/cli/index/init.php b/src/cli/index/init.php index fe992c3..9eb2016 100644 --- a/src/cli/index/init.php +++ b/src/cli/index/init.php @@ -6,7 +6,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php'; // Init config $config = json_decode( file_get_contents( - __DIR__ . '/../../config.json' + __DIR__ . '/../../../config.json' ) ); diff --git a/src/config.json b/src/config.json deleted file mode 100644 index 2f52990..0000000 --- a/src/config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "manticore": - { - "server": - { - "host":"127.0.0.1", - "port":9308 - }, - "index": - { - "document":"yo_document" - } - }, - "webui": - { - "url": - { - "base":"http://127.0.0.1:8888" - }, - "pagination": - { - "limit":20 - } - }, - "cli": - { - "document": - { - "crawl": - { - "queue": - { - "limit":1, - "delay":1 - }, - "selector": - { - "a:not([rel=nofollow])": - { - "attribute":"href", - "external":false, - "regex":"/.*/ui" - }, - "image": - { - "attribute":"src", - "external":true, - "regex":"/.*/ui" - }, - "audio": - { - "attribute":"src", - "external":false, - "regex":"/.*/ui" - }, - "video": - { - "attribute":"src", - "external":false, - "regex":"/.*/ui" - }, - "script": - { - "attribute":"href", - "external":false, - "regex":"/.*/ui" - } - }, - "snap": - { - "enabled":true - } - } - } - }, - "snap": - { - "storage": - { - "local":{ - "enabled":true, - "directory":"storage/snap", - "size": - { - "max":100024 - }, - "mime": - [ - "application/xhtml+xml", - "application/javascript", - "text/html", - "text/plain", - "text/css", - "image/webp", - "image/png", - "image/gif", - "image/ico" - ] - }, - "mirror": - { - "enabled":false, - "ftp":[] - } - } - } -} \ No newline at end of file diff --git a/src/nodes.json b/src/nodes.json deleted file mode 100644 index e69de29..0000000 diff --git a/src/webui/index.php b/src/webui/index.php index 9e3f8f4..c73bc90 100644 --- a/src/webui/index.php +++ b/src/webui/index.php @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../vendor/autoload.php'; // Init config $config = json_decode( file_get_contents( - __DIR__ . '/../config.json' + __DIR__ . '/../../config.json' ) ); diff --git a/src/webui/search.php b/src/webui/search.php index 27953be..5d14814 100644 --- a/src/webui/search.php +++ b/src/webui/search.php @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../vendor/autoload.php'; // Init config $config = json_decode( file_get_contents( - __DIR__ . '/../config.json' + __DIR__ . '/../../config.json' ) );