Skip to content

Commit 3e46eb0

Browse files
committed
install cowsay library
1 parent 5056da5 commit 3e46eb0

609 files changed

Lines changed: 80598 additions & 101532 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

implement-cowsay/.venv/bin/cowsay

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/bin/python3
2+
# -*- coding: utf-8 -*-
3+
import re
4+
import sys
5+
from cowsay.__main__ import cli
6+
if __name__ == '__main__':
7+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8+
sys.exit(cli())

implement-cowsay/.venv/lib/python3.9/site-packages/pip-21.2.4.dist-info/INSTALLER renamed to implement-cowsay/.venv/lib/python3.9/site-packages/cowsay-6.1.dist-info/INSTALLER

File renamed without changes.

implement-cowsay/.venv/lib/python3.9/site-packages/cowsay-6.1.dist-info/LICENSE.txt

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
Metadata-Version: 2.1
2+
Name: cowsay
3+
Version: 6.1
4+
Summary: The famous cowsay for GNU/Linux is now available for python
5+
Home-page: https://github.com/VaasuDevanS/cowsay-python
6+
Author: Vaasudevan Srinivasan
7+
Author-email: vaasuceg.96@gmail.com
8+
License: GNU-GPL
9+
Classifier: Operating System :: OS Independent
10+
Classifier: Programming Language :: Python :: 3.8
11+
Classifier: Programming Language :: Python :: 3.9
12+
Classifier: Programming Language :: Python :: 3.10
13+
Classifier: Programming Language :: Python :: 3.11
14+
Classifier: Programming Language :: Python :: 3.12
15+
Requires-Python: >=3.8
16+
Description-Content-Type: text/markdown
17+
License-File: LICENSE.txt
18+
19+
20+
[![cowsay](https://github.com/VaasuDevanS/cowsay-python/actions/workflows/cowsay.yaml/badge.svg?branch=main)](https://github.com/VaasuDevanS/cowsay-python/actions/workflows/cowsay.yaml)
21+
[![codecov](https://codecov.io/gh/VaasuDevanS/cowsay-python/graph/badge.svg?token=GV4ntsCNtd)](https://codecov.io/gh/VaasuDevanS/cowsay-python)
22+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d5a358f5dd5c41d68db8c331d65fd0fd)](https://app.codacy.com/gh/VaasuDevanS/cowsay-python/dashboard)
23+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cowsay)
24+
[![Github](https://img.shields.io/badge/github-cowsay--python-blue)](https://github.com/VaasuDevanS/cowsay-python)
25+
<br>
26+
![](https://img.shields.io/badge/Latest%20Release-Sep%2025,%202023-blue)
27+
[![Downloads](https://static.pepy.tech/badge/cowsay)](https://pepy.tech/project/cowsay)
28+
[![Downloads](https://static.pepy.tech/badge/cowsay/month)](https://pepy.tech/project/cowsay)
29+
[![Downloads](https://static.pepy.tech/badge/cowsay/week)](https://pepy.tech/project/cowsay)
30+
31+
32+
# Introduction
33+
34+
A python API / Command-line tool for the famous linux `cowsay`. <br>
35+
Take a look at [CHANGELOG.md](https://github.com/VaasuDevanS/cowsay-python/blob/main/CHANGELOG.md) for the changes.
36+
37+
38+
# Brief History
39+
`cowsay` for GNU/Linux was initially written in perl by Tony Monroe. More info
40+
[here](https://en.wikipedia.org/wiki/Cowsay).
41+
42+
43+
# Installation
44+
```console
45+
pip install cowsay
46+
```
47+
48+
49+
# API Usage
50+
```console
51+
>>> import cowsay
52+
53+
>>> cowsay.cow('Hello World')
54+
___________
55+
| Hello World |
56+
===========
57+
\
58+
\
59+
^__^
60+
(oo)\_______
61+
(__)\ )\/\
62+
||----w |
63+
|| ||
64+
65+
66+
>>> print(cowsay.get_output_string('cow', 'Hello World'))
67+
___________
68+
| Hello World |
69+
===========
70+
\
71+
\
72+
^__^
73+
(oo)\_______
74+
(__)\ )\/\
75+
||----w |
76+
|| ||
77+
78+
79+
>>> 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.')
80+
_________________________________________________
81+
/ \
82+
| Lorem ipsum dolor sit amet, consectetur adipiscin |
83+
| g elit. Mauris blandit rhoncus nibh. Mauris mi ma |
84+
| uris, molestie vel metus sit amet, aliquam vulput |
85+
| ate nibh. |
86+
\ /
87+
=================================================
88+
\
89+
\
90+
^__^
91+
(oo)\_______
92+
(__)\ )\/\
93+
||----w |
94+
|| ||
95+
96+
97+
>>> my_fish = r'''
98+
\
99+
\
100+
/`·.¸
101+
/¸...¸`:·
102+
¸.·´ ¸ `·.¸.·´)
103+
: © ):´; ¸ {
104+
`·.¸ `· ¸.·´\`·¸)
105+
`\\´´\¸.·´
106+
'''
107+
108+
>>> cowsay.draw('Sharks are my best friend', my_fish)
109+
_________________________
110+
| Sharks are my best friend |
111+
=========================
112+
\
113+
\
114+
/`·.¸
115+
/¸...¸`:·
116+
¸.·´ ¸ `·.¸.·´)
117+
: © ):´; ¸ {
118+
`·.¸ `· ¸.·´\`·¸)
119+
`\\´´\¸.·´
120+
```
121+
122+
123+
# Command Line Usage
124+
```console
125+
$ cowsay -t "Hello World"
126+
___________
127+
| Hello World |
128+
===========
129+
\
130+
\
131+
^__^
132+
(oo)\_______
133+
(__)\ )\/\
134+
||----w |
135+
|| ||
136+
137+
138+
$ cowsay -t "Hello World" -c "tux"
139+
___________
140+
| Hello World |
141+
===========
142+
\
143+
\
144+
\
145+
.--.
146+
|o_o |
147+
|:_/ |
148+
// \ \
149+
(| | )
150+
/'\_ _/`\
151+
\___)=(___/
152+
```
153+
154+
155+
# More Characters
156+
```console
157+
>>> cowsay.char_names
158+
['beavis', 'cheese', 'cow', 'daemon', 'dragon', 'fox', 'ghostbusters', 'kitty',
159+
'meow', 'miki', 'milk', 'octopus', 'pig', 'stegosaurus', 'stimpy', 'trex',
160+
'turkey', 'turtle', 'tux']
161+
162+
163+
>>> cowsay.char_funcs
164+
{'beavis': <function func at 0x104b734c0>,
165+
'cheese': <function func at 0x104d285e0>,
166+
...
167+
'tux': <function func at 0x104d28f70>}
168+
169+
170+
>>> len(cowsay.chars)
171+
19
172+
```
173+
174+
# Contributing
175+
<a href="https://github.com/VaasuDevanS/cowsay-python/graphs/contributors">
176+
<img src="https://contrib.rocks/image?repo=VaasuDevanS/cowsay-python&columns=5" />
177+
</a>
178+
179+
Guide: [CONTRIBUTING.md](https://github.com/VaasuDevanS/cowsay-python/blob/main/CONTRIBUTING.md)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/__init__.cpython-39.pyc,,
2+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/__main__.cpython-39.pyc,,
3+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/characters.cpython-39.pyc,,
4+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/main.cpython-39.pyc,,
5+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/tests/__init__.cpython-39.pyc,,
6+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/tests/solutions.cpython-39.pyc,,
7+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/tests/test_api.cpython-39.pyc,,
8+
../../../../../../../Library/Caches/com.apple.python/Users/h.o./CYF/Module-Tools/implement-cowsay/.venv/lib/python3.9/site-packages/cowsay/tests/test_output.cpython-39.pyc,,
9+
../../../bin/cowsay,sha256=FkBwtzo6U6W50DBMXehaLgg7lpOFYeYNlyET0te6ktk,259
10+
cowsay-6.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
11+
cowsay-6.1.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12+
cowsay-6.1.dist-info/METADATA,sha256=ZGNBeztPwPUT1m6Jqx5BqQJcrq5bUunu8sLxSEtQyWA,5581
13+
cowsay-6.1.dist-info/RECORD,,
14+
cowsay-6.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15+
cowsay-6.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
16+
cowsay-6.1.dist-info/entry_points.txt,sha256=eA4lDJ_wo3_jLsgyh0peu2yWkpFbr4malOVJtMGVJiw,47
17+
cowsay-6.1.dist-info/top_level.txt,sha256=45zxJRiJFquDz8AIvNLxZWersc80tEFX0iKLKG868Ck,7
18+
cowsay/__init__.py,sha256=8Vp53KAFMgvd_w8Bh-jGzSPl2xryuQNrQcvhy1vYJhQ,450
19+
cowsay/__main__.py,sha256=swvEz9wm3O4NBe2vtGq7ddqeQMSKh4ZKX_g7KEIijsM,775
20+
cowsay/characters.py,sha256=SgA3F9HhmXxW70Eo9U65LHKDHkTNpOPUnpOjKuDMkiI,12259
21+
cowsay/main.py,sha256=ey_m3cRx03H-h1mzj9VJuSlS571ezpv_guFt5QSiZy8,1949
22+
cowsay/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23+
cowsay/tests/solutions.py,sha256=TdLCxGUInzdiVXDGISKIb3Ieo4YvAeuIXgzzQ5EWk4M,38065
24+
cowsay/tests/test_api.py,sha256=fxd30i-M6J9BD56tMwVTnl5AJ1IDFImzkz5iIFoIAfQ,919
25+
cowsay/tests/test_output.py,sha256=gmag5R2mvQUBUSIqgM7spNVSRxwIUGo_iZT5SPuMUwM,1118

implement-cowsay/.venv/lib/python3.9/site-packages/pip-21.2.4.dist-info/REQUESTED renamed to implement-cowsay/.venv/lib/python3.9/site-packages/cowsay-6.1.dist-info/REQUESTED

File renamed without changes.

implement-cowsay/.venv/lib/python3.9/site-packages/pip-21.2.4.dist-info/WHEEL renamed to implement-cowsay/.venv/lib/python3.9/site-packages/cowsay-6.1.dist-info/WHEEL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Wheel-Version: 1.0
2-
Generator: bdist_wheel (0.36.2)
2+
Generator: bdist_wheel (0.38.4)
33
Root-Is-Purelib: true
44
Tag: py3-none-any
55

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[console_scripts]
2+
cowsay = cowsay.__main__:cli
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cowsay
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from .main import (
2+
3+
__version__,
4+
5+
# Variables
6+
char_names,
7+
CHARS,
8+
9+
# Methods
10+
get_output_string,
11+
draw,
12+
13+
CowsayError,
14+
15+
)
16+
17+
# This is where we create functions for each character dynamically
18+
19+
char_funcs = {}
20+
21+
for ch_name, ch_lines in CHARS.items():
22+
23+
def func(text: str, char_lines=ch_lines):
24+
draw(str(text), char_lines)
25+
26+
func.__name__ = ch_name
27+
globals()[ch_name] = func
28+
char_funcs[ch_name] = func

0 commit comments

Comments
 (0)