Skip to content

Commit

Permalink
fix: cli
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Aug 2, 2024
1 parent e04d200 commit 567ee53
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions screenpipe-server/src/bin/screenpipe-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ struct Cli {
save_text_files: bool,

/// Enable cloud audio processing
#[arg(long, default_value_t = true)]
#[arg(long, default_value_t = false)]
cloud_audio_on: bool,

/// Enable cloud OCR processing
#[arg(long, default_value_t = true)]
#[arg(long, default_value_t = false)]
cloud_ocr_on: bool,
}

Expand Down Expand Up @@ -301,7 +301,7 @@ async fn main() -> anyhow::Result<()> {
audio_devices_control,
cli.save_text_files,
cli.cloud_audio_on, // Pass the cloud_audio flag
cli.cloud_ocr_on, // Pass the cloud_ocr flag
cli.cloud_ocr_on, // Pass the cloud_ocr flag
)
.await;

Expand Down Expand Up @@ -350,8 +350,22 @@ async fn main() -> anyhow::Result<()> {
"Open source | Runs locally | Developer friendly".bright_green()
);

// Add warning for cloud arguments
if cli.cloud_audio_on || cli.cloud_ocr_on {
eprintln!(
"{}",
"WARNING: You are using cloud now. Make sure to understand the data privacy risks."
.bright_yellow()
);
} else {
eprintln!(
"{}",
"You are using local processing. All your data stays on your computer.".bright_yellow()
);
}

// Keep the main thread running
loop {
tokio::time::sleep(Duration::from_secs(1)).await;
}
}
}

0 comments on commit 567ee53

Please sign in to comment.