Skip to content
2 changes: 1 addition & 1 deletion screenpipe-core/examples/windows_pdf_to_legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use anyhow::{Result}; // Use anyhow for better error handling

use screenpipe_core::operator::platforms;
use screenpipe_core::operator::{AutomationError, Selector}; // Import Element
use screenpipe_core::operator::Selector; // Import Element

// like a playground, just uncomment
fn main() -> Result<()> { // Use anyhow::Result
Expand Down
32 changes: 0 additions & 32 deletions screenpipe-core/src/operator/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,38 +271,6 @@ mod tests {
}

return;

let app = desktop.application("Arc").unwrap();

let children = app.children().unwrap();

println!("App children: {:?}", children.len());

for (i, child) in children.iter().enumerate() {
println!("App child #{}: {:?}", i, child.role());
}

let buttons = app.locator("AXButton").unwrap().all().unwrap_or_default();
for b in buttons {
println!("b: {:?}", b.role());
println!("b: {:?}", b.attributes().label);
let text = b.text(4).unwrap_or_default();
println!("b: {:?}", text);
if text.contains("Click") {
println!("clicking");
let _ = b.type_text("foo");
b.focus().unwrap();
if let Err(e) = b.click() {
println!("failed to click: {:?}", e);
}
}
}
// input.focus().err().unwrap();
// let text = input.text(10).unwrap();
// println!("text: {:?}", text);

// let children = input.children().unwrap();
// println!("children: {:?}", children.len());
}
}
}
10 changes: 10 additions & 0 deletions screenpipe-db/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,16 @@ impl DatabaseManager {
.await
}

pub async fn get_frame_ocr_text(&self, frame_id: i64) -> Result<Option<String>, sqlx::Error> {
let result = sqlx::query_as::<_, (String,)>(
"SELECT text FROM ocr_text WHERE frame_id = ?"
)
.bind(frame_id)
.fetch_optional(&self.pool)
.await?;
Ok(result.map(|r| r.0))
}

#[allow(clippy::too_many_arguments)]
pub async fn count_search_results(
&self,
Expand Down
Binary file added screenpipe-server/assets/censored-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions screenpipe-server/src/bin/screenpipe-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ async fn main() -> anyhow::Result<()> {
cli.enable_ui_monitoring,
audio_manager.clone(),
cli.enable_pipe_manager,
cli.hide_window_texts.clone(),
);

// print screenpipe in gradient
Expand Down
4 changes: 4 additions & 0 deletions screenpipe-server/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ pub struct Cli {
#[arg(long, default_value_t = false)]
pub enable_pipe_manager: bool,

/// Keywords to hide in OCR text and frame responses (comma-separated)
#[arg(long, value_delimiter = ',')]
pub hide_window_texts: Vec<String>,

#[command(subcommand)]
pub command: Option<Command>,

Expand Down
1 change: 1 addition & 0 deletions screenpipe-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ pub use server::HealthCheckResponse;
pub use server::PaginatedResponse;
pub use server::SCServer;
pub use server::{api_list_monitors, MonitorInfo};
pub use server::{should_hide_content, create_censored_image};
pub use video::VideoCapture;
pub mod embedding;
Loading