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.
54 lines
1.1 KiB
Python
54 lines
1.1 KiB
Python
"""Main CLI entry point."""
|
|
|
|
import typer
|
|
|
|
from tracker.cli.commands import (
|
|
init_project,
|
|
list_projects_cmd,
|
|
show_project,
|
|
start_session,
|
|
add_note_cmd,
|
|
stop_session,
|
|
add_change,
|
|
suggest_next,
|
|
review,
|
|
task_add,
|
|
task_move,
|
|
)
|
|
|
|
app = typer.Typer(
|
|
name="tracker",
|
|
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)
|
|
app.command("list")(list_projects_cmd)
|
|
app.command("show")(show_project)
|
|
app.command("start")(start_session)
|
|
app.command("note")(add_note_cmd)
|
|
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()
|
|
def callback():
|
|
"""Personal Project Tracker - Track your projects locally with Markdown."""
|
|
pass
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app()
|