@@ -53,7 +53,7 @@ |
||
53 | 53 | * @param string $uri |
54 | 54 | * @param TypoScriptFrontendController $frontend |
55 | 55 | * |
56 | - * @return array |
|
56 | + * @return string[] |
|
57 | 57 | * |
58 | 58 | * @throws \Exception |
59 | 59 | * |
@@ -66,10 +66,10 @@ |
||
66 | 66 | if ($this->isCrawlerExtensionRunning($frontend) && preg_match('#^/index.php\?&?id=(\d+)(&.*)?$#', $uri, $matches)) { |
67 | 67 | $speakingUri = $frontend->cObj->typoLink_URL(array('parameter' => $matches[1], 'additionalParams' => $matches[2])); |
68 | 68 | $speakingUriParts = parse_url($speakingUri); |
69 | - if(false === $speakingUriParts){ |
|
70 | - throw new \Exception('Could not parse URI: ' . $speakingUri, 1289915976); |
|
69 | + if (false === $speakingUriParts) { |
|
70 | + throw new \Exception('Could not parse URI: '.$speakingUri, 1289915976); |
|
71 | 71 | } |
72 | - $speakingUrlPath = '/' . ltrim($speakingUriParts['path'], '/'); |
|
72 | + $speakingUrlPath = '/'.ltrim($speakingUriParts['path'], '/'); |
|
73 | 73 | // Don't change anything if speaking URL is part of old URI: |
74 | 74 | // (it might be the case the using the speaking URL failed) |
75 | 75 | if (strpos($uri, $speakingUrlPath) !== 0 || $speakingUrlPath === '/') { |
@@ -209,7 +209,7 @@ |
||
209 | 209 | /** |
210 | 210 | * Determines if a page is queued |
211 | 211 | * |
212 | - * @param $uid |
|
212 | + * @param integer $uid |
|
213 | 213 | * @param bool $unprocessed_only |
214 | 214 | * @param bool $timed_only |
215 | 215 | * @param bool $timestamp |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | protected function findCrawler() |
93 | 93 | { |
94 | - if ( ! is_object($this->crawlerObj)) { |
|
94 | + if (!is_object($this->crawlerObj)) { |
|
95 | 95 | $this->crawlerObj = GeneralUtility::makeInstance('tx_crawler_lib'); |
96 | 96 | $this->crawlerObj->setID = GeneralUtility::md5int(microtime()); |
97 | 97 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | if (count($this->allowedConfigrations) > 0) { |
127 | 127 | // remove configuration that does not match the current selection |
128 | 128 | foreach ($configurations as $confKey => $confArray) { |
129 | - if ( ! in_array($confKey, $this->allowedConfigrations)) { |
|
129 | + if (!in_array($confKey, $this->allowedConfigrations)) { |
|
130 | 130 | unset($configurations[$confKey]); |
131 | 131 | } |
132 | 132 | } |
@@ -192,12 +192,12 @@ discard block |
||
192 | 192 | //if the same page is scheduled for the same time and has not be executed? |
193 | 193 | if ($schedule_timestamp == 0) { |
194 | 194 | //untimed elements need an exec_time with 0 because they can occure multiple times |
195 | - $where = 'page_id=' . $page_uid . ' AND exec_time = 0 AND scheduled=' . $schedule_timestamp; |
|
195 | + $where = 'page_id='.$page_uid.' AND exec_time = 0 AND scheduled='.$schedule_timestamp; |
|
196 | 196 | } else { |
197 | 197 | //timed elementes have got a fixed schedule time, if a record with this time |
198 | 198 | //exists it is maybe queued for the future, or is has been queue for the past and therefore |
199 | 199 | //also been processed. |
200 | - $where = 'page_id=' . $page_uid . ' AND scheduled=' . $schedule_timestamp; |
|
200 | + $where = 'page_id='.$page_uid.' AND scheduled='.$schedule_timestamp; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) as cnt', |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | $isPageInQueue = false; |
226 | 226 | |
227 | - $whereClause = 'page_id = ' . (integer)$uid; |
|
227 | + $whereClause = 'page_id = '.(integer) $uid; |
|
228 | 228 | |
229 | 229 | if (false !== $unprocessed_only) { |
230 | 230 | $whereClause .= ' AND exec_time = 0'; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | if (false !== $timestamp) { |
238 | - $whereClause .= ' AND scheduled = ' . (integer)$timestamp; |
|
238 | + $whereClause .= ' AND scheduled = '.(integer) $timestamp; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows( |
@@ -264,10 +264,10 @@ discard block |
||
264 | 264 | { |
265 | 265 | $uid = intval($uid); |
266 | 266 | $query = 'max(scheduled) as latest'; |
267 | - $where = ' page_id = ' . $uid; |
|
267 | + $where = ' page_id = '.$uid; |
|
268 | 268 | |
269 | 269 | if ($future_crawldates_only) { |
270 | - $where .= ' AND scheduled > ' . time(); |
|
270 | + $where .= ' AND scheduled > '.time(); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | if ($unprocessed_only) { |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $limit = $GLOBALS['TYPO3_DB']->fullQuoteStr($limit, 'tx_crawler_queue'); |
301 | 301 | |
302 | 302 | $query = 'scheduled, exec_time, set_id'; |
303 | - $where = ' page_id = ' . $uid; |
|
303 | + $where = ' page_id = '.$uid; |
|
304 | 304 | |
305 | 305 | $limit_query = ($limit) ? $limit : null; |
306 | 306 | |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | { |
379 | 379 | $qid = intval($qid); |
380 | 380 | $table = 'tx_crawler_queue'; |
381 | - $where = ' qid=' . $qid; |
|
381 | + $where = ' qid='.$qid; |
|
382 | 382 | $GLOBALS['TYPO3_DB']->exec_DELETEquery($table, $where); |
383 | 383 | } |
384 | 384 | |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | */ |
407 | 407 | protected function getQueueRepository() |
408 | 408 | { |
409 | - if ( ! $this->queueRepository instanceof \tx_crawler_domain_queue_repository) { |
|
409 | + if (!$this->queueRepository instanceof \tx_crawler_domain_queue_repository) { |
|
410 | 410 | $this->queueRepository = new \tx_crawler_domain_queue_repository(); |
411 | 411 | } |
412 | 412 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php if (!defined('TYPO3_MODE')) die ('Access denied.'); ?> |
2 | 2 | |
3 | 3 | Page: |
4 | -<?php for($currentPageOffset = 0; $currentPageOffset < $this->getTotalPagesCount(); $currentPageOffset++ ){ ?> |
|
4 | +<?php for ($currentPageOffset = 0; $currentPageOffset < $this->getTotalPagesCount(); $currentPageOffset++) { ?> |
|
5 | 5 | <a href="index.php?offset=<?php echo htmlspecialchars($currentPageOffset * $this->getPerPage()); ?>"> |
6 | 6 | <?php echo htmlspecialchars($this->getLabelForPageOffset($currentPageOffset)); ?> |
7 | 7 | </a> |
8 | - <?php if($currentPageOffset+1 < $this->getTotalPagesCount()){ ?> |
|
8 | + <?php if ($currentPageOffset + 1 < $this->getTotalPagesCount()) { ?> |
|
9 | 9 | | |
10 | 10 | <?php } ?> |
11 | 11 |
@@ -1,4 +1,7 @@ |
||
1 | -<?php if (!defined('TYPO3_MODE')) die ('Access denied.'); ?> |
|
1 | +<?php if (!defined('TYPO3_MODE')) { |
|
2 | + die ('Access denied.'); |
|
3 | +} |
|
4 | +?> |
|
2 | 5 | |
3 | 6 | Page: |
4 | 7 | <?php for($currentPageOffset = 0; $currentPageOffset < $this->getTotalPagesCount(); $currentPageOffset++ ){ ?> |
@@ -5,11 +5,11 @@ |
||
5 | 5 | <?php echo $this->getRefreshLink(); ?> |
6 | 6 | <?php echo $this->getEnableDisableLink(); ?> |
7 | 7 | <?php |
8 | - // Check if ActiveProcess is reached |
|
9 | - if (\TYPO3\CMS\Core\Utility\MathUtility::convertToPositiveInteger($this->getActiveProcessCount()) < \TYPO3\CMS\Core\Utility\MathUtility::convertToPositiveInteger($this->getMaxActiveProcessCount())) { |
|
10 | - echo $this->getAddLink(); |
|
11 | - } |
|
12 | - ?> |
|
8 | + // Check if ActiveProcess is reached |
|
9 | + if (\TYPO3\CMS\Core\Utility\MathUtility::convertToPositiveInteger($this->getActiveProcessCount()) < \TYPO3\CMS\Core\Utility\MathUtility::convertToPositiveInteger($this->getMaxActiveProcessCount())) { |
|
10 | + echo $this->getAddLink(); |
|
11 | + } |
|
12 | + ?> |
|
13 | 13 | <?php echo $this->getModeLink(); ?> |
14 | 14 | </div> |
15 | 15 |
@@ -50,17 +50,17 @@ |
||
50 | 50 | </tr> |
51 | 51 | </thead> |
52 | 52 | <tbody> |
53 | - <?php foreach($this->getProcessCollection() as $process): /* @var $process tx_crawler_domain_process */ ?> |
|
54 | - <tr class="<?php echo (++$count % 2 == 0) ? 'odd': 'even' ?>"> |
|
53 | + <?php foreach ($this->getProcessCollection() as $process): /* @var $process tx_crawler_domain_process */ ?> |
|
54 | + <tr class="<?php echo (++$count % 2 == 0) ? 'odd' : 'even' ?>"> |
|
55 | 55 | <td><?php echo $this->getIconForState(htmlspecialchars($process->getState())); ?></td> |
56 | 56 | <td><?php echo htmlspecialchars($process->getProcess_id()); ?></td> |
57 | 57 | <td><?php echo htmlspecialchars($this->asDate($process->getTimeForFirstItem())); ?></td> |
58 | 58 | <td><?php echo htmlspecialchars($this->asDate($process->getTimeForLastItem())); ?></td> |
59 | - <td><?php echo htmlspecialchars(floor($process->getRuntime()/ 60)); ?> min. <?php echo htmlspecialchars($process->getRuntime()) % 60 ?> sec.</td> |
|
59 | + <td><?php echo htmlspecialchars(floor($process->getRuntime() / 60)); ?> min. <?php echo htmlspecialchars($process->getRuntime()) % 60 ?> sec.</td> |
|
60 | 60 | <td><?php echo htmlspecialchars($this->asDate($process->getTTL())); ?></td> |
61 | 61 | <td><?php echo htmlspecialchars($process->countItemsProcessed()); ?></td> |
62 | 62 | <td><?php echo htmlspecialchars($process->countItemsAssigned()); ?></td> |
63 | - <td><?php echo htmlspecialchars($process->countItemsToProcess()+$process->countItemsProcessed()); ?></td> |
|
63 | + <td><?php echo htmlspecialchars($process->countItemsToProcess() + $process->countItemsProcessed()); ?></td> |
|
64 | 64 | <td> |
65 | 65 | <?php if ($process->getState() == 'running'): ?> |
66 | 66 | <div class="crawlerprocessprogress" style="width: 200px;"> |
@@ -1,4 +1,7 @@ discard block |
||
1 | -<?php if (!defined('TYPO3_MODE')) die ('Access denied.'); ?> |
|
1 | +<?php if (!defined('TYPO3_MODE')) { |
|
2 | + die ('Access denied.'); |
|
3 | +} |
|
4 | +?> |
|
2 | 5 | |
3 | 6 | <br /> |
4 | 7 | <div id="controll-panel"> |
@@ -69,8 +72,11 @@ discard block |
||
69 | 72 | </div> |
70 | 73 | <?php elseif ($process->getState() == 'cancelled'): ?> |
71 | 74 | <?php echo $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.process.cancelled'); ?> |
72 | - <?php else: ?> |
|
73 | - <?php echo $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.process.success'); ?> |
|
75 | + <?php else { |
|
76 | + : ?> |
|
77 | + <?php echo $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.process.success'); |
|
78 | +} |
|
79 | +?> |
|
74 | 80 | <?php endif; ?> |
75 | 81 | </td> |
76 | 82 | </tr> |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | if (!defined('TYPO3_cliMode')) { |
3 | - die('You cannot run this script directly!'); |
|
3 | + die('You cannot run this script directly!'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | $processManager = new tx_crawler_domain_process_manager(); |
7 | 7 | $timeout = isset($_SERVER['argv'][1] ) ? intval($_SERVER['argv'][1]) : 10000; |
8 | 8 | |
9 | 9 | try { |
10 | - $processManager->multiProcess($timeout); |
|
10 | + $processManager->multiProcess($timeout); |
|
11 | 11 | } catch (Exception $e) { |
12 | - echo PHP_EOL . $e->getMessage(); |
|
12 | + echo PHP_EOL . $e->getMessage(); |
|
13 | 13 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | $processManager = new tx_crawler_domain_process_manager(); |
7 | -$timeout = isset($_SERVER['argv'][1] ) ? intval($_SERVER['argv'][1]) : 10000; |
|
7 | +$timeout = isset($_SERVER['argv'][1]) ? intval($_SERVER['argv'][1]) : 10000; |
|
8 | 8 | |
9 | 9 | try { |
10 | 10 | $processManager->multiProcess($timeout); |
11 | 11 | } catch (Exception $e) { |
12 | - echo PHP_EOL . $e->getMessage(); |
|
12 | + echo PHP_EOL.$e->getMessage(); |
|
13 | 13 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('TYPO3_cliMode')) die('You cannot run this script directly!'); |
|
2 | +if (!defined('TYPO3_cliMode')) { |
|
3 | + die('You cannot run this script directly!'); |
|
4 | +} |
|
3 | 5 | |
4 | 6 | $crawlerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_crawler_lib'); |
5 | 7 |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('TYPO3_cliMode')) die('You cannot run this script directly!'); |
|
2 | +if (!defined('TYPO3_cliMode')) { |
|
3 | + die('You cannot run this script directly!'); |
|
4 | +} |
|
3 | 5 | |
4 | 6 | $crawlerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_crawler_lib'); |
5 | 7 | $crawlerObj->CLI_main_im($_SERVER["argv"]); |
@@ -37,29 +37,29 @@ |
||
37 | 37 | */ |
38 | 38 | class tx_crawler_cli extends \TYPO3\CMS\Core\Controller\CommandLineController { |
39 | 39 | |
40 | - /** |
|
41 | - * Constructor |
|
42 | - * |
|
43 | - * @return void |
|
44 | - */ |
|
45 | - function __construct() { |
|
46 | - parent::__construct(); |
|
40 | + /** |
|
41 | + * Constructor |
|
42 | + * |
|
43 | + * @return void |
|
44 | + */ |
|
45 | + function __construct() { |
|
46 | + parent::__construct(); |
|
47 | 47 | |
48 | - $this->cli_options[] = array('-h', 'Show the help', ''); |
|
49 | - $this->cli_options[] = array('--help', 'Same as -h', ''); |
|
50 | - $this->cli_options[] = array('--countInARun count', 'Amount of pages', 'How many pages should be crawled during that run.'); |
|
51 | - $this->cli_options[] = array('--sleepTime milliseconds', 'Millisecounds to relax system during crawls', 'Amount of millisecounds which the system should use to relax between crawls.'); |
|
52 | - $this->cli_options[] = array('--sleepAfterFinish seconds', 'Secounds to relax system after all crawls.', 'Amount of secounds which the system should use to relax after all crawls are done.'); |
|
48 | + $this->cli_options[] = array('-h', 'Show the help', ''); |
|
49 | + $this->cli_options[] = array('--help', 'Same as -h', ''); |
|
50 | + $this->cli_options[] = array('--countInARun count', 'Amount of pages', 'How many pages should be crawled during that run.'); |
|
51 | + $this->cli_options[] = array('--sleepTime milliseconds', 'Millisecounds to relax system during crawls', 'Amount of millisecounds which the system should use to relax between crawls.'); |
|
52 | + $this->cli_options[] = array('--sleepAfterFinish seconds', 'Secounds to relax system after all crawls.', 'Amount of secounds which the system should use to relax after all crawls are done.'); |
|
53 | 53 | |
54 | - // Setting help texts: |
|
55 | - $this->cli_help['name'] = 'crawler CLI interface -- Crawling the URLs from the queue'; |
|
56 | - $this->cli_help['synopsis'] = '###OPTIONS###'; |
|
57 | - $this->cli_help['description'] = ""; |
|
58 | - $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler\nWill trigger the crawler which starts to process the queue entires\n"; |
|
59 | - $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2010'; |
|
60 | - } |
|
54 | + // Setting help texts: |
|
55 | + $this->cli_help['name'] = 'crawler CLI interface -- Crawling the URLs from the queue'; |
|
56 | + $this->cli_help['synopsis'] = '###OPTIONS###'; |
|
57 | + $this->cli_help['description'] = ""; |
|
58 | + $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler\nWill trigger the crawler which starts to process the queue entires\n"; |
|
59 | + $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2010'; |
|
60 | + } |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']) { |
64 | - include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']); |
|
64 | + include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']); |
|
65 | 65 | } |
@@ -37,41 +37,41 @@ |
||
37 | 37 | */ |
38 | 38 | class tx_crawler_cli_im extends \TYPO3\CMS\Core\Controller\CommandLineController { |
39 | 39 | |
40 | - /** |
|
41 | - * Constructor |
|
42 | - * |
|
43 | - * @return void |
|
44 | - */ |
|
45 | - function __construct() { |
|
46 | - parent::__construct(); |
|
40 | + /** |
|
41 | + * Constructor |
|
42 | + * |
|
43 | + * @return void |
|
44 | + */ |
|
45 | + function __construct() { |
|
46 | + parent::__construct(); |
|
47 | 47 | |
48 | - // Adding options to help archive: |
|
49 | - /** |
|
50 | - * We removed the "proc" option as it seemd not to be working any more. But as the complete handling of the crawler has changed regarding the configuration |
|
51 | - * this is completely ok. Since configuration records were introduced to configure "what should be done" additionally to page ts the way to setup jobs |
|
52 | - * has drifted from selecting filtering processing instructions to selecting/filtering configuration keys (you can configure the processing instructions there). |
|
53 | - * This is also reflected in the backend modules and allows you a much clearer and powerful way to work with the crawler extension. |
|
54 | - */ |
|
55 | - // $this->cli_options[] = array('-proc listOfProcInstr', 'Comma list of processing instructions. These are the "actions" carried out when crawling and you must specify at least one. Depends on third-party extensions. Examples are "tx_cachemgm_recache" from "cachemgm" extension (will recache pages), "tx_staticpub_publish" from "staticpub" (publishing pages to static files) or "tx_indexedsearch_reindex" from "indexed_search" (indexes pages).'); |
|
56 | - // TODO: cleanup here! |
|
57 | - $this->cli_options[] = array('-d depth', 'Tree depth, 0-99', "How many levels under the 'page_id' to include."); |
|
58 | - $this->cli_options[] = array('-o mode', 'Output mode: "url", "exec", "queue"', "Specifies output modes\nurl : Will list URLs which wget could use as input.\nqueue: Will put entries in queue table.\nexec: Will execute all entries right away!"); |
|
59 | - $this->cli_options[] = array('-n number', 'Number of items per minute.', 'Specifies how many items are put in the queue per minute. Only valid for output mode "queue"'); |
|
60 | - $this->cli_options[] = array('-conf configurationkeys','List of Configuration Keys','A commaseperated list of crawler configurations'); |
|
61 | - # $this->cli_options[] = array('-v level', 'Verbosity level 0-3', "The value of level can be:\n 0 = all output\n 1 = info and greater (default)\n 2 = warnings and greater\n 3 = errors"); |
|
48 | + // Adding options to help archive: |
|
49 | + /** |
|
50 | + * We removed the "proc" option as it seemd not to be working any more. But as the complete handling of the crawler has changed regarding the configuration |
|
51 | + * this is completely ok. Since configuration records were introduced to configure "what should be done" additionally to page ts the way to setup jobs |
|
52 | + * has drifted from selecting filtering processing instructions to selecting/filtering configuration keys (you can configure the processing instructions there). |
|
53 | + * This is also reflected in the backend modules and allows you a much clearer and powerful way to work with the crawler extension. |
|
54 | + */ |
|
55 | + // $this->cli_options[] = array('-proc listOfProcInstr', 'Comma list of processing instructions. These are the "actions" carried out when crawling and you must specify at least one. Depends on third-party extensions. Examples are "tx_cachemgm_recache" from "cachemgm" extension (will recache pages), "tx_staticpub_publish" from "staticpub" (publishing pages to static files) or "tx_indexedsearch_reindex" from "indexed_search" (indexes pages).'); |
|
56 | + // TODO: cleanup here! |
|
57 | + $this->cli_options[] = array('-d depth', 'Tree depth, 0-99', "How many levels under the 'page_id' to include."); |
|
58 | + $this->cli_options[] = array('-o mode', 'Output mode: "url", "exec", "queue"', "Specifies output modes\nurl : Will list URLs which wget could use as input.\nqueue: Will put entries in queue table.\nexec: Will execute all entries right away!"); |
|
59 | + $this->cli_options[] = array('-n number', 'Number of items per minute.', 'Specifies how many items are put in the queue per minute. Only valid for output mode "queue"'); |
|
60 | + $this->cli_options[] = array('-conf configurationkeys','List of Configuration Keys','A commaseperated list of crawler configurations'); |
|
61 | + # $this->cli_options[] = array('-v level', 'Verbosity level 0-3', "The value of level can be:\n 0 = all output\n 1 = info and greater (default)\n 2 = warnings and greater\n 3 = errors"); |
|
62 | 62 | |
63 | - // Setting help texts: |
|
64 | - $this->cli_help['name'] = 'crawler CLI interface -- Submitting URLs to be crawled via CLI interface.'; |
|
65 | - $this->cli_help['synopsis'] = 'page_id ###OPTIONS###'; |
|
66 | - $this->cli_help['description'] = "Works as a CLI interface to some functionality from the Web > Info > Site Crawler module; It can put entries in the queue from command line options, return the list of URLs and even execute all entries right away without having to queue them up - this can be useful for immediate re-cache, re-indexing or static publishing from command line."; |
|
67 | - $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_im 7 -d=2 -conf=<configurationKey> -o=exec\nWill re-cache pages from page 7 and two levels down, executed immediately.\n"; |
|
68 | - $this->cli_help['examples'].= "/.../cli_dispatch.phpsh crawler_im 7 -d=0 -conf=<configurationKey> -n=4 -o=queue\nWill put entries for re-caching pages from page 7 into queue, 4 every minute.\n"; |
|
69 | - $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2009'; |
|
70 | - } |
|
63 | + // Setting help texts: |
|
64 | + $this->cli_help['name'] = 'crawler CLI interface -- Submitting URLs to be crawled via CLI interface.'; |
|
65 | + $this->cli_help['synopsis'] = 'page_id ###OPTIONS###'; |
|
66 | + $this->cli_help['description'] = "Works as a CLI interface to some functionality from the Web > Info > Site Crawler module; It can put entries in the queue from command line options, return the list of URLs and even execute all entries right away without having to queue them up - this can be useful for immediate re-cache, re-indexing or static publishing from command line."; |
|
67 | + $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_im 7 -d=2 -conf=<configurationKey> -o=exec\nWill re-cache pages from page 7 and two levels down, executed immediately.\n"; |
|
68 | + $this->cli_help['examples'].= "/.../cli_dispatch.phpsh crawler_im 7 -d=0 -conf=<configurationKey> -n=4 -o=queue\nWill put entries for re-caching pages from page 7 into queue, 4 every minute.\n"; |
|
69 | + $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2009'; |
|
70 | + } |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli_im.php']) { |
74 | - include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli_im.php']); |
|
74 | + include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli_im.php']); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | ?> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $this->cli_options[] = array('-d depth', 'Tree depth, 0-99', "How many levels under the 'page_id' to include."); |
58 | 58 | $this->cli_options[] = array('-o mode', 'Output mode: "url", "exec", "queue"', "Specifies output modes\nurl : Will list URLs which wget could use as input.\nqueue: Will put entries in queue table.\nexec: Will execute all entries right away!"); |
59 | 59 | $this->cli_options[] = array('-n number', 'Number of items per minute.', 'Specifies how many items are put in the queue per minute. Only valid for output mode "queue"'); |
60 | - $this->cli_options[] = array('-conf configurationkeys','List of Configuration Keys','A commaseperated list of crawler configurations'); |
|
60 | + $this->cli_options[] = array('-conf configurationkeys', 'List of Configuration Keys', 'A commaseperated list of crawler configurations'); |
|
61 | 61 | # $this->cli_options[] = array('-v level', 'Verbosity level 0-3', "The value of level can be:\n 0 = all output\n 1 = info and greater (default)\n 2 = warnings and greater\n 3 = errors"); |
62 | 62 | |
63 | 63 | // Setting help texts: |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->cli_help['synopsis'] = 'page_id ###OPTIONS###'; |
66 | 66 | $this->cli_help['description'] = "Works as a CLI interface to some functionality from the Web > Info > Site Crawler module; It can put entries in the queue from command line options, return the list of URLs and even execute all entries right away without having to queue them up - this can be useful for immediate re-cache, re-indexing or static publishing from command line."; |
67 | 67 | $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_im 7 -d=2 -conf=<configurationKey> -o=exec\nWill re-cache pages from page 7 and two levels down, executed immediately.\n"; |
68 | - $this->cli_help['examples'].= "/.../cli_dispatch.phpsh crawler_im 7 -d=0 -conf=<configurationKey> -n=4 -o=queue\nWill put entries for re-caching pages from page 7 into queue, 4 every minute.\n"; |
|
68 | + $this->cli_help['examples'] .= "/.../cli_dispatch.phpsh crawler_im 7 -d=0 -conf=<configurationKey> -n=4 -o=queue\nWill put entries for re-caching pages from page 7 into queue, 4 every minute.\n"; |
|
69 | 69 | $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2009'; |
70 | 70 | } |
71 | 71 | } |