From 4ab4ee69053cceffb216d90ef2d9d5a9dd79e566 Mon Sep 17 00:00:00 2001 From: "martin.cholewa" Date: Mon, 31 Mar 2025 13:27:24 +0200 Subject: [PATCH] separete helper cod --- helpers.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 helpers.py diff --git a/helpers.py b/helpers.py new file mode 100644 index 0000000..23aac6a --- /dev/null +++ b/helpers.py @@ -0,0 +1,33 @@ +class Colors: + HEADER = '\033[95m' + BLUE = '\033[94m' + GREEN = '\033[92m' + YELLOW = '\033[93m' + RED = '\033[91m' + ENDC = '\033[0m' + BOLD = '\033[1m' + +def print_colored(message, color, bold=False): + """ + Print a colored message to the terminal + """ + if bold: + print(f"{Colors.BOLD}{color}{message}{Colors.ENDC}") + else: + print(f"{color}{message}{Colors.ENDC}") + +# Text pro nápovědu +SCRIPT_DESCRIPTION = ''' +Git repository management script for multiple repositories. +This script helps manage multiple Git repositories defined in repos.txt file. +It can perform bulk operations like switching to develop branch, pulling latest changes, +or creating new branches across all repositories. +''' + +SCRIPT_EPILOG = ''' +Examples: + python3 mob_repos.py # Switch to develop and pull in all repos + python3 mob_repos.py -bc feature/GND1111-testing-repo # Create new branch from develop in all repos + python3 mob_repos.py --help # Show this help message +''' +