Added ability to select by Pokédex number, added git head revision to output comments, minor fixes

This commit is contained in:
Michiel Sikma
2014-08-26 21:40:57 +02:00
parent 3520b84ced
commit 804e6bd2e5
16 changed files with 328 additions and 58 deletions

View File

@@ -23,7 +23,7 @@ class Usage extends TemplateFormatter
'css-female-sel:', 'css-right-sel:', 'css-inline-sel:',
'css-block-sel:', 'path-pngcrush:', 'dir-pkmn:', 'dir-resources:',
'pkmn-lang:', 'lang:',
// For debugging purposes only (undocumented):
// Undocumented (debugging only):
'pkmn-range:',
);
/** @var string[] Arguments that may have a value. */
@@ -37,6 +37,8 @@ class Usage extends TemplateFormatter
'exclude-pkmn', 'exclude-shiny', 'exclude-regular', 'exclude-forms',
'exclude-icon-sets', 'verbose', 'monochrome', 'help', 'no-pngcrush',
'generate-markdown',
// Undocumented (debugging only):
'html-no-slugs',
);
/** @var mixed[] Settings parsed from the command-line options. */
@@ -115,6 +117,9 @@ class Usage extends TemplateFormatter
if ($arg == 'generate-markdown') {
$s['generate_markdown'] = true;
}
if ($arg == 'html-no-slugs') {
$s['html_no_slugs'] = true;
}
if ($arg == 'include-right') {
$val_int = intval($val);
if (!is_numeric($val) || $val_int < 0 || $val_int > 2) {
@@ -231,8 +236,8 @@ class Usage extends TemplateFormatter
}
$usage_vars = array(
'website' => Settings::get('copyright_website'),
'version' => Settings::get('version'),
'website' => Settings::get('website'),
'revision' => Settings::get('revision'),
'error' => $error_str,
'copyright' => (
Settings::get('copyright_str').