Merge branch 'develop'

This commit is contained in:
Mattias Andrée 2012-08-22 16:39:25 +02:00
commit ce6609ca11
9 changed files with 165 additions and 31 deletions

View file

@ -15,6 +15,9 @@ Version 2.3
Pony symlink added: pinkieoink → oinkoinkoink Pony symlink added: pinkieoink → oinkoinkoink
Support for non-MLP:FiM ponies (known as extraponies),
although the directory is currently empty.
Version 2.2 Version 2.2

View file

@ -5,13 +5,17 @@ _ponysay()
local cur prev words cword local cur prev words cword
_init_completion -n = || return _init_completion -n = || return
options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon' options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon --file ++file ++pony ++list ++altlist'
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
if [ $prev = "-f" ] || [ $prev = "--pony" ]; then if [ $prev = "-f" ] || [ $prev = "--pony" ] || [ $prev = "--file" ]; then
ponies=$('/usr/bin/ponysay' --onelist) ponies=$('/usr/bin/ponysay' --onelist)
COMPREPLY=( $( compgen -W "$ponies" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$ponies" -- "$cur" ) )
elif [ $prev = "-F" ] || [ $prev = "++pony" ] || [ $prev = "++file" ]; then
extraponies=$('/usr/bin/ponysay' ++onelist)
COMPREPLY=( $( compgen -W "$extraponies" -- "$cur" ) )
elif [ $prev = "-q" ] || [ $prev = "--quote" ]; then elif [ $prev = "-q" ] || [ $prev = "--quote" ]; then
quoters=$('/usr/bin/ponysay' --quoters) quoters=$('/usr/bin/ponysay' --quoters)
COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) )

View file

@ -4,21 +4,26 @@
# Author: Elis Axelsson <etu AT elis DOT nu> # Author: Elis Axelsson <etu AT elis DOT nu>
set -g ponies ('/usr/bin/ponysay' --onelist) set -g ponies ('/usr/bin/ponysay' --onelist)
set -g xponies ('/usr/bin/ponysay' ++onelist)
set -g quoters ('/usr/bin/ponysay' --quoters) set -g quoters ('/usr/bin/ponysay' --quoters)
set -g balloons ('/usr/bin/ponysay' --balloonlist) set -g balloons ('/usr/bin/ponysay' --balloonlist)
## TODO: update with options [see info manual]: +l +L ++list ++altlist ++file --file ++pony
complete --command ponysay --short-option h --long-option help --description 'help of ponysay' complete --command ponysay --short-option h --long-option help --description 'help of ponysay'
complete --command ponysay --short-option v --long-option version --description 'version of ponysay' complete --command ponysay --short-option v --long-option version --description 'version of ponysay'
complete --command ponysay --short-option l --long-option list --description 'list pony names' complete --command ponysay --short-option l --long-option list --description 'list pony names'
complete --command ponysay --short-option L --long-option altlist --description 'list pony names with alternatives' complete --command ponysay --short-option L --long-option altlist --description 'list pony names with alternatives'
complete --command ponysay --short-option B --long-option balloonlist --description 'list balloon style names' complete --command ponysay --short-option B --long-option balloonlist --description 'list balloon style names'
complete --command ponysay --short-option f --long-option pony --arguments "$ponies" --description 'pony' complete --command ponysay --short-option f --long-option pony --arguments "$ponies" --description 'pony'
complete --command ponysay --short-option F --arguments "$xponies" --description 'extra pony'
complete --command ponysay --short-option q --long-option quote --arguments "$quoters" --description 'pony' complete --command ponysay --short-option q --long-option quote --arguments "$quoters" --description 'pony'
complete --command ponysay --short-option b --long-option balloon --arguments "$balloons" --description 'balloon style' complete --command ponysay --short-option b --long-option balloon --arguments "$balloons" --description 'balloon style'
complete --command ponysay --short-option W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped' complete --command ponysay --short-option W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped'
complete --command ponysay --arguments 'MESSAGE' complete --command ponysay --arguments 'MESSAGE'
set -e ponies set -e ponies
set -e xponies
set -e quoters set -e quoters
set -e balloons set -e balloons

View file

