Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
maandree committed Aug 21, 2012
2 parents fabeee4 + 194ddff commit ac6b4ef
Show file tree
Hide file tree
Showing 11 changed files with 319 additions and 72 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Version 2.2

Support for colours in the message.

Support custom balloon styles using the option '-b', '-B' will list all
available. This list depends on whether you are invoking `ponysay` or `ponythink`


Version 2.1.1

Expand Down
10 changes: 5 additions & 5 deletions balloons/cowsay.say
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ w:|
e: |

ww:<
ee:>
ee: >

nw: _
ne:_
Expand All @@ -19,7 +19,7 @@ nne:_
ssw:-
sse:-

nww:/
nee:\
sww:\
see:/
nww:/
nee: \
sww:\
see: /
8 changes: 4 additions & 4 deletions balloons/unicode.think
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ e: )
ww:(
ee: )

nw:)
ne:(
sw:)
se:(
nw:(
ne:)
sw:(
se:)

nnw:⁀
nne:⁀
Expand Down
6 changes: 5 additions & 1 deletion completion/bash-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _ponysay()
local cur prev words cword
_init_completion -n = || return

options='--version --help --list --altlist --pony --wrap --quote'
options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon'
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )

if [ $prev = "-f" ] || [ $prev = "--pony" ]; then
Expand All @@ -16,6 +16,10 @@ _ponysay()
quoters=$('/usr/bin/ponysay' --quoters)
COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) )

elif [ $prev = "-b" ] || [ $prev = "--balloon" ]; then
balloons=$('/usr/bin/ponysay' --balloonlist)
COMPREPLY=( $( compgen -W "$balloons" -- "$cur" ) )

elif [ $prev = "-W" ] || [ $prev = "--wrap" ]; then
cols=$(( `stty size | cut -d ' ' -f 2` - 10 ))
COMPREPLY=( $cols $(( $cols / 2 )) 100 60 )
Expand Down
9 changes: 6 additions & 3 deletions completion/fish-completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@

set -g ponies ('/usr/bin/ponysay' --onelist)
set -g quoters ('/usr/bin/ponysay' --quoters)
set -g balloons ('/usr/bin/ponysay' --balloonlist)


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 l --long-option list --description 'list pony files'
complete --command ponysay --short-option L --long-option altlist --description 'list pony files with alternatives'
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 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 q --long-option quote --arguments "$quoters" --no-files --description 'pony'
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 --arguments 'MESSAGE'

set -e ponies
set -e quoters

set -e balloons
8 changes: 5 additions & 3 deletions completion/zsh-completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
_shortopts=(
'-v[Show version and exit]'
'-h[Show this help and exit]'
'-l[list ponyfiles]'
'-L[list ponyfiles with alternatives]'
'-f[Select a pony (either a filename or a ponyname]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"'
'-l[list pony names]'
'-L[list pony names with alternatives]'
'-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)"'
'-q[Select ponies for MLP:FiM quotes]'
'-b[Selecy a balloon style]'
'-W[The screen column where the message should be wrapped]'
)
_arguments -s : \
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ INFODESC=\''My Little Ponies for your terminal'\'
SHELL='bash'

completions='completion/bash-completion.sh completion/fish-completion.fish completion/zsh-completion.zsh'
shareDirs='ponies ttyponies quotes'
shareDirs='ponies ttyponies quotes balloons'
manFiles='manuals/manpage.6 manuals/manpage.es.6'
licenseFiles='COPYING'

Expand Down
99 changes: 97 additions & 2 deletions manuals/ponysay.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ Show summary of options.
Show version of program.

