Skip to content

Commit e238362

Browse files
committed
added version flag
1 parent 290aedd commit e238362

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file
44

55
___
66

7+
## v6.1 (Sep 25, 2023)
8+
9+
## Added
10+
- -v / --version flag for cowsay cli (https://github.com/VaasuDevanS/cowsay-python/issues/26)
11+
12+
___
13+
714
## v6.0 (Sep 08, 2023)
815

916
## Added
@@ -54,4 +61,4 @@ ___
5461
___
5562

5663
## v1.0 (May 08, 2017)
57-
- Initial release with 14 characters
64+
- Initial release with 14 characters

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cowsay)
66
[![Github](https://img.shields.io/badge/github-cowsay--python-blue)](https://github.com/VaasuDevanS/cowsay-python)
77
<br>
8-
![](https://img.shields.io/badge/Latest%20Release-Sep%2008,%202023-blue)
8+
![](https://img.shields.io/badge/Latest%20Release-Sep%2025,%202023-blue)
99
[![Downloads](https://static.pepy.tech/badge/cowsay)](https://pepy.tech/project/cowsay)
1010
[![Downloads](https://static.pepy.tech/badge/cowsay/month)](https://pepy.tech/project/cowsay)
1111
[![Downloads](https://static.pepy.tech/badge/cowsay/week)](https://pepy.tech/project/cowsay)

cowsay/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import argparse
22

3-
from . import CowsayError, char_names, char_funcs
3+
from . import CowsayError, char_names, char_funcs, __version__
44

55

66
def cli():
@@ -17,6 +17,9 @@ def cli():
1717
parser.add_argument('-t', '--text',
1818
required=True)
1919

20+
parser.add_argument('-v', '--version',
21+
action='version', version=__version__)
22+
2023
args = parser.parse_args()
2124

2225
if args.character not in char_names:

cowsay/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from .characters import CHARS
44

5-
__version__ = '6.0'
5+
__version__ = '6.1'
66

77
CHARS = dict(sorted(CHARS.items()))
88
char_names = list(CHARS.keys())

0 commit comments

Comments
 (0)