Files
man-card/man_card/cli_utils.py
2026-01-31 21:39:47 +00:00

16 lines
385 B
Python

"""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