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
|
|
@ -2,6 +2,9 @@ import glob
|
|||
import os
|
||||
import typer
|
||||
import click
|
||||
from rich import print
|
||||
from rich.markdown import Markdown
|
||||
from rich.panel import Panel
|
||||
from shutil import move
|
||||
|
||||
from datetime import datetime
|
||||
|
|
@ -24,13 +27,17 @@ def todo() -> None:
|
|||
|
||||
for task_shard in open_tasks:
|
||||
print(
|
||||
"\n".join(
|
||||
file_content.splitlines()[
|
||||
task_shard.start_line - 1 : task_shard.end_line
|
||||
]
|
||||
Panel(
|
||||
Markdown(
|
||||
"\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()
|
||||
|
|
@ -57,7 +64,7 @@ def new() -> None:
|
|||
|
||||
final_path = os.path.join(streamer_directory, final_file_name)
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue