예제 #1
0
    /**
     * Constructor
     */
    public function __construct()
    {
        // Running parent class constructor
        parent::__construct();
        $this->cleanerModules = (array) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules'];
        // Adding options to help archive:
        $this->cli_options[] = ['-r', 'Execute this tool, otherwise help is shown'];
        $this->cli_options[] = ['-v level', 'Verbosity level 0-3', 'The value of level can be:
  0 = all output
  1 = info and greater (default)
  2 = warnings and greater
  3 = errors'];
        $this->cli_options[] = ['--refindex mode', 'Mode for reference index handling for operations that require a clean reference index ("update"/"ignore")', 'Options are "check" (default), "update" and "ignore". By default, the reference index is checked before running analysis that require a clean index. If the check fails, the analysis is not run. You can choose to bypass this completely (using value "ignore") or ask to have the index updated right away before the analysis (using value "update")'];
        $this->cli_options[] = ['--AUTOFIX [testName]', 'Repairs errors that can be automatically fixed.', 'Only add this option after having run the test without it so you know what will happen when you add this option! The optional parameter "[testName]" works for some tool keys to limit the fixing to a particular test.'];
        $this->cli_options[] = ['--dryrun', 'With --AUTOFIX it will only simulate a repair process', 'You may like to use this to see what the --AUTOFIX option will be doing. It will output the whole process like if a fix really occurred but nothing is in fact happening'];
        $this->cli_options[] = ['--YES', 'Implicit YES to all questions', 'Use this with EXTREME care. The option "-i" is not affected by this option.'];
        $this->cli_options[] = ['-i', 'Interactive', 'Will ask you before running the AUTOFIX on each element.'];
        $this->cli_options[] = ['--filterRegex expr', 'Define an expression for preg_match() that must match the element ID in order to auto repair it', 'The element ID is the string in quotation marks when the text \'Cleaning ... in "ELEMENT ID"\'. "expr" is the expression for preg_match(). To match for example "Nature3.JPG" and "Holiday3.JPG" you can use "/.*3.JPG/". To match for example "Image.jpg" and "Image.JPG" you can use "/.*.jpg/i". Try a --dryrun first to see what the matches are!'];
        $this->cli_options[] = ['--showhowto', 'Displays HOWTO file for cleaner script.'];
        // Setting help texts:
        $this->cli_help['name'] = 'lowlevel_cleaner -- Analysis and clean-up tools for TYPO3 installations';
        $this->cli_help['synopsis'] = 'toolkey ###OPTIONS###';
        $this->cli_help['description'] = 'Dispatches to various analysis and clean-up tools which can plug into the API of this script. Typically you can run tests that will take longer than the usual max execution time of PHP. Such tasks could be checking for orphan records in the page tree or flushing all published versions in the system. For the complete list of options, please explore each of the \'toolkey\' keywords below:

  ' . implode('
  ', array_keys($this->cleanerModules));
        $this->cli_help['examples'] = '/.../cli_dispatch.phpsh lowlevel_cleaner missing_files -s -r
This will show you missing files in the TYPO3 system and only report back if errors were found.';
        $this->cli_help['author'] = 'Kasper Skaarhoej, (c) 2006';
    }
예제 #2
0
 /**
  * Constructor
  *
  * @return	void
  */
 function __construct()
 {
     parent::__construct();
     // Adding options to help archive:
     /**
      * 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
      * this is completely ok. Since configuration records were introduced to configure "what should be done" additionally to page ts the way to setup jobs
      * has drifted from selecting filtering processing instructions to selecting/filtering configuration keys (you can configure the processing instructions there).
      * This is also reflected in the backend modules and allows you a much clearer and powerful way to work with the crawler extension.
      */
     // $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).');
     // TODO: cleanup here!
     $this->cli_options[] = array('-d depth', 'Tree depth, 0-99', "How many levels under the 'page_id' to include.");
     $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!");
     $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"');
     $this->cli_options[] = array('-conf configurationkeys', 'List of Configuration Keys', 'A commaseperated list of crawler configurations');
     #		$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");
     // Setting help texts:
     $this->cli_help['name'] = 'crawler CLI interface -- Submitting URLs to be crawled via CLI interface.';
     $this->cli_help['synopsis'] = 'page_id ###OPTIONS###';
     $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.";
     $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";
     $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";
     $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2009';
 }
예제 #3
0
 /**
  * Constructor.
  *
  * Initializes the help parameters.
  *
  */
 public function __construct()
 {
     parent::__construct();
     // Setting help texts:
     $this->cli_help['name'] = 'solr -- Solr commands for TYPO3 installations';
     $this->cli_help['synopsis'] = 'command ###OPTIONS###';
     $this->cli_help['description'] = 'Dispatches to various Solr commands.';
     $this->cli_help['examples'] = "./cli_dispatch.phpsh solr updateConnections \nThis will update the Solr connections.";
     $this->cli_help['author'] = 'Ingo Renner';
 }
예제 #4
0
 /**
  * Return task
  *
  * @return \TYPO3\CMS\Scheduler\Task\AbstractTask
  */
 protected function getTask()
 {
     $taskId = (int) $this->cli->cli_argValue('-i');
     if ($this->cli->cli_isArg('-f') || $this->cli->cli_isArg('-s')) {
         $task = $this->scheduler->fetchTask($taskId);
     } else {
         $whereClause = 'uid = ' . $taskId . ' AND nextexecution != 0 AND nextexecution <= ' . $GLOBALS['EXEC_TIME'];
         list($task) = $this->scheduler->fetchTasksWithCondition($whereClause);
     }
     return $task;
 }
 /**
  * Constructor
  */
 public function tx_kesearch_cli()
 {
     // Running parent class constructor
     parent::__construct();
     // Setting help texts:
     $this->cli_help['name'] = 'ke_search Command Line Interface';
     $this->cli_help['synopsis'] = '###OPTIONS###';
     $this->cli_help['description'] = 'Start indexer for ke_search as CLI script';
     $this->cli_help['examples'] = '.../cli_dispatch.phpsh ke_search startIndexing';
     $this->cli_help['author'] = 'Andreas Kiefer, (c) 2010-2011';
 }
예제 #6
0
 /**
  * Constructor
  */
 public function direct_mail_cli()
 {
     // Running parent class constructor
     parent::__construct();
     // Setting help texts:
     $this->cli_help['name'] = 'direct_mail';
     $this->cli_help['synopsis'] = '###OPTIONS###';
     $this->cli_help['description'] = 'Invoke direct_mail e-mail distribution engine';
     $this->cli_help['examples'] = '/.../cli_dispatch.phpsh direct_mail [masssend]';
     $this->cli_help['author'] = 'Ivan Kartolo, (c) 2008';
     $this->cli_options[] = array('masssend', 'Invoke sending of mails!');
 }
예제 #7
0
 /**
  * constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (!defined('TYPO3_cliMode')) {
         die('Access denied: CLI only.');
     }
     $this->cli_options = array_merge($this->cli_options, array());
     $this->cli_help = array_merge($this->cli_help, array('name' => $this->prefixId, 'synopsis' => $this->extKey . ' command', 'description' => 'This script can flag all configured tables by feature flags.', 'examples' => 'typo3/cli_dispatch.phpsh ' . $this->extKey . ' [flagEntries]', 'author' => '(c) 2013 AOE GmbH <*****@*****.**>'));
     $this->conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
     $this->scheduler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Scheduler\\Scheduler');
     $this->service = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class)->get(Tx_FeatureFlag_Service::class);
 }
 /**
  * Constructor
  *
  * @return	void
  */
 function tx_crawler_cli_flush()
 {
     parent::__construct();
     // Adding options to help archive:
     $this->cli_options[] = array('-o mode', 'Output mode: "finished", "all", "pending"', "Specifies the type queue entries which is flushed in the process.");
     #		$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");
     // Setting help texts:
     $this->cli_help['name'] = 'crawler CLI interface -- Cleaning up the queue.';
     $this->cli_help['synopsis'] = 'page_id ###OPTIONS###';
     $this->cli_help['description'] = "Works as a CLI interface to some functionality from the Web > Info > Site Crawler module; It will remove queue entires and perform a cleanup.";
     $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_flush 5 -o=finished\nWill remove all finished queue-entries in the sub-branch of page 5\n";
     $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_flush 0 -o=all\nWill remove all queue-entries for every page\n";
     $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2009';
 }
예제 #9
0
 /**
  * Constructor
  *
  * @return	void
  */
 function __construct()
 {
     parent::__construct();
     $this->cli_options[] = array('-h', 'Show the help', '');
     $this->cli_options[] = array('--help', 'Same as -h', '');
     $this->cli_options[] = array('--countInARun count', 'Amount of pages', 'How many pages should be crawled during that run.');
     $this->cli_options[] = array('--sleepTime milliseconds', 'Millisecounds to relax system during crawls', 'Amount of millisecounds which the system should use to relax between crawls.');
     $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.');
     // Setting help texts:
     $this->cli_help['name'] = 'crawler CLI interface -- Crawling the URLs from the queue';
     $this->cli_help['synopsis'] = '###OPTIONS###';
     $this->cli_help['description'] = "";
     $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler\nWill trigger the crawler which starts to process the queue entires\n";
     $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2010';
 }
예제 #10
0
    /**
     * Constructor
     *
     * @todo Define visibility
     */
    public function __construct()
    {
        // Running parent class constructor
        parent::__construct();
        // Adding options to help archive:
        $this->cli_options[] = array('--redirect=[URL]', 'For toolkey "setBElock": The URL to which the redirection will occur.');
        // Setting help texts:
        $this->cli_help['name'] = 'lowlevel_admin -- Various functions for administration and maintenance of TYPO3 from the command line';
        $this->cli_help['synopsis'] = 'toolkey ###OPTIONS###';
        $this->cli_help['description'] = 'The \'toolkey\' keywords are:

  ' . implode('
  ', array_keys($this->adminModules));
        $this->cli_help['examples'] = '/.../cli_dispatch.phpsh lowlevel_admin setBElock --redirect=http://url_which_explains_why.com/';
        $this->cli_help['author'] = 'Kasper Skaarhoej, (c) 2009';
    }
예제 #11
0
 /**
  * Constructor
  */
 public function __construct()
 {
     // Running parent class constructor
     parent::__construct();
     // Setting help texts:
     $this->cli_help['name'] = 'Caretaker CLI-Testrunner';
     $this->cli_help['synopsis'] = 'update|get|wip|update-typo3-latest-version-list|help ###OPTIONS###';
     $this->cli_help['description'] = 'Class with basic functionality for CLI scripts';
     $this->cli_help['examples'] = '../cli_dispatch.phpsh caretaker update --root';
     $this->cli_help['author'] = 'Martin Ficzel, (c) 2008-2010';
     $this->cli_options[] = array('--root', 'update all beginning with Root Node');
     $this->cli_options[] = array('-R', 'Same as --root');
     $this->cli_options[] = array('--node', 'update all beginning with this NodeID');
     $this->cli_options[] = array('-N', 'Same as --node');
     $this->cli_options[] = array('-f', 'force Refresh of testResults');
     $this->cli_options[] = array('-r', 'Return status code');
     $this->cli_options[] = array('--options', 'Generic options for running tests, e.g. "timeout=10 reporting=off"');
     $this->cli_options[] = array('-o', 'Same as --options');
 }
예제 #12
0
파일: Import.php 프로젝트: xf-/l10nmgr-1
 /**
  * Constructor
  */
 function Import()
 {
     // Running parent class constructor
     parent::__construct();
     // Load the extension's configuration
     $this->extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['l10nmgr']);
     // Adding specific CLI options
     $this->cli_options[] = array('--task', 'The task to execute', "The values can be:\n  importString = Import a XML string\n  importFile = Import a XML file\n  preview = Generate a preview of the source from a XML string\n");
     $this->cli_options[] = array('--preview', 'Preview flag', "Set to 1 in case of preview, 0 otherwise. Defaults to 0.\n");
     $this->cli_options[] = array('--string', 'XML string', "XML string to import.\n");
     $this->cli_options[] = array('--file', 'Import file', "Path to the file to import. Can be XML or ZIP archive. If both XML string and import file are not defined, will import from FTP server (if defined).\n");
     $this->cli_options[] = array('--server', 'Server link', "Server link for the preview URL.\n");
     $this->cli_options[] = array('--importAsDefaultLanguage', 'Import as default language', "If set this setting will overwrite the default language during the import.\nThe values can be: \n TRUE = Content will be imported as default language.\n FALSE = Content will be imported as translation (default).\n");
     // Setting help texts
     $this->cli_help['name'] = 'Localization Manager importer';
     $this->cli_help['synopsis'] = '###OPTIONS###';
     $this->cli_help['description'] = 'Class with import functionality for l10nmgr';
     $this->cli_help['examples'] = "/.../cli_dispatch.phpsh l10nmgr_import --task=importFile --file=foo/bar/translation.xml\nOld syntax was preserved for backwards compatibility:\n/.../cli_dispatch.phpsh l10nmgr_import import|importPreview|preview CATXML serverlink";
     $this->cli_help['author'] = "Daniel Zielinski - L10Ntech.de, (c) 2008\nFrancois Suter - Cobweb, (c) 2011";
 }
