Initial upload: man-card CLI tool with PDF/PNG generation, templates, and tests
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
15
man_card/cli_utils.py
Normal file
15
man_card/cli_utils.py
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user