Python module for cowsay
Project description
cowsay-py
__________________
< srsly dude, why? >
------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Please note that this is a new package and there will be bugs. Please report them to the issue page.
Cowsay is a configurable talking cow, originally written in Perl by Tony Monroe
This project uses code from cowsay2, the node.js moderenized version of cowsay.
Installing
# Linux/macOS
python3 -m pip install -U cowsay-py
# Windows
py -3 -m pip install -U cowsay-py
Usage (Coming Soon!)
cowsay Python FTW!
or
cowthink python is cool
It acts in the same way as the original cowsay, so consult cowsay(1)
or run cowsay -h
________
< indeed >
--------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
Quick Example
import cowsay
print(cowsay.say(
'Moooooo!',
eyes="oO",
tongue="U"
))
# or cowsay.think()
___________
< Moooooo! >
-----------
\ ^__^
\ (oO)\_______
(__)\ )\/\
U ||----w |
|| ||
getting a list of cow names:
from cowsay import cows
print(dir(cows))
Function options
say(
text: 'hello',
cow: cowsay.Cow, # Template for a cow, get inspiration from `./cows`
eyes: 'oo', # Select the appearance of the cow's eyes, equivalent to cowsay -e
tongue: 'L|', # The tongue is configurable similarly to the eyes through -T and tongue_string, equivalent to cowsay -T
wrap: True, # Specifies if the given message will be word-wrapped. equivalent to cowsay -n
wrapLength: 40, # Specifies roughly where the message should be wrapped. equivalent to cowsay -W
mode: 'b', # One of "b", "d", "g", "p", "s", "t", "w", "y"
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cowsay-py-0.1.0.tar.gz
(11.8 kB
view hashes)
Built Distribution
cowsay_py-0.1.0-py3-none-any.whl
(10.5 kB
view hashes)
Close
Hashes for cowsay_py-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6f672a9e9e02ded4c3a315ab8bd921658fda57ac0cbeca1a7c4d242e1bc1db7 |
|
MD5 | c5d9e31960ab762ca13527022ed0cd44 |
|
BLAKE2b-256 | 0bf9a3c0d23cc6fd566b9874fe4fd52611dc99ec542095604146abdccd8a1ef3 |