예제 #13
0
파일: Export.php 프로젝트: danilovq/l10nmgr
 /**
  * Constructor
  */
 function Export()
 {
     // Running parent class constructor
     parent::__construct();
     // Adding options to help archive:
     $this->cli_options[] = array('--format', 'Format for export of translatable data', "The value can be:\n  CATXML = XML for translation tools (default)\n  EXCEL = Microsoft XML format \n");
     $this->cli_options[] = array('--config', 'Localization Manager configurations', "UIDs of the localization manager configurations to be used for export. Comma seperated values, no spaces.\nDefault is EXTCONF which means values are taken from extension configuration.\n");
     $this->cli_options[] = array('--target', 'Target languages', "UIDs for the target languages used during export. Comma seperated values, no spaces. Default is 0. In that case UIDs are taken from extension configuration.\n");
     $this->cli_options[] = array('--workspace', 'Workspace ID', "UID of the workspace used during export. Default = 0\n");
     $this->cli_options[] = array('--hidden', 'Do not export hidden contents', "The values can be: \n TRUE = Hidden content is skipped\n FALSE = Hidden content is exported. Default is FALSE.\n");
     $this->cli_options[] = array('--updated', 'Export only new/updated contents', "The values can be: \n TRUE = Only new/updated content is exported\n FALSE = All content is exported (default)\n");
     $this->cli_options[] = array('--check-exports', 'Check for already exported content', "The values can be: \n TRUE = Check if content has already been exported\n FALSE = Don't check, just create a new export (default)\n");
     $this->cli_options[] = array('--help', 'Show help', "");
     $this->cli_options[] = array('-h', 'Same as --help', "");
     // Setting help texts:
     $this->cli_help['name'] = 'Localization Manager exporter';
     $this->cli_help['synopsis'] = '###OPTIONS###';
     $this->cli_help['description'] = 'Class with export functionality for l10nmgr';
     $this->cli_help['examples'] = '/.../cli_dispatch.phpsh l10nmgr_export --format=CATXML --config=l10ncfg --target=tlangs --workspace=wsid --hidden=TRUE --updated=FALSE';
     $this->cli_help['author'] = 'Daniel Zielinski - L10Ntech.de, (c) 2009';
 }
 public function __construct()
 {
     // Set basic information about the script.
     $this->cli_help = array('name' => 'Command Line Interface for Goobi.Presentation', 'synopsis' => '###OPTIONS###', 'description' => 'Currently the only tasks available are "index" and "reindex".' . LF . 'Try "/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK" for more options.', 'examples' => '/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK -ARG1=VALUE1 -ARG2=VALUE2', 'options' => '', 'license' => 'GNU GPL - free software!', 'author' => 'Goobi. Digitalisieren im Verein e.V. <*****@*****.**>');
     // Run parent constructor.
     parent::__construct();
 }
 /**
  * Creates this object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->cli_help = array_merge($this->cli_help, array('name' => 'tx_t3deploy_dispatch', 'synopsis' => self::ExtKey . ' controller action ###OPTIONS###', 'description' => '', 'examples' => 'typo3/cli_dispatch.phpsh ' . self::ExtKey . ' database updateStructure', 'author' => '(c) 2010 AOE media GmbH <*****@*****.**>'));
 }
예제 #16
0
 /**
  * The constructor.
  */
 public function __construct()
 {
     setlocale(LC_NUMERIC, 'C');
     parent::__construct();
     $this->cli_help = array_merge($this->cli_help, $this->additionalHelp);
 }