Skip to content

Commit

Permalink
Merge pull request #27 from VaasuDevanS/26-silent-drop-of-version-sup…
Browse files Browse the repository at this point in the history
…port-in-cowsay

added version flag
  • Loading branch information
VaasuDevanS authored Sep 25, 2023
2 parents 290aedd + e238362 commit afa7db2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
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

0 comments on commit afa7db2

Please sign in to comment.