Skip to content

Commit

Permalink
Added version reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbc committed Apr 25, 2023
1 parent 18b03e9 commit f6d10e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plexorcist.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
"""Main Plexorcist execution file!"""

__version__ = "1.3.3"

import os
import argparse
import configparser
Expand Down Expand Up @@ -54,6 +56,9 @@
# Define command-line arguments
parser = argparse.ArgumentParser()
parser.add_argument("--config", action="store_true", help="update config file")
parser.add_argument(
"--version", action="store_true", help="prints the current installed version"
)

# Parse command-line arguments
input_args = parser.parse_args()
Expand Down Expand Up @@ -270,6 +275,8 @@ def make_request(**kwargs):
# Check if the config argument was provided
if input_args.config:
update_config_file()
elif input_args.version:
print(f"Verily, the current installed version is: {__version__}")
else:
# Call the plexorcise function if the config argument is not provided
plexorcise()

0 comments on commit f6d10e2

Please sign in to comment.