mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-25 13:57:59 +01:00
rename option -F to +f and --F and ++f
This commit is contained in:
parent
9365bc655c
commit
5fd404eef3
4 changed files with 22 additions and 22 deletions
|
@ -69,7 +69,7 @@ List non-MLP:FiM pony files with alternative names inside brackets.
|
|||
Select a pony (either a file name or a pony name), you can use this options multiple times,
|
||||
and one of the will be selected randomly.
|
||||
.TP
|
||||
.B \-F, \+\+file, \+\+pony \fIname\fP
|
||||
.B \+f, \+\+file, \+\+pony \fIname\fP
|
||||
Select a non-MLP:FiM pony (either a file name or a pony name), you can use this options
|
||||
multiple times, and one of the will be selected randomly.
|
||||
.TP
|
||||
|
|
|
@ -71,7 +71,7 @@ Lista los ponis no pertenecientes a MLP:FiM con nombres alternativos dentro de p
|
|||
Selecciona un poni específico (ya sea un archivo o el nombre directamente), puedes usar esta
|
||||
opción con múltiples ponis y de estos será elejído uno al azar.
|
||||
.TP
|
||||
.B \-F, \+\+file, \+\+pony \fInombre\fP
|
||||
.B \+f, \+\+file, \+\+pony \fInombre\fP
|
||||
Selecciona un poni no pertenecientes a MLP:FiM (ya sea un archivo o el nombre directamente),
|
||||
puedes usar esta opción con múltiples ponis y de estos será elejído uno al azar.
|
||||
.TP
|
||||
|
|
|
@ -172,13 +172,13 @@ In versions earlier than version 2.0, the if the pony were a file name it had to
|
|||
include a `@code{/}'. This is not longer required and any existing pony name
|
||||
supersedes file names.
|
||||
|
||||
@item -F PONY
|
||||
@item +f PONY
|
||||
@itemx ++file PONY
|
||||
@itemx ++pony PONY
|
||||
@opindex @option{-F}
|
||||
@opindex @option{+f}
|
||||
@opindex @option{++file}
|
||||
@opindex @option{++pony}
|
||||
Just as @option{-F}, but it uses extra (non-MLP:FiM) ponies instead of standard
|
||||
Just as @option{+f}, but it uses extra (non-MLP:FiM) ponies instead of standard
|
||||
(MLP:FiM) ponies
|
||||
|
||||
@item -q PONY
|
||||
|
@ -206,15 +206,15 @@ Variadic variant of @option{-f}, meaning that all arguments added after this one
|
|||
will parsed as an argument to this option. Additionally, those options are added
|
||||
to @option{-f}.
|
||||
|
||||
@item --F [PONY...]
|
||||
@item ++f [PONY...]
|
||||
@itemx ++files [PONY...]
|
||||
@itemx ++ponies [PONY...]
|
||||
@opindex @option{--F}
|
||||
@opindex @option{++f}
|
||||
@opindex @option{++files}
|
||||
@opindex @option{++ponies}
|
||||
Variadic variant of @option{-F}, meaning that all arguments added after this one
|
||||
Variadic variant of @option{+f}, meaning that all arguments added after this one
|
||||
will parsed as an argument to this option. Additionally, those options are added
|
||||
to @option{-F}.
|
||||
to @option{+f}.
|
||||
|
||||
An important feature of this options, is that you can but it in the end of the
|
||||
command line, without any argument to get a random non-MLP:FiM pony.
|
||||
|
@ -1948,7 +1948,7 @@ English, e.g. British English, as the base language.
|
|||
@item best.pony
|
||||
@cindex best.pony
|
||||
The pony you think is [the] best pony. It should be a symlink pony. It is a feature
|
||||
affecting the @option{-f}, @option{-F} and @option{-q} options.
|
||||
affecting the @option{-f}, @option{+f} and @option{-q} options.
|
||||
|
||||
@item pony symlink
|
||||
@itemx symlink pony
|
||||
|
|
24
ponysay.py
24
ponysay.py
|
@ -112,13 +112,13 @@ class Ponysay():
|
|||
ponydirs = vtponydirs if linuxvt and not usekms else xponydirs
|
||||
extraponydirs = extravtponydirs if linuxvt and not usekms else extraxponydirs
|
||||
|
||||
## Variadic variants of -f, -F and -q
|
||||
## Variadic variants of -f, +f and -q
|
||||
if args.opts['--f'] is not None:
|
||||
if args.opts['-f'] is not None: args.opts['-f'] += args.opts['--f']
|
||||
else: args.opts['-f'] = args.opts['--f']
|
||||
if args.opts['--F'] is not None:
|
||||
if args.opts['-F'] is not None: args.opts['-F'] += args.opts['--F']
|
||||
else: args.opts['-F'] = args.opts['--F']
|
||||
if args.opts['++f'] is not None:
|
||||
if args.opts['+f'] is not None: args.opts['+f'] += args.opts['++f']
|
||||
else: args.opts['+f'] = args.opts['++F']
|
||||
if args.opts['--q'] is not None:
|
||||
if args.opts['-q'] is not None: args.opts['-q'] += args.opts['--q']
|
||||
else: args.opts['-q'] = args.opts['--q']
|
||||
|
@ -157,8 +157,8 @@ class Ponysay():
|
|||
|
||||
## The stuff
|
||||
if args.opts['-q'] is not None:
|
||||
warn = (args.opts['-f'] is not None) or (args.opts['-F'] is not None)
|
||||
if (len(args.opts['-q']) == 1) and ((args.opts['-q'][0] == '-f') or (args.opts['-q'][0] == '-F')):
|
||||
warn = (args.opts['-f'] is not None) or (args.opts['+f'] is not None)
|
||||
if (len(args.opts['-q']) == 1) and ((args.opts['-q'][0] == '-f') or (args.opts['-q'][0] == '+f')):
|
||||
warn = True
|
||||
if args.opts['-q'][0] == '-f':
|
||||
args.opts['-q'] = args.files
|
||||
|
@ -166,7 +166,7 @@ class Ponysay():
|
|||
args.opts['-q'] += args.opts['-f']
|
||||
self.quote(args)
|
||||
if warn:
|
||||
printerr('-q cannot be used at the same time as -f or -F.')
|
||||
printerr('-q cannot be used at the same time as -f or +f.')
|
||||
elif not unrecognised:
|
||||
self.print_pony(args)
|
||||
else:
|
||||
|
@ -188,8 +188,8 @@ class Ponysay():
|
|||
## If extraponies are used, change ponydir to extraponydir
|
||||
if args is None:
|
||||
ponydirs[:] = extraponydirs
|
||||
elif args.opts['-F'] is not None:
|
||||
args.opts['-f'] = args.opts['-F']
|
||||
elif args.opts['+f'] is not None:
|
||||
args.opts['-f'] = args.opts['+f']
|
||||
ponydirs[:] = extraponydirs
|
||||
|
||||
|
||||
|
@ -2384,7 +2384,7 @@ usage_saythink = '\033[34;1m(ponysay | ponythink)\033[21;39m'
|
|||
usage_common = '[-c] [-W\033[4mCOLUMN\033[24m] [-b\033[4mSTYLE\033[24m]'
|
||||
usage_listhelp = '(-l | -L | -B | +l | +L | -v | -h)'
|
||||
usage_file = '[-f\033[4mPONY\033[24m]* [[--] \033[4mmessage\033[24m]'
|
||||
usage_xfile = '(-F\033[4mPONY\033[24m)* [[--] \033[4mmessage\033[24m]'
|
||||
usage_xfile = '(+f\033[4mPONY\033[24m)* [[--] \033[4mmessage\033[24m]'
|
||||
usage_quote = '(-q \033[4mPONY\033[24m)*'
|
||||
|
||||
usage = '%s %s\n%s %s %s\n%s %s %s\n%s %s %s' % (usage_saythink, usage_listhelp,
|
||||
|
@ -2438,10 +2438,10 @@ opts.add_argumentless(['-o', '--pony-only', '--ponyonly'], help =
|
|||
opts.add_argumented( ['-W', '--wrap'], arg = 'COLUMN', help = 'Specify column where the message should be wrapped.')
|
||||
opts.add_argumented( ['-b', '--bubble', '--balloon'], arg = 'STYLE', help = 'Select a balloon style.')
|
||||
opts.add_argumented( ['-f', '--file', '--pony'], arg = 'PONY', help = 'Select a pony.\nEither a file name or a pony name.')
|
||||
opts.add_argumented( ['-F', '++file', '++pony'], arg = 'PONY', help = 'Select a non-MLP:FiM pony.')
|
||||
opts.add_argumented( ['+f', '++file', '++pony'], arg = 'PONY', help = 'Select a non-MLP:FiM pony.')
|
||||
opts.add_argumented( ['-q', '--quote'], arg = 'PONY', help = 'Select a pony which will quote herself.')
|
||||
opts.add_variadic( ['--f', '--files', '--ponies'], arg = 'PONY')
|
||||
opts.add_variadic( ['--F', '++files', '++ponies'], arg = 'PONY')
|
||||
opts.add_variadic( ['++f', '++files', '++ponies'], arg = 'PONY')
|
||||
opts.add_variadic( ['--q', '--quotes'], arg = 'PONY')
|
||||
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue