aboutsummaryrefslogtreecommitdiff
path: root/manuals/ponysay.texinfo
blob: 5033ca74f7d19b816d40e8d65a8e054c10cc002a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
\input texinfo   @c -*-texinfo-*-

@c %**start of header
@setfilename ponysay.info
@settitle Ponysay
@afourpaper
@documentencoding UTF-8
@documentlanguage en
@finalout
@c %**end of header
@set VERSION 1.1

@copying
This manual is for ponysay
(version @value{VERSION}),

Copyright @copyright{} 2012 Mattias Andrée

@quotation
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''.
@end quotation
@end copying

@ifnottex
@node Top
@top Ponysay: ponies for your terminal
@insertcopying
@end ifnottex

@titlepage
@title Ponysay
@subtitle A cowsay wrapper for ponies.
@subtitle Covers ponysay version @value{VERSION}.
@author by Mattias Andrée

@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@contents


@menu
* Overview::                            Brief overview of @command{ponysay}.
* Invoking ponysay::                    How to run @command{ponysay}.
* Advanced usage::                      Advanced usage of @command{ponysay}.
* Environment::                         Environment variables.
* Limitations::                         Limitations.
* Problems and requests::               Reports and requests.
* Dependencies::                        Dependencies.
* Installing::                          Installing.
* Extensions::                          Extensions.
@c Inner workings->Pony anatomy
* Contributing::                        Contributing.
* Ponysay constributors::               Ponysay constributors.
* Ponysay license::                     Ponysay license.
* GNU Free Documentation License::      Copying and sharing this manual.
* Concept index::                       Concept index.
@end menu




@node Overview
@chapter Overview
@cindex overview

@command{ponysay} displays an image of a My Little Pony pony saying some text provided
by the user in a terminal. It is a wrapper for @command{cowsay}. If message is not
provided, e.g. by piping, it accepts standard input. The pony saying the given message
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
@cindex options
@cindex arguments
@cindex ponythink

The format for running the @command{ponysay} program is:

@example
ponysay [@var{option}@dots{}] [@var{message}]
ponythink [@var{option}@dots{}] [@var{message}]
@end example

Running @command{ponysay} will print a speech balloon,
@command{ponythink} will print a thought balloon.
Otherwise @command{ponysay} and @command{ponythink} is the same thing.

@command{ponysay} supports the following options:

@table @option

@item -h
Show summary of options.

@item -v
Show version of program.

@item -f PONY
Specify the pony that should printed, this can either be a file name or
a pony name printed by @command{ponysay -l}. If it is a file name with
a relative path and does not include a `@code{/}', it must begin with
`@code{./}', this is a @command{cowsay} issue. This option can be used
multiple times to specify a set of ponies from which one will be selected
randomly. If no pony is specified one will be selected randomly.

@item -q [PONY...]
This option requires the extension @command{ponyquotes4ponysay}. By using
this option, a pony will be printed with quotes from her in My Litte Pony:
Friendship is Magic. The pony will be selected randomly, at least one pony
is added as an argument after @command{-q}.

@item -W COLUMN
Specify the screen column where the message should be wrapped,
this is by default 40, which is inherited from @command{cowsay}.

@item -l
Lists all installed ponies. If the extension @command{ponyquotes4ponysay}
is installed the ponies which have quotes, i.e. can be used with the
@command{-q} option, will be mark by being printed in bold or bright
(depending on the terminal.)

@item -L
Lists all installed ponies. If the extension @command{ponyquotes4ponysay}
is installed the ponies which have quotes, i.e. can be used with the
@command{-q} option, will be mark by being printed in bold or bright
(depending on the terminal.) This options differs from @command{-l} by
printed symonym ponies (symbolic links) inside brackes after their
target ponies.
@end table

If neither @command{-q} is used nor any @var{message} is specified, @command{ponysay}
will read the message from stdin (standard input); however, if no arguments
are used that nothing is piped to stdin, a help message will be printed.
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

@menu
* Fortune cookies::     Displaying with fortune cookies.
* Ponification::        Ponify your fortune cookies.
* Running on TTY::      Running on TTY (Linux VT).
* Running on screen::   Running on @command{screen}.
@end menu


@node Fortune cookies
@section Fortune cookies
@cindex fortune
@cindex on startup

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.

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.


@node Ponification
@section Ponification
@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 Running on TTY
@section Running on TTY
@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


@node Running on screen
@section Running on @command{screen}
@cindex screen

