add --symall and --altall as alternatives to +A + m manual fix + -X, -V, -K options

This commit is contained in:
Mattias Andrée 2012-10-11 22:29:26 +02:00
parent e600c3cb47
commit 024ca3965e
4 changed files with 36 additions and 16 deletions

View file

@ -82,12 +82,12 @@ the pony will be selected randomly from that set of ponies.
.B \-W, \-\-wrap \fIcolumn\fP .B \-W, \-\-wrap \fIcolumn\fP
The screen column where the message should be wrapped. The screen column where the message should be wrapped.
.TP .TP
.B \-A, \-\-all \fIcolumn\fP .B \-A, \-\-all
Show all ponies, MLP-FiM and non-MLP-FiM, in this case the first list are MLP:FiM List all pony files, MLP-FiM and non-MLP-FiM, in this case the first list are MLP:FiM
and the second are non-MLP-FiM. and the second are non-MLP-FiM.
.TP .TP
.B \+A, \+\+all \fIcolumn\fP .B \+A, \+\+all, \-\-symall, \-\-altall
Show both ponies names, including alternatives, these from MLP:FiM and non-MLP:FiM List all pony files, including alternatives names inside brackets, these from MLP:FiM and non-MLP:FiM
the first list are the MLP:FiM and the second one are non-MLP:FiM. the first list are the MLP:FiM and the second one are non-MLP:FiM.
.SH ENVIRONMENT .SH ENVIRONMENT
.TP .TP

View file

@ -84,12 +84,12 @@ aleatoriamente uno de este conjunto.
.B \-W, \-\-wrap \fIcolumna\fP .B \-W, \-\-wrap \fIcolumna\fP
El numero de columnas en el que será impreso el mensaje. El numero de columnas en el que será impreso el mensaje.
.TP .TP
.B \-A. \-\-all \fIcolumn\fP .B \-A. \-\-all
Muestra todos los ponis, tanto pertenecientes a MLP:FiM cono no pertenecientes a esta Lista todos los ponis, tanto pertenecientes a MLP:FiM cono no pertenecientes a esta
la primera lista son los pertenecientes a esta y la subsiguente los no pertenecientes. la primera lista son los pertenecientes a esta y la subsiguente los no pertenecientes.
.TP .TP
.B \+A, \+\+all \fIcolumn\fP .B \+A, \+\+all, \-\-symall, \-\-altall
Muestra todos los ponies incluyendo sus nombres alternativos, estos pertenecientes a Lista todos los ponis incluyendo sus nombres alternativos, estos pertenecientes a
MLP:FiM cono no pertenecientes, la primera lista seran los pertenecientes y la MLP:FiM cono no pertenecientes, la primera lista seran los pertenecientes y la
subsiguente los no pertenecientes. subsiguente los no pertenecientes.
.SH ENTORNO .SH ENTORNO

View file

@ -266,19 +266,21 @@ Just as @option{-L}, except it lists extra (non-MLP:FiM) ponies instead of stand
Prints a list of all balloon styles. Prints a list of all balloon styles.
@item -A @item -A
@itemx --balloonlist @itemx --all
@opindex @option{-A} @opindex @option{-A}
@opindex @option{--all} @opindex @option{--all}
@opindex @option{--all} List all ponies, MLP:FiM and non-MLP:FiM, in this case the first list are MLP:FiM
Show all ponies, MLP-FiM and non-MLP-FiM, in this case the first list are MLP:FiM and the second are non-MLP:FiM.
and the second are non-MLP-FiM.
@item +A @item +A
@itemx --balloonlist @itemx ++all
@itemx --symall
@itemx --altall
@opindex @option{+A} @opindex @option{+A}
@opindex @option{++all} @opindex @option{++all}
@opindex @option{++all} @opindex @option{--symall}
Show both ponies names, including alternatives, these from MLP:FiM and non-MLP:FiM @opindex @option{--altall}
List all ponies names, including alternatives, these from MLP:FiM and non-MLP:FiM
the first list are the MLP:FiM and the second one are non-MLP:FiM. the first list are the MLP:FiM and the second one are non-MLP:FiM.
@end table @end table

