コード例 #1
0
ファイル: gittool.php プロジェクト: jotttt/ttu-wiki
 /**
  * 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');
 }
コード例 #2
0
ファイル: dwpage.php プロジェクト: kevinlovesing/dokuwiki
 /**
  * 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');
 }
コード例 #3
0
ファイル: wantedpages.php プロジェクト: jotttt/ttu-wiki
 /**
  * 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);
 }