| Conditions | 4 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python |
||
| 14 | def main(): |
||
| 15 | |||
| 16 | args = parse_args() |
||
| 17 | with open(args.input, "r") as file_in: |
||
| 18 | # rstrip is used to remove newline at the end of file |
||
| 19 | banner_text = file_in.read().rstrip() |
||
| 20 | |||
| 21 | banner_regex = ssg.utils.banner_regexify(banner_text) |
||
| 22 | banner_regex = ssg.utils.banner_anchor_wrap(banner_regex) |
||
| 23 | |||
| 24 | if args.output: |
||
| 25 | with open(args.output, "w") as file_out: |
||
| 26 | file_out.write(banner_regex) |
||
| 27 | else: |
||
| 28 | print(banner_regex) |
||
| 29 | |||
| 33 |