aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Lezaeta <prflr88@gmail.com>2012-07-18 20:56:23 -0400
committerPablo Lezaeta <prflr88@gmail.com>2012-07-18 20:56:23 -0400
commit69988d15bf728cddf773d812718caa81aacc344b (patch)
treeac0b9d9fe8d6c231cd97c55903d2c600583deda1
parent68d1e51d6c35897b0393ea145d222c35cec94bb8 (diff)
parent22c1fc020ab50fa18ba1a68d4165ed6b625e7fb7 (diff)
downloadponysay-69988d15bf728cddf773d812718caa81aacc344b.tar.gz
ponysay-69988d15bf728cddf773d812718caa81aacc344b.tar.bz2
ponysay-69988d15bf728cddf773d812718caa81aacc344b.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--README12
-rw-r--r--README.md6
-rw-r--r--manuals/ponysay.texinfo176
-rwxr-xr-xponysay6
4 files changed, 176 insertions, 24 deletions
diff --git a/README b/README
index 49891e1..11725d4 100644
--- a/README
+++ b/README
@@ -25,9 +25,9 @@ Required runtime dependencies
cowsay : this is a wrapper for cowsay
- coreutils : the main script [file: ponysay] uses stty, cut, ls, cat, sort, readlink, head and tail
+ coreutils : the main script [file: ponysay] uses stty, cut, ls, cat, sort, readlink, pwd, head and tail
- sed : used to remove .pony from pony named when running `ponysay -l` and `ponysay -L`
+ sed : used to remove .pony from pony names when running `ponysay -l` and `ponysay -L`
perl : required to run `ponysay -l` and `ponysay -L`
@@ -49,7 +49,7 @@ Package building dependencies
make : required to run the make script
- coreutils : make script uses install unlink rm ln mkdir cp
+ coreutils : make script uses install, unlink, rm, ln, mkdir and cp
Dependencies for pony providers
@@ -61,7 +61,7 @@ Dependencies for pony providers
bash : used in the ttyponies subscript
- util-say : used by `make ttyponies` to builder ttyponies from xterm ponies
+ util-say : used by `make ttyponies` to build ttyponies from xterm ponies
-- Available for Arch:ers in AUR as util-say-git (https://aur.archlinux.org/packages.php?ID=60241)
-- and on github at https://github.com/maandree/util-say
@@ -120,9 +120,9 @@ It is available at: https://github.com/maandree/ponyquotes4ponysay
https://aur.archlinux.org/packages.php?ID=60988
Run `ponysay -q` will give you a random pony saying one it its quote from MLP:FiM.
-Add one or more argument after `-q` to sepcify a set of ponies from which one will be selected randomly.
+Add one or more argument after `-q` to sepecify a set of ponies from which one will be selected randomly.
-When running `ponysay -l` or `ponysay -L` the ponies which have quotes will be printed bold or bright (depending on terminal
+When running `ponysay -l` or `ponysay -L` the ponies which have quotes will be printed bold or bright (depending on terminal).
Ponies in TTY (Linux VT)
diff --git a/README.md b/README.md
index bc9bf7a..36811f3 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ Now every time you open a terminal a pony should give your fortune
Installing [ponyquotes4ponysay](https://github.com/maandree/ponyquotes4ponysay) will enable My Little Pony quotes with associated pony.
-Run `ponysay -q` will give you a random pony saying one it its quote from MLP:FiM. Add one or more argument after `-q` to sepcify a
+Run `ponysay -q` will give you a random pony saying one it its quote from MLP:FiM. Add one or more argument after `-q` to sepecify a
set of ponies from which one will be selected randomly.
When running `ponysay -l` or `ponysay -L` the ponies which have quotes will be printed bold or bright (depending on terminal).
@@ -80,9 +80,9 @@ Dependencies
`cowsay`: this is a wrapper for cowsay
-`coreutils`: the main script uses stty, cut, ls, cat, sort, readlink, head and tail
+`coreutils`: the main script uses stty, cut, ls, cat, sort, readlink, pwd, head and tail
-`sed`: used to remove .pony from pony named when running `ponysay -l` and `ponysay -l`
+`sed`: used to remove .pony from pony names when running `ponysay -l` and `ponysay -l`
`perl`: required to run `ponysay -l` and `ponysay -L`
diff --git a/manuals/ponysay.texinfo b/manuals/ponysay.texinfo
index d25cfdf..00b77de 100644
--- a/manuals/ponysay.texinfo
+++ b/manuals/ponysay.texinfo
@@ -21,8 +21,8 @@ Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
-Texts. A copy of the license is included in the section entitled ``GNU
-Free Documentation License''.
+Texts. A copy of the license is included in the section entitled
+``GNU Free Documentation License''.
@end quotation
@end copying
@@ -49,15 +49,18 @@ Free Documentation License''.
@menu
* Overview:: Brief overview of @command{ponysay}.
* Invoking ponysay:: How to run @command{ponysay}.
+* Advanced usage:: Advanced usage of @command{ponysay}.
* Environment:: Environment variables.
-@c Extensions
* Limitations:: Limitations.
* Problems and requests:: Reports and requests.
+* Dependencies:: Dependencies.
* GNU Free Documentation License:: Copying and sharing this manual.
* Concept index:: Concept index.
@end menu
+
+
@node Overview
@chapter Overview
@cindex overview
@@ -70,6 +73,8 @@ is printed on standard output.
@command{ponythink} is to @command{ponysay} as @command{cowthink} is to @command{cowsay}.
+
+
@node Invoking ponysay
@chapter Invoking @command{ponysay}
@cindex invoking
@@ -138,6 +143,46 @@ If you want to use @command{ponysay} without arguments and enter the message
by hand, you can run @code{cat | ponysay}.
+
+@node Advanced usage
+@chapter Advanced usage of @command{ponysay}.
+@cindex advanced usage
+
+@cindex fortune
+If you have @command{fortune} installed -- this program may be named
+@command{fortune-mod} in your GNU/Linux distributions package reposity --
+you can run @code{fortune | ponysay} to get a random pony reading a
+random fortune cookie.
+
+@cindex on startup
+By adding @code{fortune | ponysay} to the end [easiest way] of your
+@code{~/.bashrc} -- or equivalent for your shell if use do not use GNU Bash
+(standard shell for most distributions now adays) -- you will get the
+effect described in the previous paragraph every time you open a terminal.
+
+@cindex tty
+@cindex linux vt
+If you use TTY and have a custom colour palette, you should also add to your
+@code{~/.bashrc}, before @code{fortune | ponysay}:
+@example
+[[ "$TERM" = "linux" ]] &&
+ function ponysay
+ @{ exec ponysay "$@@"
+ #RESET PALETTE HERE
+ @}
+@end example
+
+@cindex ponification
+@cindex ponypipe
+You can ponify text (i.e. replaces words search as ``everyone'' with ``everypony'')
+by using @code{fortune | ponypipe} instead of using @command{fortune}.
+@command{ponypipe} can be downloaded from @url{https://github.com/maandree/ponypipe}.
+Alternatively use can use @command{pinkie} (or @command{pinkiepie}), which can
+be downloaded from @url{https://github.com/maandree/pinkie-pie}, which is just
+@code{fortune | ponypipe}.
+Their is also a large sed script, similar to @command{ponypipe}: @url{http://www.reddit.com/r/mylittlelinux/comments/srixi/using_ponysay_with_a_ponified_fortune_warning/}
+
+
@node Environment
@chapter Environment variables
@cindex environment variables
@@ -176,30 +221,54 @@ are not running @command{ponysay} under TTY.
+
@node Limitations
@chapter Limitations
@cindex limitations
@menu
* Terminals:: Limitations on terminals.
-@c Cowsay
+* Cowsay:: Limitations on cowsay,
@end menu
+
@node Terminals
@section Terminals
-
Ponysay works perfectly on @command{xterm}, @command{xterm} like terminals including
@command{putty}, settings may however need to be customised for Unicode Character Set
(UCS) support, but less well, depending on font, on VTE based terminals including
@command{mate-terminal}.
-On Linux's native terminal Linux VT (or TTY) it works less well, and not good at all
-with Kernal Mode Settings (KMS) support. See @url{https://github.com/erkin/ponysay/issues/1}
-for more information.
+On Linux's native terminal Linux VT (TTY) it works less well, and not good at all with
+Kernal Mode Settings (KMS) support. See @url{https://github.com/erkin/ponysay/issues/1}
+for more information. @command{ponysay} clears the screen before printing to TTY, this
+is because if your graphics driver supports KMS, the colours will be messed by when the
+ponies position moves on the screen, this is also reason why the output is truncated on
+the height in TTY by default.
+
+Due to extreme limitations in @command{9term} @command{ponysay} will never be able to
+run on it.
+
+
+@node Cowsay
+@section Cowsay
+
+When @command{cowsay} determines the length of a word it measures in number of bytes
+(in UTF-8), therefore non-ascii words will malformat the balloon with the message.
+
+Further, @command{cowsay} does not recognise ANSI escape sequences, therefore, using
+colours and text styling in messages will also malformat the balloon with the message.
-Due to extreme limitations in @command{9term} @command{ponysay} will never be able
-to run on it.
+@command{cowsay} does not support balloon, including the link between the message and
+the pony, customisation, other than using @command{cowthink}. However you can modify
+@command{cowsay} (written perl, so you can edit the installed files) to make the balloon
+look different, maybe using box drawing characters.
+
+@cindex figlet
+@cindex tiolet
+@command{cowsay}'s word wrapping handles single line breaks as normal blankspaces,
+this messes up messaged created with programs seach as @command{figlet} and @command{TOIlet}.
@@ -208,9 +277,10 @@ to run on it.
@menu
* Problems:: Reporting bugs.
-* Requests:: Requestig ponies.
+* Requests:: Requesting ponies.
@end menu
+
@node Problems
@section Reporting bugs
@cindex bugs
@@ -221,8 +291,9 @@ present, please report it at @url{https://github.com/erkin/ponysay/issues}.
Please be as descriptive as possible, as it will help us verify it
solve it faster.
+
@node Requests
-@section Requestig ponies
+@section Requesting ponies
@cindex pony requests
If you want I specific pony added, ask us at @url{https://github.com/erkin/ponysay/issues}
@@ -230,6 +301,85 @@ and we will add it. To speed the up the process, if possible, supply good
pictures. Full visibly, transparent background, and pixelated are the
properties that makes a picture good.
+
+
+@node Dependencies
+@chapter Dependencies
+@cindex dependencies
+
+@menu
+* Required runtime dependencies:: Required runtime dependencies.
+* Optional runtime dependencies:: Optional runtime dependencies.
+* Package building dependencies:: Package building dependencies.
+* Dependencies for pony providers:: Dependencies for pony providers.
+@end menu
+
+
+@node Required runtime dependencies
+@section Required runtime dependencies
+
+@table @option
+@item bash
+Required for the main script [file: @command{ponysay}].
+@item cowsay
+This is a wrapper for @command{cowsay}.
+@item coreutils
+The main script [file: @command{ponysay}] uses @command{stty}, @command{cut},
+@command{ls}, @command{cat}, @command{sort}, @command{readlink}, @command{pwd},
+@command{head} and @command{tail}.
+@item sed
+Used to remove @code{.pony} from pony names when running @command{ponysay -l}
+and @command{ponysay -L}.
+@item perl
+Required to run @command{ponysay -l} and @command{ponysay -L}.
+@end table
+
+@node Optional runtime dependencies
+@section Optional runtime dependencies
+@cindex extensions
+@cindex ponyquotes4ponysay
+
+@table @option
+@item ponyquotes4ponysay
+For support of My Little Pony quotes with associated pony: the @code{-q} option.
+It can be downloaded at @url{https://github.com/maandree/ponyquotes4ponysay}.
+@end table
+
+
+@node Package building dependencies
+@section Package building dependencies
+
+@table @option
+@item gcc
+Used for compiling @command{ponysaytruncater.c}.
+@item gzip
+Used for compressing manpages.
+@item make
+Required to run the make script.
+@item coreutils
+The make script uses @command{install}, @command{unlink}, @command{rm}, @command{ln},
+@command{mkdir} and @command{cp}.
+@end table
+
+
+@node Dependencies for pony providers
+@section Dependencies for pony providers
+@cindex contributing
+
+@table @option
+@item make
+Required to run @command{make -B ttyponies`}.
+@item coreutils
+@command{ln} and @command{readlink} are used in the @command{ttyponies} subscript.
+@item bash
+Used in the ttyponies subscript.
+@item util-say
+Used by @command{make ttyponies} to build ttyponies from xterm ponies.
+It can be downloaded at @url{https://github.com/maandree/util-say}.
+@end table
+
+
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texinfo
@@ -238,5 +388,7 @@ properties that makes a picture good.
@appendix Concept index
@printindex cp
+
+
@bye
diff --git a/ponysay b/ponysay
index d7fb068..bacf1eb 100755
--- a/ponysay
+++ b/ponysay
@@ -210,12 +210,12 @@ say() {
if [ "$TERM" = "linux" ] || [ "$PONYSAY_TRUNCATE_HEIGHT" = 'yes' ] || [ "$PONYSAY_TRUNCATE_HEIGHT" = 'y' ] || [ "$PONYSAY_TRUNCATE_HEIGHT" = '1' ]; then
if [ "$PONYSAY_BOTTOM" = 'yes' ] || [ "$PONYSAY_BOTTOM" = 'y' ] || [ "$PONYSAY_BOTTOM" = '1' ]; then
- exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunctail
+ perl <(cat <(echo -e '#!/usr/bin/perl\nuse utf8;') $(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)) -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunctail
else
- exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunchead
+ perl <(cat <(echo -e '#!/usr/bin/perl\nuse utf8;') $(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)) -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunchead
fi
else
- exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc
+ perl <(cat <(echo -e '#!/usr/bin/perl\nuse utf8;') $(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)) -f "$pony" "${wrap:+-W$wrap}" | wtrunc
fi
}