1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/*************************************************************** |
4
|
|
|
* Copyright notice |
5
|
|
|
* |
6
|
|
|
* (c) 2005 Kasper Skaarhoj ([email protected]) |
7
|
|
|
* All rights reserved |
8
|
|
|
* |
9
|
|
|
* This script is part of the TYPO3 project. The TYPO3 project is |
10
|
|
|
* free software; you can redistribute it and/or modify |
11
|
|
|
* it under the terms of the GNU General Public License as published by |
12
|
|
|
* the Free Software Foundation; either version 2 of the License, or |
13
|
|
|
* (at your option) any later version. |
14
|
|
|
* |
15
|
|
|
* The GNU General Public License can be found at |
16
|
|
|
* http://www.gnu.org/copyleft/gpl.html. |
17
|
|
|
* |
18
|
|
|
* This script is distributed in the hope that it will be useful, |
19
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
20
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21
|
|
|
* GNU General Public License for more details. |
22
|
|
|
* |
23
|
|
|
* This copyright notice MUST APPEAR in all copies of the script! |
24
|
|
|
***************************************************************/ |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Class tx_crawler_cli |
28
|
|
|
*/ |
29
|
|
|
class tx_crawler_cli extends \TYPO3\CMS\Core\Controller\CommandLineController |
|
|
|
|
30
|
|
|
{ |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Constructor |
34
|
|
|
* |
35
|
|
|
* @return void |
36
|
|
|
*/ |
37
|
|
|
public function __construct() |
38
|
|
|
{ |
39
|
|
|
parent::__construct(); |
40
|
|
|
|
41
|
|
|
$this->cli_options[] = ['-h', 'Show the help', '']; |
|
|
|
|
42
|
|
|
$this->cli_options[] = ['--help', 'Same as -h', '']; |
43
|
|
|
$this->cli_options[] = ['--countInARun count', 'Amount of pages', 'How many pages should be crawled during that run.']; |
44
|
|
|
$this->cli_options[] = ['--sleepTime milliseconds', 'Millisecounds to relax system during crawls', 'Amount of millisecounds which the system should use to relax between crawls.']; |
45
|
|
|
$this->cli_options[] = ['--sleepAfterFinish seconds', 'Secounds to relax system after all crawls.', 'Amount of secounds which the system should use to relax after all crawls are done.']; |
46
|
|
|
|
47
|
|
|
// Setting help texts: |
48
|
|
|
$this->cli_help['name'] = 'crawler CLI interface -- Crawling the URLs from the queue'; |
|
|
|
|
49
|
|
|
$this->cli_help['synopsis'] = '###OPTIONS###'; |
50
|
|
|
$this->cli_help['description'] = ""; |
51
|
|
|
$this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler\nWill trigger the crawler which starts to process the queue entires\n"; |
52
|
|
|
$this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2010'; |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']) { |
|
|
|
|
57
|
|
|
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']); |
58
|
|
|
} |
59
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths