Add task management commands to CLI
Implement task add and task move subcommands for managing tasks in TASKS.md. task add <slug> <title> [--section <section>]: - Adds a task to the specified section (default: Inbox) - Valid sections: Inbox, Proximo, En curso, Bloqueado, En espera, Hecho - Creates section if it doesn't exist task move <slug> <task_title> <to_section>: - Searches for task by title across all sections - Moves task to destination section - Marks task as completed ([x]) when moved to Hecho - Updates checkbox state based on destination Includes parsing and building functions for TASKS.md with: - Section normalization (English to Spanish names) - Merge support for duplicate normalized sections - Standard section ordering Uses app.add_typer to register task subcommand group.
This commit is contained in:
@@ -12,6 +12,8 @@ from tracker.cli.commands import (
|
||||
add_change,
|
||||
suggest_next,
|
||||
review,
|
||||
task_add,
|
||||
task_move,
|
||||
)
|
||||
|
||||
app = typer.Typer(
|
||||
@@ -19,6 +21,14 @@ app = typer.Typer(
|
||||
help="Personal Project Tracker CLI - Track your projects with Markdown and YAML",
|
||||
)
|
||||
|
||||
# Sub-command group for task management
|
||||
task_app = typer.Typer(help="Task management commands")
|
||||
|
||||
|
||||
# Register task subcommands
|
||||
task_app.command("add")(task_add)
|
||||
task_app.command("move")(task_move)
|
||||
|
||||
|
||||
# Register all commands
|
||||
app.command("init-project")(init_project)
|
||||
@@ -30,6 +40,7 @@ app.command("stop")(stop_session)
|
||||
app.command("change")(add_change)
|
||||
app.command("next")(suggest_next)
|
||||
app.command("review")(review)
|
||||
app.add_typer(task_app, name="task")
|
||||
|
||||
|
||||
@app.callback()
|
||||
|
||||
Reference in New Issue
Block a user