@ -4,8 +4,11 @@ _shortopts=(
'-h[Show this help and exit]' '-h[Show this help and exit]'
'-l[list pony names]' '-l[list pony names]'
'-L[list pony names with alternatives]' '-L[list pony names with alternatives]'
'+l[list extra pony names]'
'+L[list extra pony names with alternatives]'
'-B[list balloon style names]' '-B[list balloon style names]'
'-f[Select a pony (either a file name or a pony name]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"' '-f[Select a pony (either a file name or a pony name)]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"'
'-F[Select a extra pony]: :_path_files -W '/usr/share/ponysay/extraponies' -g "*(\:r)"'
'-q[Select ponies for MLP:FiM quotes]' '-q[Select ponies for MLP:FiM quotes]'
'-b[Selecy a balloon style]' '-b[Selecy a balloon style]'
'-W[The screen column where the message should be wrapped]' '-W[The screen column where the message should be wrapped]'

37
configure vendored
View file

@ -6,7 +6,7 @@ INFODESC=\''My Little Ponies for your terminal'\'
SHELL='bash' SHELL='bash'
completions='completion/bash-completion.sh completion/fish-completion.fish completion/zsh-completion.zsh' completions='completion/bash-completion.sh completion/fish-completion.fish completion/zsh-completion.zsh'
shareDirs='ponies ttyponies quotes balloons' shareDirs='ponies ttyponies quotes balloons extraponies extrattyponies'
manFiles='manuals/manpage.6 manuals/manpage.es.6' manFiles='manuals/manpage.6 manuals/manpage.es.6'
licenseFiles='COPYING' licenseFiles='COPYING'
@ -224,7 +224,7 @@ function makeMakefile()
echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/"' echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/"'
for dir in $shareDirs; do for dir in $shareDirs; do
echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/'"$dir"'"' echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/'"$dir"'"'
echo -en '\t' ; echo 'cp -P "'"$dir"'/"*.* "$(INSTALLDIR)/share/ponysay/'"$dir"'/"' echo -en '\t' ; echo 'cp -P "'"$dir"'/"* "$(INSTALLDIR)/share/ponysay/'"$dir"'/"'
done done
echo echo
echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/bin/"' echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/bin/"'
@ -360,15 +360,30 @@ EOF
ttyponies: ttyponies:
mkdir -p "ttyponies" mkdir -p "ttyponies"
for pony in \$\$(ls --color=no "ponies/"); do \\ for pony in \$\$(ls --color=no "ponies/"); do \\
echo "building ttypony: \$\$pony" ;\\ if [ 1 "\$\$pony" = '.info' ]; then \\
if [ "\`readlink "ponies/\$\$pony"\`" = '' ]; then \\ echo "building ttypony: \$\$pony" ;\\
ponysay2ttyponysay < "ponies/\$\$pony" | tty2colourfultty -c 1 > "ttyponies/\$\$pony" ;\\ if [ "\`readlink "ponies/\$\$pony"\`" = '' ]; then \\
git add "ttyponies/\$\$pony" ;\\ ponysay2ttyponysay < "ponies/\$\$pony" | tty2colourfultty -c 1 > "ttyponies/\$\$pony" ;\\
else \\ git add "ttyponies/\$\$pony" ;\\
ln -sf \`readlink "ponies/\$\$pony"\` "ttyponies/\$\$pony" ;\\ else \\
git add "ttyponies/\$\$pony" ;\\ ln -sf \`readlink "ponies/\$\$pony"\` "ttyponies/\$\$pony" ;\\
fi ;\\ git add "ttyponies/\$\$pony" ;\\
fi ;\\
fi ;\\
done
mkdir -p "extrattyponies"
for pony in \$\$(ls --color=no "extraponies/"); do \\
if [ 1 "\$\$pony" = '.info' ]; then \\
echo "building extrattypony: \$\$pony" ;\\
if [ "\`readlink "extraponies/\$\$pony"\`" = '' ]; then \\
ponysay2ttyponysay < "extraponies/\$\$pony" | tty2colourfultty -c 1 > "extrattyponies/\$\$pony" ;\\
git add "extrattyponies/\$\$pony" ;\\
else \\
ln -sf \`readlink "extraponies/\$\$pony"\` "extrattyponies/\$\$pony" ;\\
git add "extrattyponies/\$\$pony" ;\\
fi ;\\
fi ;\\
done done
pdfmanual: pdfmanual:

3
extraponies/info Normal file
View file

@ -0,0 +1,3 @@
Dummy file for this directory as it is otherwise empty.
Non-MLP:FiM ponies should be placed here.

3
extrattyponies/info Normal file
View file

@ -0,0 +1,3 @@
Dummy file for this directory as it is otherwise empty.
Non-MLP:FiM ttyponies should be placed here.

View file

@ -154,6 +154,15 @@ 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 to include a `@code{/}'. This is not longer required and any existing pony name
supersedes file names. supersedes file names.
@item -F
@itemx ++file PONY
@itemx ++pony PONY
@cindex @command{-F}
@cindex @command{++file}
@cindex @command{++pony}
Just as @command{-F}, but it uses extra (non-MLP:FiM) ponies instead of
standard (MLP:FiM) ponies
@item -b STYLE @item -b STYLE
@itemx --bubble STYLE @itemx --bubble STYLE
@itemx --balloon STYLE @itemx --balloon STYLE
@ -206,7 +215,7 @@ is installed the ponies which have quotes, i.e. can be used with the
(depending on the terminal.) (depending on the terminal.)
@item -L @item -L
@itemx --linklist @itemx --altlist
@cindex @command{-L} @cindex @command{-L}
@cindex @command{--altlist} @cindex @command{--altlist}
Lists all installed ponies. If the extension @command{ponyquotes4ponysay} Lists all installed ponies. If the extension @command{ponyquotes4ponysay}
@ -216,6 +225,20 @@ is installed the ponies which have quotes, i.e. can be used with the
printing alternative names (symbolic links) inside brackets after their printing alternative names (symbolic links) inside brackets after their
target ponies. target ponies.
@item +l
@itemx ++list
@cindex @command{+l}
@cindex @command{++list}
Just as @command{-l}, but it lists extra (non-MLP:FiM) ponies instead of
standard (MLP:FiM) ponies
@item +L
@itemx ++altlist
@cindex @command{+L}
@cindex @command{++altlist}
Just as @command{-L}, but it lists extra (non-MLP:FiM) ponies instead of
standard (MLP:FiM) ponies
@item -B @item -B
@itemx --balloonlist @itemx --balloonlist
@cindex @command{-B} @cindex @command{-B}
@ -1062,14 +1085,19 @@ and only use Python 3, which as been accomplished in version 2.1.
@cindex auto-completion, inner workings @cindex auto-completion, inner workings
@cindex shell, auto-completion @cindex shell, auto-completion
@cindex @command{--onelist} @cindex @command{--onelist}
@cindex @command{++onelist}
@cindex @command{--quoters} @cindex @command{--quoters}
To make it easier to write auto-completion for shells, @command{ponysay} supports To make it easier to write auto-completion for shells, @command{ponysay} supports
the two options @command{--onelist} and @command{--quoters}, which has not short the two options @command{--onelist}, @command{++onelist} and @command{--quoters},
versions. which has nt short versions.
Executing @command{ponysay --onelist} will list every available pony, Executing @command{ponysay --onelist} will list every available standard (MLP:FiM)
independent of where it is located, the output is a sorted and consists only pony, independent of where it is located, the output is a sorted and consists only
of one pony per line.
Executing @command{ponysay ++onelist} will list every available extra (non-MLP:FiM)
pony, independent of where it is located, the output is a sorted and consists only
of one pony per line. of one pony per line.
@command{ponysay --quoters} work just as @command{ponysay --onelist}, excepts @command{ponysay --quoters} work just as @command{ponysay --onelist}, excepts
@ -1229,13 +1257,20 @@ and as always regular files.)
@item @item
Support cowsay style message compression. Support cowsay style message compression.
@item @item
or @command{ponythink}
Pony symlink added: Pony symlink added:
@itemize @bullet @itemize @bullet
@item @code{pinkieoink} → @code{oinkoinkoink} @item @code{pinkieoink} → @code{oinkoinkoink}
@end itemize @end itemize
@item
Support for non-MLP:FiM ponies (known as extraponies), although the directory
is currently empty.
@c BEGIN the following is too descriptive for the plain/text change log
This is implemented with the options @code{-F}, @code{+l}, and @code{+L}
corresponding to @code{-f}, @code{-l}, and @code{-L}.
@c END
@end itemize @end itemize
@heading Version 2.2 @heading Version 2.2
@itemize @bullet @itemize @bullet
@ -1251,10 +1286,12 @@ Support custom balloon styles using the option @code{-b}, @code{-B} will list
all available. This list depends on whether you are invoking @command{ponysay} all available. This list depends on whether you are invoking @command{ponysay}
@end itemize @end itemize
@heading Version 2.1.1 @heading Version 2.1.1
Nothing worth mention. Nothing worth mention.
@heading Version 2.1 @heading Version 2.1
@itemize @bullet @itemize @bullet
@ -1278,6 +1315,7 @@ minimum size of balloon.
@c END @c END
@end itemize @end itemize
@heading Version 2.0 @heading Version 2.0
@itemize @bullet @itemize @bullet
@ -1289,12 +1327,14 @@ All Perl scripts and almost all Bash are reimplemented in one Python 3 script.
kmsponies4ponysay is included. kmsponies4ponysay is included.
@end itemize @end itemize
@heading Version 1.4.1 @heading Version 1.4.1
@itemize @bullet @itemize @bullet
@item @item
Code is repaired and more portable. Code is repaired and more portable.
@end itemize @end itemize
@heading Version 1.4 @heading Version 1.4
@itemize @bullet @itemize @bullet
@ -1304,6 +1344,7 @@ Make file is improved.
@b{Note}: Identifies itself as version 1.3 @b{Note}: Identifies itself as version 1.3
@heading Version 1.3 @heading Version 1.3
@itemize @bullet @itemize @bullet
@ -1320,6 +1361,7 @@ Pony symlink added:
the default value is @code{/usr} the default value is @code{/usr}
@end itemize @end itemize
@heading Version 1.2 @heading Version 1.2
@itemize @bullet @itemize @bullet
@ -1347,6 +1389,7 @@ file names including spaces.)
@b{Note}: Identifies itself as version 1.1 @b{Note}: Identifies itself as version 1.1
@heading Version 1.1 @heading Version 1.1
@itemize @bullet @itemize @bullet
@ -1395,6 +1438,7 @@ Support for extension: ponyquotes4ponysay.
Accepts arbitrary spaces in @command{-f} argument. Accepts arbitrary spaces in @command{-f} argument.
@end itemize @end itemize
@heading Version 1.0 @heading Version 1.0
@itemize @bullet @itemize @bullet
@ -1425,6 +1469,7 @@ Improved TTY support: ponies have low colours resolution, instead of monochrome,
when the high colour resolution is not available. when the high colour resolution is not available.
@end itemize @end itemize
@heading Version 0.10 @heading Version 0.10
@itemize @bullet @itemize @bullet
@ -1456,6 +1501,7 @@ Environment variables added: @code{PONYSAY_FULL_WIDTH}, @code{PONYSAY_SHELL_LINE
@code{PONYSAY_TRUNCATE_HEIGHT}, @code{PONYSAY_BOTTOM}. @code{PONYSAY_TRUNCATE_HEIGHT}, @code{PONYSAY_BOTTOM}.
@end itemize @end itemize
@heading Version 0.9 @heading Version 0.9
@itemize @bullet @itemize @bullet
@ -1475,6 +1521,7 @@ Support for TTY (Linux VT).
@code{sparkler}, @code{violet}. @code{sparkler}, @code{violet}.
@end itemize @end itemize
@heading Version 0.8 @heading Version 0.8
@itemize @bullet @itemize @bullet
@ -1504,6 +1551,7 @@ Support for TTY (Linux VT).
@b{Note}: Identifies itself as version 0.7 @b{Note}: Identifies itself as version 0.7
@heading Version 0.7 @heading Version 0.7
@itemize @bullet @itemize @bullet
@ -1514,6 +1562,7 @@ Support for TTY (Linux VT).
Support for listing ponies with @command{-l} option. Support for listing ponies with @command{-l} option.
@end itemize @end itemize
@heading Version 0.6 @heading Version 0.6
@itemize @bullet @itemize @bullet
@ -1526,6 +1575,7 @@ Dropping usage of utility @command{which}, using @command{hash} instead.
@b{Note}: Identifies itself as version 0.5 @b{Note}: Identifies itself as version 0.5
@heading Version 0.5 @heading Version 0.5
@itemize @bullet @itemize @bullet
@ -1533,6 +1583,7 @@ Dropping usage of utility @command{which}, using @command{hash} instead.
Using utility @command{which} to determine existence of @command{cowsay}. Using utility @command{which} to determine existence of @command{cowsay}.
@end itemize @end itemize
@heading Version 0.4 @heading Version 0.4
@itemize @bullet @itemize @bullet
@ -1548,6 +1599,7 @@ Select random pony if not specified.
@command{-f} supports file names, and not only pony names. @command{-f} supports file names, and not only pony names.
@end itemize @end itemize
@heading Version 0.3 @heading Version 0.3
@itemize @bullet @itemize @bullet
@ -1555,6 +1607,7 @@ Select random pony if not specified.
Fixed use of @code{.pony} files. Fixed use of @code{.pony} files.
@end itemize @end itemize
@heading Version 0.2 @heading Version 0.2
@itemize @bullet @itemize @bullet
@ -1569,6 +1622,7 @@ Pony files end with @code{.pony} instead of @code{.cow}.
@command{-h} prints proper help. @command{-h} prints proper help.
@end itemize @end itemize
@heading Version 0.1 @heading Version 0.1
First release. First release.

66
ponysay
View file

@ -55,7 +55,11 @@ class Ponysay():
elif args.opts['-l'] is not None: self.list() elif args.opts['-l'] is not None: self.list()
elif args.opts['-L'] is not None: self.linklist() elif args.opts['-L'] is not None: self.linklist()
elif args.opts['-B'] is not None: self.balloonlist() elif args.opts['-B'] is not None: self.balloonlist()
elif args.opts['++onelist'] is not None: self.__extraponies(); self.onelist()
elif args.opts['+l'] is not None: self.__extraponies(); self.list()
elif args.opts['+L'] is not None: self.__extraponies(); self.linklist()
else: else:
self.__extraponies(args)
self.__bestpony(args) self.__bestpony(args)
self.__ucsremap(args) self.__ucsremap(args)
if args.opts['-q'] is not None: self.quote(args) if args.opts['-q'] is not None: self.quote(args)
@ -63,9 +67,20 @@ class Ponysay():
## ##
## Auxiliary methods ## Methods that run before the mane methods
## ##
'''
Use extra ponies
'''
def __extraponies(self, args = None):
if args is None:
ponydirs[:] = extraponydirs
elif args.opts['-F'] is not None:
args.opts['-f'] = args.opts['-F']
ponydirs[:] = extraponydirs
''' '''
Use best.pony if nothing else is set Use best.pony if nothing else is set
''' '''
@ -118,6 +133,10 @@ class Ponysay():
args.opts[flag][i] = map[args.opts[flag][i]] args.opts[flag][i] = map[args.opts[flag][i]]
##
## Auxiliary methods
##
''' '''
Apply USC:ise pony names according to UCS settings Apply USC:ise pony names according to UCS settings
''' '''
@ -263,8 +282,6 @@ class Ponysay():
quoters = self.__quoters() quoters = self.__quoters()
for ponydir in ponydirs: # Loop ponydirs for ponydir in ponydirs: # Loop ponydirs
print('\033[1mponies located in ' + ponydir + '\033[21m')
_ponies = os.listdir(ponydir) _ponies = os.listdir(ponydir)
ponies = [] ponies = []
for pony in _ponies: for pony in _ponies:
@ -273,6 +290,10 @@ class Ponysay():
self.__ucsise(ponies) self.__ucsise(ponies)
ponies.sort() ponies.sort()
if len(ponies) == 0:
continue
print('\033[1mponies located in ' + ponydir + '\033[21m')
width = UCS.dispLen(max(ponies, key = UCS.dispLen)) + 2 # Get the longest ponyfilename lenght + 2 spaces width = UCS.dispLen(max(ponies, key = UCS.dispLen)) + 2 # Get the longest ponyfilename lenght + 2 spaces
x = 0 x = 0
@ -295,13 +316,16 @@ class Ponysay():
quoters = self.__quoters() quoters = self.__quoters()
for ponydir in ponydirs: # Loop ponydirs for ponydir in ponydirs: # Loop ponydirs
print('\033[1mponies located in ' + ponydir + '\033[21m')
_ponies = os.listdir(ponydir) _ponies = os.listdir(ponydir)
ponies = [] ponies = []
for pony in _ponies: for pony in _ponies:
if (len(pony) > 5) and (pony[-5:] == '.pony'): if (len(pony) > 5) and (pony[-5:] == '.pony'):
ponies.append(pony[:-5]) ponies.append(pony[:-5])
if len(ponies) == 0:
continue
print('\033[1mponies located in ' + ponydir + '\033[21m')
pseudolinkmap = {} pseudolinkmap = {}
self.__ucsise(ponies, pseudolinkmap) ##TODO self.__ucsise(ponies, pseudolinkmap) ##TODO
pairs = [] pairs = []
@ -1596,6 +1620,12 @@ Whether stderr is piped
pipelineerr = not sys.stderr.isatty() pipelineerr = not sys.stderr.isatty()
'''
Whether KMS is used
'''
usekms = Ponysay.isUsingKMS()
''' '''
Root share/ directories Root share/ directories
''' '''
@ -1607,17 +1637,27 @@ for sharedir in _sharedirs:
''' '''
The directories where pony files are stored, ttyponies/ are used if the terminal is Linux VT (also known as TTY) The directories where pony files are stored, ttyponies/ are used if the terminal is Linux VT (also known as TTY) and not with KMS
''' '''
ponydirs = [] ponydirs = []
_kms = Ponysay.isUsingKMS() if linuxvt and not usekms: _ponydirs = [d + 'ttyponies/' for d in sharedirs]
if linuxvt and not _kms: _ponydirs = [d + 'ttyponies/' for d in sharedirs] else: _ponydirs = [d + 'ponies/' for d in sharedirs]
else: _ponydirs = [d + 'ponies/' for d in sharedirs]
for ponydir in _ponydirs: for ponydir in _ponydirs:
if os.path.isdir(ponydir): if os.path.isdir(ponydir):
ponydirs.append(ponydir) ponydirs.append(ponydir)
'''
The directories where pony files are stored, extrattyponies/ are used if the terminal is Linux VT (also known as TTY) and not with KMS
'''
extraponydirs = []
if linuxvt and not usekms: _extraponydirs = [d + 'extrattyponies/' for d in sharedirs]
else: _extraponydirs = [d + 'extraponies/' for d in sharedirs]
for extraponydir in _extraponydirs:
if os.path.isdir(extraponydir):
extraponydirs.append(extraponydir)
''' '''
The directories where quotes files are stored The directories where quotes files are stored
''' '''
@ -1640,8 +1680,8 @@ for balloondir in _balloondirs:
usage_saythink = '\033[34;1m(ponysay | ponythink)\033[21;39m' usage_saythink = '\033[34;1m(ponysay | ponythink)\033[21;39m'
usage_common = '[-c] [-W \033[4mCOLUMN\033[24m] [-b \033[4mSTYLE\033[24m]' usage_common = '[-c] [-W \033[4mCOLUMN\033[24m] [-b \033[4mSTYLE\033[24m]'
usage_listhelp = '(-l | -L | -B | -v | -h)' usage_listhelp = '(-l | -L | -B | +l | +L | -v | -h)'
usage_file = '[-f \033[4mPONY\033[24m]... ([--] \033[4mmessage\033[24m | <<<\033[4mmessage\033[24m)' usage_file = '[(-f | -F) \033[4mPONY\033[24m]... ([--] \033[4mmessage\033[24m | <<<\033[4mmessage\033[24m)'
usage_quote = '-q [\033[4mPONY\033[24m...]' usage_quote = '-q [\033[4mPONY\033[24m...]'
usage = '%s %s\n%s %s %s\n%s %s %s' % (usage_saythink, usage_listhelp, usage = '%s %s\n%s %s %s\n%s %s %s' % (usage_saythink, usage_listhelp,
@ -1667,16 +1707,20 @@ run `man ponysay`. Ponysay has so much more to offer than described here.''')
opts.add_argumentless(['--quoters']) opts.add_argumentless(['--quoters'])
opts.add_argumentless(['--onelist']) opts.add_argumentless(['--onelist'])
opts.add_argumentless(['++onelist'])
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.')
opts.add_argumentless(['-L', '--altlist'], help = 'List pony names with alternatives.') opts.add_argumentless(['-L', '--altlist'], help = 'List pony names with alternatives.')
opts.add_argumentless(['+l', '++list'], help = 'List non-MLP:FiM pony names.')
opts.add_argumentless(['+L', '++altlist'], help = 'List non-MLP:FiM pony names with alternatives.')
opts.add_argumentless(['-B', '--balloonlist'], help = 'List balloon styles.') opts.add_argumentless(['-B', '--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 the column when the message should be wrapped.') opts.add_argumented( ['-W', '--wrap'], arg = 'COLUMN', help = 'Specify the column when the message should be wrapped.')
opts.add_argumented( ['-b', '--bubble', '--balloon'], arg = 'STYLE', help = 'Select a balloon style.') 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 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_variadic( ['-q', '--quote'], arg = 'PONY', help = 'Select a ponies which will quote themself.') opts.add_variadic( ['-q', '--quote'], arg = 'PONY', help = 'Select a ponies which will quote themself.')
opts.parse() opts.parse()