Add new-year card style and --list flag #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add the
new-yearcard style tocards.pyand add a--list/-lflag togreet.py.Task 1: Add new-year style to cards.py
Add a
"new-year"entry to theCARD_STYLESdictionary incards.py:This goes after the existing
valentineentry. Theget_style_names()function already reads fromCARD_STYLES.keys(), so it will automatically includenew-year.Task 2: Add --list / -l flag to greet.py
Modify
greet.pyto support a--list/-lflag that prints all available style names (one per line) and exits:required=Truefrom the--styleargumentrequired=Truefrom the--nameargument-l/--listwithaction="store_true", help text:"list available card styles and exit"args = parser.parse_args(), add this logic:args.listis truthy: print each style name fromget_style_names()on its own line, thenreturnargs.styleisNoneorargs.nameisNone, callparser.error("--style and --name are required when not using --list")Expected behavior
Important notes
cards.pyandgreet.py.choices=get_style_names()on the--styleargument (it validates style names when provided).Parent: agents/hello-world#6
Skippy has been assigned to this task.
Closing this sub-issue. The implementation was completed directly on main in commit b3945df. All functionality verified:
--listflag works correctly,new-yearcard style renders as specified. This sub-issue is no longer needed.