@command{screen} will adapt ASNI colour escape sequencies to your terminals
capabilities. This means that is your terminal reports itself as @code{xterm}
in @code{$TERM} it ponies will lose colours; they will only use the lower 16
colours instread of the top 240 colours. By default, almost all X terminal,
including @command{xterm} and @command{mate-terminal} reports themself as
@code{xterm} in @code{$TERM}, and some reports their actual name in @code{$COLORTERM}.
So before openning @command{screen} you use set @code{$TERM} to @code{xterm-256colour},
if you are using a terminal with support for @code{xterm}'s 256 colours; this
can be done by adding to your @code{~/.bashrc}:
@example
[[ "$TERM" = "xterm" ]] &&
    function screen
    @{   export TERM="xterm-256color"
        exec screen "$@@"
    @}
@end example



@node Environment
@chapter Environment variables
@cindex environment variables
@cindex truncation

@command{ponysay} supports the follow environment variables:

@table @option
@item PONYSAY_BOTTOM
@cindex PONYSAY_BOTTOM
@cindex tty
Under TTY (Linux VT), if the output is larger the the screen's height, only
the beginning is printed, leaving two blank lines. If you want the buttom
to be printed rather the the beginning you can export @code{PONYSAY_BOTTOM}
with the value @code{yes}, @code{y} or @code{1}.

@item PONYSAY_SHELL_LINES
@cindex PONYSAY_SHELL_LINES
@cindex tty
Under TTY (Linux VT), if the output is larger the the screen's height, two
lines are left blank. If you want more, or less, blank lines you can export
@code{PONYSAY_SHELL_LINES} with the value of how many blank lines you want.
Naturally this takes effect if the output is not actually larger than the
screen.
 
@item PONYSAY_FULL_WIDTH
@cindex PONYSAY_FULL_WIDTH
You can export @code{PONYSAY_FULL_WIDTH} with the value @code{yes}, @code{y}
or @code{1}, if you do not want the output to be truncated on the width to
fit the terminal.

@item PONYSAY_TRUNCATE_HEIGHT
@cindex PONYSAY_TRUNCATE_HEIGHT
Export @code{PONYSAY_TRUNCATE_HEIGHT} with the value @code{yes}, @code{y}
or @code{1}, if you want to truncate the output on the height even if you
are not running @command{ponysay} under TTY.

@item PONYSAY_COWSAY
@item PONYSAY_COWTHINK
@cindex PONYSAY_COWSAY
@cindex PONYSAY_COWTINK
@cindex custom cowsay
@cindex replace cowsay
If you want to use another program than @command{cowsay} (the first
@command{cowsay} found in @code{$PATH}), you can export @code{PONYSAY_COWSAY}
with the value of that program. If, and only if, @code{PONYSAY_COWSAY} does
not have any value, @command{cowsay} is patch with @code{use utf8;} to the
beginning. The @code{use utf8;} patch is introduced to make it easier to
customise cowsay.

@code{PONYSAY_COWTHINK} will be used instead of @code{PONYSAY_COWSAY} if
you run @command{ponythink}.
@end table




@node Limitations
@chapter Limitations
@cindex limitations

@menu
* Terminals::           Limitations on terminals.
* 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 (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.

Most terminals have support for 256 colours, we do however only use the top 240 colours;
this is because the lower 16 colours are usally, in contrast to the top 240, customised.
We assume that the top 240 colours have their standard values. In TTY with KMS support
we dot have any actual (except for @math{2^{24}} + full transparency.)


@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.

@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.

@command{cowsay} does support setting the minimum size of the balloon, both directions
on the balloon–pony links. or any other placement of the balloon than at the top to
the left.

@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}.



@node Problems and requests
@chapter Problems and requests

@menu
* Problems::           Reporting bugs.
* Requests::           Requesting ponies.
@end menu


@node Problems
@section Reporting bugs
@cindex bugs

