| 153 | print(f"{PURPLE}{s}{ENDC}") |
| 154 | |
| 155 | def sub_title(title): |
| 156 | total_length = 100 |
| 157 | spacing_length = 3 if len(title) > 0 else 0 |
| 158 | total_length -= 2 * spacing_length |
| 159 | total_length -= len(title) |
| 160 | if total_length < 0: |
| 161 | warning(f'title "{title}" is too long') |
| 162 | one_more = total_length % 2 |
| 163 | separator_char = '-' |
| 164 | separator_count = int(total_length / 2) |
| 165 | first_part = separator_count * separator_char + (spacing_length + one_more) * ' ' |
| 166 | second_part = spacing_length * ' ' + separator_count * separator_char |
| 167 | msg = first_part + str(title) + second_part |
| 168 | print('') |
| 169 | print(msg) |
| 170 | |
| 171 | def run(cmd, *cmdArgs, stdin=None, cstdout=False, cstderr=False, cwd=None, env=None, ignoreFail=False, dryrun=False): |
| 172 | """ |