Introduction
A python API / Command-line tool for the famous linux cowsay.
Take a look at CHANGELOG.md for the changes.
Brief History
cowsay for GNU/Linux was initially written in perl by Tony Monroe. More info
here.
Installation
pip install cowsay
API Usage
>>> import cowsay
>>> cowsay.cow('Hello World')
___________
| Hello World |
===========
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
>>> print(cowsay.get_output_string('cow', 'Hello World'))
___________
| Hello World |
===========
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
>>> cowsay.cow('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris blandit rhoncus nibh. Mauris mi mauris, molestie vel metus sit amet, aliquam vulputate nibh.')
_________________________________________________
/ \
| Lorem ipsum dolor sit amet, consectetur adipiscin |
| g elit. Mauris blandit rhoncus nibh. Mauris mi ma |
| uris, molestie vel metus sit amet, aliquam vulput |
| ate nibh. |
\ /
=================================================
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
>>> my_fish = r'''
\
\
/`·.¸
/¸...¸`:·
¸.·´ ¸ `·.¸.·´)
: © ):´; ¸ {
`·.¸ `· ¸.·´\`·¸)
`\\´´\¸.·´
'''
>>> cowsay.draw('Sharks are my best friend', my_fish)
_________________________
| Sharks are my best friend |
=========================
\
\
/`·.¸
/¸...¸`:·
¸.·´ ¸ `·.¸.·´)
: © ):´; ¸ {
`·.¸ `· ¸.·´\`·¸)
`\\´´\¸.·´
Command Line Usage
$ cowsay -t "Hello World"
___________
| Hello World |
===========
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
$ cowsay -t "Hello World" -c "tux"
___________
| Hello World |
===========
\
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
More Characters
>>> cowsay.char_names
['beavis', 'cheese', 'cow', 'daemon', 'dragon', 'fox', 'ghostbusters', 'kitty',
'meow', 'miki', 'milk', 'octopus', 'pig', 'stegosaurus', 'stimpy', 'trex',
'turkey', 'turtle', 'tux']
>>> cowsay.char_funcs
{'beavis': <function func at 0x104b734c0>,
'cheese': <function func at 0x104d285e0>,
...
'tux': <function func at 0x104d28f70>}
>>> len(cowsay.chars)
19
Contributing
Guide: CONTRIBUTING.md
Metadata
Release files for cowsay 6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cowsay-6.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / cowsay-6.1-py3-none-any.whl
| Download URL | cowsay-6.1-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
274b1e6fc1b966d53976333eb90ac94cb07a450a700b455af9fbdf882244b30a
|
|
BLAKE2b-256 checksum How to use checksums |
f11363c0a02c44024ee16f664e0b36eefeb22d54e93531630bd99e237986f534
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.16
|