feat: prettify streamer todo output
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
This commit is contained in:
parent
ac9df7eb62
commit
28dc40ebf0
3 changed files with 16 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ dependencies = [
|
||||||
"mistletoe>=1.4.0",
|
"mistletoe>=1.4.0",
|
||||||
"pydantic>=2.11.3",
|
"pydantic>=2.11.3",
|
||||||
"pydantic-settings[yaml]>=2.10.0",
|
"pydantic-settings[yaml]>=2.10.0",
|
||||||
|
"rich>=14.0.0",
|
||||||
"typer>=0.16.0",
|
"typer>=0.16.0",
|
||||||
"xdg-base-dirs>=6.0.2",
|
"xdg-base-dirs>=6.0.2",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ import glob
|
||||||
import os
|
import os
|
||||||
import typer
|
import typer
|
||||||
import click
|
import click
|
||||||
|
from rich import print
|
||||||
|
from rich.markdown import Markdown
|
||||||
|
from rich.panel import Panel
|
||||||
from shutil import move
|
from shutil import move
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
@ -24,13 +27,17 @@ def todo() -> None:
|
||||||
|
|
||||||
for task_shard in open_tasks:
|
for task_shard in open_tasks:
|
||||||
print(
|
print(
|
||||||
"\n".join(
|
Panel(
|
||||||
file_content.splitlines()[
|
Markdown(
|
||||||
task_shard.start_line - 1 : task_shard.end_line
|
"\n".join(
|
||||||
]
|
file_content.splitlines()[
|
||||||
|
task_shard.start_line - 1 : task_shard.end_line
|
||||||
|
]
|
||||||
|
)
|
||||||
|
),
|
||||||
|
title=f"{file_name}:{task_shard.start_line}",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
print(f" {file_name}:{task_shard.start_line}")
|
|
||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
|
|
@ -57,7 +64,7 @@ def new() -> None:
|
||||||
|
|
||||||
final_path = os.path.join(streamer_directory, final_file_name)
|
final_path = os.path.join(streamer_directory, final_file_name)
|
||||||
move(prelimary_path, final_path)
|
move(prelimary_path, final_path)
|
||||||
click.echo(f"Saved as {click.style(final_file_name, fg='yellow')}")
|
print(f"Saved as [yellow]{final_file_name}")
|
||||||
|
|
||||||
|
|
||||||
@app.callback(invoke_without_command=True)
|
@app.callback(invoke_without_command=True)
|
||||||
|
|
|
||||||
2
uv.lock
generated
2
uv.lock
generated
|
|
@ -314,6 +314,7 @@ dependencies = [
|
||||||
{ name = "mistletoe" },
|
{ name = "mistletoe" },
|
||||||
{ name = "pydantic" },
|
{ name = "pydantic" },
|
||||||
{ name = "pydantic-settings", extra = ["yaml"] },
|
{ name = "pydantic-settings", extra = ["yaml"] },
|
||||||
|
{ name = "rich" },
|
||||||
{ name = "typer" },
|
{ name = "typer" },
|
||||||
{ name = "xdg-base-dirs" },
|
{ name = "xdg-base-dirs" },
|
||||||
]
|
]
|
||||||
|
|
@ -332,6 +333,7 @@ requires-dist = [
|
||||||
{ name = "mistletoe", specifier = ">=1.4.0" },
|
{ name = "mistletoe", specifier = ">=1.4.0" },
|
||||||
{ name = "pydantic", specifier = ">=2.11.3" },
|
{ name = "pydantic", specifier = ">=2.11.3" },
|
||||||
{ name = "pydantic-settings", extras = ["yaml"], specifier = ">=2.10.0" },
|
{ name = "pydantic-settings", extras = ["yaml"], specifier = ">=2.10.0" },
|
||||||
|
{ name = "rich", specifier = ">=14.0.0" },
|
||||||
{ name = "typer", specifier = ">=0.16.0" },
|
{ name = "typer", specifier = ">=0.16.0" },
|
||||||
{ name = "xdg-base-dirs", specifier = ">=6.0.2" },
|
{ name = "xdg-base-dirs", specifier = ">=6.0.2" },
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue