Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file

___

## v6.1 (Sep 25, 2023)

## Added
- -v / --version flag for cowsay cli (https://github.com/VaasuDevanS/cowsay-python/issues/26)

___

## v6.0 (Sep 08, 2023)

## Added
Expand Down Expand Up @@ -54,4 +61,4 @@ ___
___

## v1.0 (May 08, 2017)
- Initial release with 14 characters
- Initial release with 14 characters
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cowsay)
[![Github](https://img.shields.io/badge/github-cowsay--python-blue)](https://github.com/VaasuDevanS/cowsay-python)
<br>
![](https://img.shields.io/badge/Latest%20Release-Sep%2008,%202023-blue)
![](https://img.shields.io/badge/Latest%20Release-Sep%2025,%202023-blue)
[![Downloads](https://static.pepy.tech/badge/cowsay)](https://pepy.tech/project/cowsay)
[![Downloads](https://static.pepy.tech/badge/cowsay/month)](https://pepy.tech/project/cowsay)
[![Downloads](https://static.pepy.tech/badge/cowsay/week)](https://pepy.tech/project/cowsay)
Expand Down
5 changes: 4 additions & 1 deletion cowsay/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse

from . import CowsayError, char_names, char_funcs
from . import CowsayError, char_names, char_funcs, __version__


def cli():
Expand All @@ -17,6 +17,9 @@ def cli():
parser.add_argument('-t', '--text',
required=True)

parser.add_argument('-v', '--version',
action='version', version=__version__)

args = parser.parse_args()

if args.character not in char_names:
Expand Down
2 changes: 1 addition & 1 deletion cowsay/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .characters import CHARS

__version__ = '6.0'
__version__ = '6.1'

CHARS = dict(sorted(CHARS.items()))
char_names = list(CHARS.keys())
Expand Down