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)
|
||||
|
||||
@@ -35,7 +35,7 @@ def init(path: Path, name: str | None, description: str):
|
||||
|
||||
try:
|
||||
proj = Project.create(path, name, description)
|
||||
console.print(f"[green]✓[/green] Created project: [cyan]{name}[/cyan]")
|
||||
console.print(f"[green]OK[/green] Created project: [cyan]{name}[/cyan]")
|
||||
console.print(f" Location: {path.absolute()}")
|
||||
console.print()
|
||||
console.print("Next steps:")
|
||||
@@ -62,7 +62,7 @@ def add(project_path: Path, video: Path, no_copy: bool):
|
||||
proj = Project.load(project_path)
|
||||
entry = proj.add_video(video, copy=not no_copy)
|
||||
|
||||
console.print(f"[green]✓[/green] Added: [cyan]{video.name}[/cyan]")
|
||||
console.print(f"[green]OK[/green] Added: [cyan]{video.name}[/cyan]")
|
||||
console.print(f" Status: {entry.status}")
|
||||
|
||||
pending = len(proj.get_pending_videos())
|
||||
@@ -145,7 +145,7 @@ def process(project_path: Path, process_all: bool, export_only: bool):
|
||||
if results['errors']:
|
||||
console.print("\n[bold red]Errors:[/bold red]")
|
||||
for err in results['errors']:
|
||||
console.print(f" [red]✗[/red] {err['video']}: {err['error']}")
|
||||
console.print(f" [red]X[/red] {err['video']}: {err['error']}")
|
||||
|
||||
if not export_only:
|
||||
console.print(f"\nRun [cyan]cad-doc project generate {project_path}[/cyan] to create documentation")
|
||||
@@ -180,7 +180,7 @@ def generate(project_path: Path, no_history: bool, no_bom: bool, no_atomizer: bo
|
||||
include_atomizer=not no_atomizer,
|
||||
)
|
||||
|
||||
console.print(f"[green]✓[/green] Documentation: [cyan]{doc_path}[/cyan]")
|
||||
console.print(f"[green]OK[/green] Documentation: [cyan]{doc_path}[/cyan]")
|
||||
|
||||
if pdf:
|
||||
console.print("[yellow]PDF generation not yet implemented for projects[/yellow]")
|
||||
|
||||
Reference in New Issue
Block a user