/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { global $auth; global $conf; $auth = new auth_plugin_authplain(); $period = $conf['subscribe_time']; $options->setHelp("Massively sends pending subscription digests.\n" . "By default, sends every pending digest from the beginning of time. " . "An event must be older than \$conf['subscribe_time'] = {$period} sec " . "to be included in any digest."); $options->registerOption('cron', "Send all the pending emails aged between {$period} and " . 2 * $period . " seconds. Useful to be run from a cron scheduler.", 'c'); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp("Manage git repositories for DokuWiki and its plugins and templates.\n\n" . "\$> ./bin/gittool.php clone gallery template:ach\n" . "\$> ./bin/gittool.php repos\n" . "\$> ./bin/gittool.php origin -v"); $options->registerArgument('command', 'Command to execute. See below', true); $options->registerCommand('clone', 'Tries to install a known plugin or template (prefix with template:) via git. Uses the DokuWiki.org ' . 'plugin repository to find the proper git repository. Multiple extensions can be given as parameters'); $options->registerArgument('extension', 'name of the extension to install, prefix with \'template:\' for templates', true, 'clone'); $options->registerCommand('install', 'The same as clone, but when no git source repository can be found, the extension is installed via ' . 'download'); $options->registerArgument('extension', 'name of the extension to install, prefix with \'template:\' for templates', true, 'install'); $options->registerCommand('repos', 'Lists all git repositories found in this DokuWiki installation'); $options->registerCommand('*', 'Any unknown commands are assumed to be arguments to git and will be executed in all repositories ' . 'found within this DokuWiki installation'); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp('Updates the searchindex by indexing all new or changed pages. When the -c option is ' . 'given the index is cleared first.'); $options->registerOption('clear', 'clear the index before updating', 'c'); $options->registerOption('force', 'force the index rebuilding, skip date check', 'f'); $options->registerOption('namespace', 'Only update items in namespace', 'n', true); $options->registerOption('quiet', 'don\'t produce any output', 'q'); $options->registerOption('id', 'only update specific id', 'i', true); $options->registerOption('remove-locks', 'remove any locks on the indexer', 'l'); $options->registerOption('max-runs', 'Restart after indexing n items', 'r', true); $options->registerOption('start', 'start at offset', 's', true); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp( 'Updates the searchindex by indexing all new or changed pages. When the -c option is '. 'given the index is cleared first.' ); $options->registerOption( 'clear', 'clear the index before updating', 'c' ); $options->registerOption( 'force', 'force the index rebuilding, skip date check', 'f' ); $options->registerOption( 'namespace', 'Only update items in namespace', 'n', true // needs arg ); $options->registerOption( 'quiet', 'don\'t produce any output', 'q' ); $options->registerOption( 'id', 'only update specific id', 'i', true // needs arg ); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { /* global */ $options->registerOption('force', 'force obtaining a lock for the page (generally bad idea)', 'f'); $options->registerOption('user', 'work as this user. defaults to current CLI user', 'u', 'username'); $options->setHelp('Utility to help command line Dokuwiki page editing, allow ' . 'pages to be checked out for editing then committed after changes'); /* checkout command */ $options->registerCommand('checkout', 'Checks out a file from the repository, using the wiki id and obtaining ' . 'a lock for the page. ' . "\n" . 'If a working_file is specified, this is where the page is copied to. ' . 'Otherwise defaults to the same as the wiki page in the current ' . 'working directory.'); $options->registerArgument('wikipage', 'The wiki page to checkout', true, 'checkout'); $options->registerArgument('workingfile', 'How to name the local checkout', false, 'checkout'); /* commit command */ $options->registerCommand('commit', 'Checks in the working_file into the repository using the specified ' . 'wiki id, archiving the previous version.'); $options->registerArgument('workingfile', 'The local file to commit', true, 'commit'); $options->registerArgument('wikipage', 'The wiki page to create or update', true, 'commit'); $options->registerOption('message', 'Summary describing the change (required)', 'm', 'summary', 'commit'); $options->registerOption('trivial', 'minor change', 't', false, 'commit'); /* lock command */ $options->registerCommand('lock', 'Obtains or updates a lock for a wiki page'); $options->registerArgument('wikipage', 'The wiki page to lock', true, 'lock'); /* unlock command */ $options->registerCommand('unlock', 'Removes a lock for a wiki page.'); $options->registerArgument('wikipage', 'The wiki page to unlock', true, 'unlock'); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp('Updates the searchindex by indexing all new or changed pages. When the -c option is ' . 'given the index is cleared first.'); $options->registerOption('clear', 'clear the index before updating', 'c'); $options->registerOption('quiet', 'don\'t produce any output', 'q'); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp('Remove all languages from the installation, besides the ones specified. English language ' . 'is never removed!'); $options->registerOption('keep', 'Comma separated list of languages to keep in addition to English.', 'k'); $options->registerOption('english-only', 'Remove all languages except English', 'e'); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp('Outputs a list of wanted pages (pages which have internal links but do not yet exist).'); $options->registerArgument('namespace', 'The namespace to lookup. Defaults to root namespace', false); }
/** * Register options and arguments on the given $options object * * @param DokuCLI_Options $options * @return void */ protected function setup(DokuCLI_Options $options) { $options->setHelp('A simple commandline tool to render some DokuWiki syntax with a given renderer.' . "\n\n" . 'This may not work for plugins that expect a certain environment to be ' . 'set up before rendering, but should work for most or even all standard ' . 'DokuWiki markup'); $options->registerOption('renderer', 'The renderer mode to use. Defaults to xhtml', 'r', 'mode'); }