Fix Windows encoding: replace Unicode symbols with ASCII
This commit is contained in:
@@ -39,7 +39,7 @@ def progress_handler(progress: PipelineProgress):
|
||||
icon = stage_icons.get(progress.stage, "⏳")
|
||||
|
||||
if progress.error:
|
||||
console.print(f" [red]✗[/red] {progress.message}")
|
||||
console.print(f" [red]X[/red] {progress.message}")
|
||||
else:
|
||||
console.print(f" {icon} {progress.message}")
|
||||
|
||||
@@ -132,7 +132,7 @@ def process(
|
||||
metadata = pipeline.get_video_metadata()
|
||||
console.print(f" Duration: {metadata.duration:.1f}s | "
|
||||
f"Resolution: {metadata.width}x{metadata.height} | "
|
||||
f"Audio: {'✓' if metadata.has_audio else '✗'}")
|
||||
f"Audio: {'OK' if metadata.has_audio else 'X'}")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -169,7 +169,7 @@ def process(
|
||||
|
||||
if result.success:
|
||||
console.print(Panel.fit(
|
||||
f"[bold green]✓ Documentation generated successfully![/bold green]\n\n"
|
||||
f"[bold green]OK Documentation generated successfully![/bold green]\n\n"
|
||||
f"📊 Frames extracted: {result.frames_extracted}\n"
|
||||
f"🔧 Components found: {result.components_found}\n"
|
||||
f"🎤 Audio duration: {result.transcript_duration:.1f}s",
|
||||
@@ -200,7 +200,7 @@ def process(
|
||||
console.print(f" ⚠️ {warning}")
|
||||
else:
|
||||
console.print(Panel.fit(
|
||||
f"[bold red]✗ Pipeline failed[/bold red]\n\n" +
|
||||
f"[bold red]X Pipeline failed[/bold red]\n\n" +
|
||||
"\n".join(result.errors),
|
||||
title="Error",
|
||||
border_style="red"
|
||||
@@ -241,7 +241,7 @@ def frames(video: Path, output: Path | None, mode: str, interval: float, thresho
|
||||
with console.status("Extracting frames..."):
|
||||
frames_list = processor.extract_frames()
|
||||
|
||||
console.print(f"\n[green]✓[/green] Extracted {len(frames_list)} frames to {output}")
|
||||
console.print(f"\n[green]OK[/green] Extracted {len(frames_list)} frames to {output}")
|
||||
|
||||
# Show frame timestamps
|
||||
table = Table(title="Extracted Frames")
|
||||
@@ -286,7 +286,7 @@ def transcribe(video: Path, model: str, output: Path | None):
|
||||
with console.status(f"Transcribing with Whisper ({model})..."):
|
||||
transcript = analyzer.transcribe()
|
||||
|
||||
console.print(f"\n[green]✓[/green] Transcribed {len(transcript.segments)} segments")
|
||||
console.print(f"\n[green]OK[/green] Transcribed {len(transcript.segments)} segments")
|
||||
console.print(f" Duration: {transcript.duration:.1f}s")
|
||||
console.print(f" Language: {transcript.language}\n")
|
||||
|
||||
@@ -318,7 +318,7 @@ def init(output: Path | None):
|
||||
config = Config()
|
||||
config.to_file(output)
|
||||
|
||||
console.print(f"[green]✓[/green] Created config file: {output}")
|
||||
console.print(f"[green]OK[/green] Created config file: {output}")
|
||||
console.print("\nEdit this file to customize:")
|
||||
console.print(" - Vision model and provider")
|
||||
console.print(" - Whisper transcription settings")
|
||||
@@ -344,7 +344,7 @@ def info(video: Path):
|
||||
table.add_row("Resolution", f"{metadata.width}x{metadata.height}")
|
||||
table.add_row("FPS", f"{metadata.fps:.2f}")
|
||||
table.add_row("Codec", metadata.codec)
|
||||
table.add_row("Has Audio", "✓" if metadata.has_audio else "✗")
|
||||
table.add_row("Has Audio", "OK" if metadata.has_audio else "X")
|
||||
table.add_row("File Size", f"{video.stat().st_size / 1024 / 1024:.1f} MB")
|
||||
|
||||
console.print(table)
|
||||
|
||||
Reference in New Issue
Block a user