If you find a bug in @command{ponysay}, install the last version
from @url{https://github.com/erkin/ponysay}, and if it is still
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 Requesting ponies
@cindex pony requests

If you want I specific pony added, ask us at @url{https://github.com/erkin/ponysay/issues}
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
@cindex optional 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 optional dependencies
@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 Installing
@chapter Installing
@cindex installing
@cindex make

Before installing @command{ponysay}, make sure your system have the packages listed under
@ref{Required runtime dependencies} and @ref{Package building dependencies} installed.

Tarballs can be downloaded at @url{https://github.com/erkin/ponysay/tarball/master}
for bleeding edge, or from @url{https://github.com/erkin/ponysay/tags} for releases.

If you have @command{git} you @command{clone} the project URL
@url{https://github.com/erkin/ponysay.git}.

In the terminal,@command{cd} into the ponysay directory and execute
@command{make && make install}. This will install @command{ponysay} into the
@code{/usr}, meaning you may need to run @command{make install} as root,
e.g. by running @command{sudo make install}.

Now you will be to use ponysay, run: @command{ponysay "I am just the cutest pony!"},
or if have a specific pony in your mind: @command{ponysay -f pinkie "Partay!~"}.

@command{ponysay} comes with a manpage in section 6, @command{man 6 ponysay}
(or just @command{man ponysay}). The man page is also available in Spanish:
@command{man -L es 6 ponysay}.



@node Extensions
@chapter Extensions
@cindex extensions
@cindex optional dependencies

Ponysay does not support extensions, per se, but rather have optional features that
are enabled when other packages are installed.

@menu
* ponyquotes4ponysay::            ponyquotes4ponysay
@end menu

@node ponyquotes4ponysay
@section ponyquotes4ponysay
@cindex ponyquotes4ponysay

@command{ponyquotes4ponysay} is a package that adds support for MLP:FiM quotes that are
displayed with the associated ponies. See @ref{Invoking ponysay} for more information.
@command{ponyquotes4ponysay} can be downloaded at
@url{https://github.com/maandree/ponyquotes4ponysay}.



@node Contributing
@chapter Contributing

@menu
* Providing ponies::            Providing ponies
@end menu

@node Providing ponies
@section Providing ponies
@cindex create pony file

Most pony images are browser ponies or desktop ponies, browser ponies is a port of
desktop ponies, implementing it in JavaScript. Browser ponies are available at
@url{https://github.com/panzi/Browser-Ponies}. Desktop ponies are available at
@url{http://desktop-pony-team.deviantart.com/}.

There is also a collection of ponies that are not yet pixelated in a Java reimplementation:
@url{https://github.com/maandree/unisay/tree/develop/dev/newponies}
@*

New ponies can be created from regular images by using util-say, which is available
at @url{https://github.com/maandree/util-say}.
@command{img2xterm} (@url{https://github.com/rossy2401/img2xterm}) was used earlier,
but util-say tries do optimise the images in some aspects: as good as possible for
low capability terminals, tries to place the pony–balloon link, displayed as good as
possible when marked in the terminal (somewhat compromised by the first aspect,) and
same width on all rows.

Using util-say:
@example
img2ponysay -2 -- SOURCE_IMAGE > PONY_FILE

PONY_FILE should end with .pony and be localed in ponies/

Omit -2 if the source image does not use double pixel size.

For more information see:
@url{https://github.com/maandree/util-say/wiki/img2ponysay}
@end example

@*
@cindex ttypony
When a pony is added please also add a ttypony version, i.e. the pony files used in TTY,
but if you don't please state so in the pull request so we do not miss the create it;
the simplest way to do this is to run @command{make -B ttyponies} after adding the ponies
to @code{ponies/}, running @command{make -B ttyponies} will build (or rebuild) all
ttyponies with a pony present in @code{ponies/}, and creates all needed symlinks.

To be able to run @command{make -B ttyponies} you must have the packages listed under
@ref{Dependencies for pony providers}.




@node Ponysay constributors
@appendix Ponysay constributors

Active developers of ponysay:
@itemize @bullet
@item Erkin Batu Altunbaş
@item Mattias Andrée
@item Sven-Hendrik Haase
@item Pablo Lezaeta
@item Jan Alexander Steffens
@end itemize
@*
Patchers and other contributors of ponysay:
@itemize @bullet
@item Elis Axelsson
@item Duane Bekaert
@item Kyah Rindlisbacher
@item James Ross-Gowan
@item Louis Taylor
@item Jannis
@end itemize


@node Ponysay license
@appendix Ponysay license

Ponysay is Free Software (yet not Open Source) and in licensed under the terms
of Do What The Fuck You Want To Public Licese (WTFPL) version 2.

You have the four essential freedoms:
@itemize @bullet
@item
The freedom to run the program, for any purpose (freedom 0).
@item
The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
@item
The freedom to redistribute copies so you can help your neighbour (freedom 2). 
@item
The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
@end itemize

@*

@center DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@center Version 2, December 2004

Copyright @copyright{} 2012 Erkin Batu Altunbaş

@quotation
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

         DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
@end quotation



@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texinfo

@node Concept index
@appendix Concept index
@printindex cp


@bye