This commit is contained in:
Marty Oehme 2025-01-18 14:34:26 +01:00
parent d6bc9e6728
commit bf3c298034
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -90,9 +90,7 @@ def rm_dir(dir: Path | str) -> None:
type=str,
help="Use custom prompt.",
)
def cli(
file_path: Path | str, json_transcript: bool, youtube: bool, prompt: str
):
def cli(file_path: Path | str, json_transcript: bool, youtube: bool, prompt: str):
"""Provide summary for a file at the specified path or a youtube video at the specified url."""
content = ""
@ -110,10 +108,12 @@ def cli(
if json_transcript or youtube:
content = extract_transcript_contents(content)
print(f"DEBUG: content = {content}")
if not content:
print("Please provide a file with valid content.")
print(summarize_text_file(content, prompt))
if __name__ == "__main__":
cli()