Next: , Up: Inner workings   [Contents][Index]


12.1 Pony anatomy

The pony files are simple raw output data that can be printed to the terminal, except it contains scalar variables. The pony images consists of white space, lower half blocks [U+2584], upper half blocks [U+2580] and ANSI colour sequences (CSI m), and, in TTY, colour value change sequences (OSI P).

Variables are recalled by putting the variable’s name between two dollar signs ($var$), and are stored by putting the variable’s name followed by the value between two dollar signs and with a equality sign between the name and the value ($var=value$). Variable names cannot include equality signs, but the value can; dollar signs can be used by placing an ESC character before the dollar sign.

There are three predefined variables: $$ (empty variable name), $\$ and $/$. $$ has a dollar sign ($) as its value, while $\$ and $/$ contains the characters for the link to the balloon directed in the same direction as the variable name’s slash.

Variables whose name begin with balloon are parsed as balloon inserts, it can be either balloon, balloonX, balloon,Y or balloonX,Y, whether X is the minimum width of the balloon and Y is the minimum height of the balloon. New in Ponysay 3.0 is that the X can also be an range of columns, it contains of two numbers, the preferable start column, from the column that variables is placedon, the other number is the minimum width of the balloon. The two values are separated either by a l, a r or a c. If l is used the the balloon is printed as normal, except that it if wrapping is enabled and the balloon whould exceed the wrapping column, the balloon continues to fill on its left, at most as much as the position value. If r is used, the balloon fills the its left first and then to its right. If c is used the balloon will try the fill on its left and right side equally.

Prior to version 2.1 the pony files were cow files used by cowsay, they are partial Perl-scripts that assign a value to a scalar variable named $the_cow. Cow files use a predefined scalar variable named $thoughts, these are used to create a link between the message and the pony. The message (and the balloon) itself was printed by cowsay and is not defined in the cow files.


Next: , Up: Inner workings   [Contents][Index]