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.2.tar.gz
(60.4 kB
view details)
Built Distribution
cowsay_py-0.1.2-py3-none-any.whl
(96.9 kB
view details)
File details
Details for the file cowsay-py-0.1.2.tar.gz
.
File metadata
- Download URL: cowsay-py-0.1.2.tar.gz
- Upload date:
- Size: 60.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caedf22113d24ca3eb89b80ccb57cd7c8dd009196c020fd5aa4da1f98762c508 |
|
MD5 | d72d4cd219b6c06261a884987c0ff8c2 |
|
BLAKE2b-256 | f32d3d83f778ec89c67d9d8e965be00d3843a2dc208cf2fb8ede70448f5f8083 |
File details
Details for the file cowsay_py-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: cowsay_py-0.1.2-py3-none-any.whl
- Upload date:
- Size: 96.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffa0f4399859c182616b0dc71ebf7504c3d03c59a0c9cf92a16786fca4684cff |
|
MD5 | d510936f0e74a40ea001ef84fca6db78 |
|
BLAKE2b-256 | 4f9007d73f3d59d2ac4dbb3f0507f1b3dccbd770d8fa3bb2e3533f7ffd3b7479 |