@item -f PONY
@itemx --file PONY
@itemx --pony PONY
@cindex @command{-f}
@cindex @command{--file}
@cindex @command{--pony}
Specify the pony that should printed, this can either be a file name or a pony
name printed by @command{ponysay -l}. This option can be used multiple times to
Expand All @@ -145,8 +147,19 @@ If you have @command{util-say} installed, you can use .png-files as the
arguments for this options.

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 file
supersedes pony names.
to include a `@code{/}'. This is not longer required and any existing pony name
supersedes file names.

@item -b STYLE
@itemx --bubble STYLE
@itemx --balloon STYLE
@cindex @command{-b}
@cindex @command{--bubble}
@cindex @command{--balloon}
Specify the balloon style that should used, this can either be a file name or a
balloon name printed by @command{ponysay -B}. This option can be used multiple
times to specify a set of styles from which one will be selected randomly. If no
balloon style is specified a fallback style will be used.

@item -q [PONY...]
@itemx --quote [PONY...]
Expand Down Expand Up @@ -185,6 +198,12 @@ is installed the ponies which have quotes, i.e. can be used with the
(depending on the terminal.) This options differs from @command{-l} by
printing alternative names (symbolic links) inside brackets after their
target ponies.

@item -B
@itemx --balloonlist
@cindex @command{-B}
@cindex @command{--balloonlist}
Prints a list of all balloon styles.
@end table

If neither @command{-q} is used nor any @var{message} is specified, @command{ponysay}
Expand Down Expand Up @@ -800,6 +819,7 @@ but is still available at @url{https://github.com/maandree/kmsponies4ponysay}.
@menu
* Pony anatomy:: Anatomy of pony files.
* Pony quote infrastructure:: Pony quote infrastructure.
* Balloon style files:: Balloon style files.
* Printing in TTY with KMS:: Printing in TTY with KMS.
* Truncation:: Output truncation.
* Languages:: Selection of languages.
Expand Down Expand Up @@ -861,6 +881,77 @@ when compiled to @code{quotes}. The source quote files are indentical to the com
quote files, except that there name contains just the first pony.


@node Balloon style files
@section Balloon style files
@cindex balloon style files
@cindex bubble style files
@cindex @command{ponythink}

Balloon style files are located in the directory @code{balloons}, the ones ending with
@code{.say} applies to @command{ponysay} and the ones ending with @code{.think} applies
to @command{ponythink}.

Balloon style consists of 20 strings. Each string is definied on separate lines, by their
name and their value seperated with a colon (@code{name:value}), if the name is empty it
continues the last one new line in the value. Only 10 of the strings may be multilined:
@code{nw}, @code{nnw}, @code{n}, @code{nne}, @code{ne}, @code{sw}, @code{ssw}, @code{s}
@code{sse} and @code{se}.

The following strings are used, and must be definied in the files:
@table @option
@item \
The character for the link to the balloon directed as @code{\}.
@item /
The character for the link to the balloon directed as @code{/}.
@item ww
The beginning of the balloon's line where the message is located if and only if the
message contains only one line.
@item ee
The end of the balloon's line where the message is located if and only if the message
contains only one line.
@item nw
The top left corner of the balloon.
@item nnw
If both this string and the @code{'nne'} string fits between the top corners, this
is printed directly to the right of the top left corner.
@item n
The top edge of the balloon.
@item nne
If both this string and the @code{'nnw'} string fits between the top corners, this
is printed directly to the right of the top top corner.
@item ne
The top right corner of the balloon.
@item nee
The end of the balloon's line where the message's first line is located if and only
if the message contains more than one line.
@item e
The right edge of the balloon.
@item see
The end of the balloon's line where the message's last line is located if and only
if the message contains more than one line.
@item se
The bottom right corner of the balloon.
@item sse
If both this string and the @code{'ssw'} string fits between the bottom corners, this
is printed directly to the left of the bottom right corner.
@item s
The bottom edge of the balloon.
@item ssw
If both this string and the @code{'sse'} string fits between the bottom corners, this
is printed directly to the right of the bottom left corner.
@item sw
The bottom left corner of the balloon.
@item sww
The beginning of the balloon's line where the message's last line is located if and
only if the message contains more than one line.
@item w
The left edge of the balloon.
@item nww
The beginning of the balloon's line where the message's first line is located if and
only if the message contains more than one line.
@end table


@node Printing in TTY with KMS
@section Printing in TTY with KMS
@cindex tty
Expand Down Expand Up @@ -1043,6 +1134,10 @@ ANSI colour sequences in pony files are applied only to the pony image,
not the balloon link or the balloon itself.
@item
Support for colours in the message.
@item
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}
or @command{ponythink}
@end itemize

@heading Version 2.1.1
Expand Down
Binary file modified manuals/ponysay_front.xcf
Binary file not shown.
Loading

0 comments on commit ac6b4ef

Please sign in to comment.