aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: b3d2fec48a7744f3ef35ea4aee7e05fc2ddbc5a6 (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
ponysay — cowsay with ponies
============================

![Derp](http://i.imgur.com/xOJbE.png)

```
<3 ./ponysay.py --help
usage: ponysay.py [-h] [-p PONY] [-q] [-c] [-C] [-w WIDTH] [-b BALLOON]
                  [text [text ...]]

Cowsay with ponies

positional arguments:
  text                  The text to be placed in the speech bubble

optional arguments:
  -h, --help            show this help message and exit
  -p PONY, --pony PONY  The name of the pony to be used. Use "-p list" to list
                        all ponies, "-p random" (default) to use a random
                        pony.
  -q, --quote           Use a random quote of the pony being displayed as text
  -c, --center          Use a random quote of the pony being displayed as text
  -C, --center-text     Center the text in the bubble
  -w WIDTH, --width WIDTH
                        Terminal width. Use 0 for unlimited width. Default:
                        autodetect
  -b BALLOON, --balloon BALLOON
                        Balloon style to use. Use "-b list" to list available
                        styles.
```

This is my fork of https://github.com/erkin/ponysay
I really liked the concept, but I sort-of WTF-ed at the 2458-line python script powering it. So I rewrote the thing from scratch in actual python (not that bad since most of the work is done by util-say). Also, I missed a "--center"-option, so I added one. This rewrite is 117 lines long, and that includes the 7 original bubble styles which now are embedded in the python script. This means 95.2% less bloat, which I consider a success. Also, the rewrite is about 50-85% faster.

Fork me on github: https://github.com/jaseg/ponysay

The repo now also contains a small script for providing PAAS (Ponies As A Service) via the [QOTD protocol defined in RFC 865](https://tools.ietf.org/html/rfc865).

FAQ
---

__Q:__ The output looks like a mess in `TTY/PuTTY/other`

__A:__ Yeah, sorry. If you find a fix, send me a pull request.

__Q:__ Which programs do you use to generate the pony files?

__A:__ The pony files are actually mostly a bunch of selected [browser ponies](http://web.student.tuwien.ac.at/~e0427417/browser-ponies/ponies.html), converted using [util-say](https://github.com/maandree/util-say).

Conversion
----------
Convert the old quote format with
```
for line in $(cat ponyquotes/ponies|grep +); do n=${line%%+*}; for a in $(sed s/+/\\n/g<<<${line#*+}); do ln -s quotes/${n}.quotes quotes/${a}.quotes; done; done
```
Afterwards, clean up the broken symlinks with ```find -L quotes -type l -delete```