diff --git a/man_card/cli_utils.py b/man_card/cli_utils.py new file mode 100644 index 0000000..1b92a20 --- /dev/null +++ b/man_card/cli_utils.py @@ -0,0 +1,15 @@ +"""CLI utility functions.""" + + +def parse_commands_from_file(path: str) -> list[str]: + """Parse commands from a file, one per line.""" + with open(path, 'r') as f: + lines = f.readlines() + + commands = [] + for line in lines: + stripped = line.strip() + if stripped and not stripped.startswith('#'): + commands.append(stripped) + + return commands