View file

@ -78,9 +78,23 @@ class Ponysay():
elif args.opts['-A'] is not None: self.list(); self.__extraponies(); self.list() elif args.opts['-A'] is not None: self.list(); self.__extraponies(); self.list()
elif args.opts['+A'] is not None: self.linklist(); self.__extraponies(); self.linklist() elif args.opts['+A'] is not None: self.linklist(); self.__extraponies(); self.linklist()
else: else:
## Emulate termial capabilities
if args.opts['-X'] is not None:
linuxvt = False
usekms = False
elif args.opts['-V'] is not None:
linuxvt = True
usekms = False
elif args.opts['-K'] is not None:
linuxvt = True
usekms = True
## Other extra features
self.__extraponies(args) self.__extraponies(args)
self.__bestpony(args) self.__bestpony(args)
self.__ucsremap(args) self.__ucsremap(args)
## The stuff
if args.opts['-q'] is not None: self.quote(args) if args.opts['-q'] is not None: self.quote(args)
else: self.print_pony(args) else: self.print_pony(args)
@ -2022,6 +2036,10 @@ opts.add_argumentless(['--quoters'])
opts.add_argumentless(['--onelist']) opts.add_argumentless(['--onelist'])
opts.add_argumentless(['++onelist']) opts.add_argumentless(['++onelist'])
opts.add_argumentless(['-X', '--256-colours', '--256colours', '--x-colours'])
opts.add_argumentless(['-V', '--tty-colours', '--ttycolours', '--vt-colours'])
opts.add_argumentless(['-K', '--kms-colours', '--kmscolours'])
opts.add_argumentless(['-h', '--help'], help = 'Print this help message.') opts.add_argumentless(['-h', '--help'], help = 'Print this help message.')
opts.add_argumentless(['-v', '--version'], help = 'Print the version of the program.') opts.add_argumentless(['-v', '--version'], help = 'Print the version of the program.')
opts.add_argumentless(['-l', '--list'], help = 'List pony names.') opts.add_argumentless(['-l', '--list'], help = 'List pony names.')
@ -2029,7 +2047,7 @@ opts.add_argumentless(['-L', '--symlist', '--altlist'], help =
opts.add_argumentless(['+l', '++list'], help = 'List non-MLP:FiM pony names.') opts.add_argumentless(['+l', '++list'], help = 'List non-MLP:FiM pony names.')
opts.add_argumentless(['+L', '++symlist', '++altlist'], help = 'List non-MLP:FiM pony names with alternatives.') opts.add_argumentless(['+L', '++symlist', '++altlist'], help = 'List non-MLP:FiM pony names with alternatives.')
opts.add_argumentless(['-A', '--all'], help = 'List all pony names.') opts.add_argumentless(['-A', '--all'], help = 'List all pony names.')
opts.add_argumentless(['+A', '++all'], help = 'List all pony names with alternatives.') opts.add_argumentless(['+A', '++all', '--symall', '--altall'], help = 'List all pony names with alternatives.')
opts.add_argumentless(['-B', '--bubblelist', '--balloonlist'], help = 'List balloon styles.') opts.add_argumentless(['-B', '--bubblelist', '--balloonlist'], help = 'List balloon styles.')
opts.add_argumentless(['-c', '--compact'], help = 'Compress messages.') opts.add_argumentless(['-c', '--compact'], help = 'Compress messages.')
opts.add_argumented( ['-W', '--wrap'], arg = 'COLUMN', help = 'Specify column where the message should be wrapped.') opts.add_argumented( ['-W', '--wrap'], arg = 'COLUMN', help = 'Specify column where the message should be wrapped.')