From f6d10e26c606aba38b515df5c34922439b955b94 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Tue, 25 Apr 2023 11:29:41 +0300 Subject: [PATCH] Added version reporting --- plexorcist.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plexorcist.py b/plexorcist.py index e0cfdc0..d22d5b4 100755 --- a/plexorcist.py +++ b/plexorcist.py @@ -1,6 +1,8 @@ #!/usr/bin/env python """Main Plexorcist execution file!""" +__version__ = "1.3.3" + import os import argparse import configparser @@ -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() @@ -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()