Skip to content

Commit

Permalink
Bump version and --version argument
Browse files Browse the repository at this point in the history
Fix: setup.py
  • Loading branch information
nilfoer committed Jul 20, 2024
1 parent 1f184e8 commit 681c653
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions gwaripper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def main():
epilog="NOTE: arguments that are shared over all subcommands need to be put in front of the "
"subcommand itself: e.g. gwaripper --ignore-banned links URL URL ...")

parser.add_argument('--version', action='store_true',
help="Print the GWARipper version")
parser.add_argument('--ignore-banned', action='store_true',
help="Ignores banned tags in titles and in link text!")
parser.add_argument('--download-duplicates', action='store_true',
Expand Down Expand Up @@ -274,6 +276,10 @@ def main():
# subparser that was selected
args = parser.parse_args()

if args.version:
print(GWARipper.VERSION)
return

if root_dir:
setup_cacerts()

Expand Down
2 changes: 2 additions & 0 deletions gwaripper/gwaripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class GWARipper:
Uses config.get_root() as base path for writing and reading files
"""

VERSION: Final[str] = "0.9.1"

headers: ClassVar[Dict[str, str]] = {
'User-Agent':
'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0'
Expand Down
2 changes: 1 addition & 1 deletion gwaripper_webGUI/start_webgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def main(args: Optional[List[str]] = None):
if 'open' in args:
app.run(threaded=True, host='0.0.0.0', port=port)
else:
app.run(threaded=True, port=port)
app.run(threaded=True, port=port, debug=True)


if __name__ == "__main__":
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import setuptools
import os

from gwaripper.gwaripper import GWARipper

with open("README.md", "r", encoding="UTF-8") as fh:
long_description = fh.read()

Expand All @@ -19,7 +21,7 @@

setuptools.setup(
name="GWARipper",
version="0.9.0",
version=GWARipper.VERSION,
description="A script that downloads audio files from the gonewildaudio subreddit.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -45,7 +47,7 @@
# copied into the package
package_data={
'gwaripper_webGUI': webgui_data,
'gwaripper': 'migrations/*.py',
'gwaripper': ['migrations/*.py'],
},
entry_points={
'console_scripts': [
Expand Down

0 comments on commit 681c653

Please sign in to comment.