From 518ca3d81549644e3a068734f3f432feaff9c85c Mon Sep 17 00:00:00 2001 From: cerberus Date: Sat, 27 Sep 2025 15:29:34 +0200 Subject: [PATCH] added version flag and its output --- tempbox/README.md | 1 + tempbox/tempbox.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tempbox/README.md b/tempbox/README.md index 630eb90..7f8bfb9 100644 --- a/tempbox/README.md +++ b/tempbox/README.md @@ -9,5 +9,6 @@ again. ## Changelog +<2025-09-27> - Beta b0.1.1 - added the version output
<2025-09-27> - Beta b0.1.1 - fixed verbosity switch for subprocess
<2025-09-27> - *Beta b0.0.1* - first release of tempbox diff --git a/tempbox/tempbox.py b/tempbox/tempbox.py index c7a052a..3cb8797 100644 --- a/tempbox/tempbox.py +++ b/tempbox/tempbox.py @@ -3,7 +3,7 @@ import argparse from tempbox_functions import execute_as_subprocess - +tempbox_version = "Tempbox Beta b0.1.1" # Argument parsing parser = argparse.ArgumentParser( prog="Tempbox", @@ -25,6 +25,8 @@ parser.add_argument( help="Takes the string right after the flag to execute it.", ) +parser.add_argument("-V", "--version", action="version", version=tempbox_version) + args = parser.parse_args() if args.command is not None: