Crates.io | app-finder |
lib.rs | app-finder |
version | |
source | src |
created_at | 2024-12-10 15:20:06.567493 |
updated_at | 2024-12-10 15:20:06.567493 |
description | A cross-platform Rust library designed to help retrieve information about installed applications on various operating systems. |
homepage | |
repository | https://github.com/aihui999/app-finder |
max_upload_size | |
id | 1478637 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
app_finder
is a cross-platform Rust library designed to help retrieve information about installed applications on various operating systems. With this library, you can list all the installed apps, retrieve specific app details based on their address or file path, and export their icons.
It currently supports the following OSes (alphabetically sorted):
Below is an example of how to use the AppFinder
trait provided by the app_finder
library:
use std::net::SocketAddr;
use std::path::Path;
use app_finder::{AppFinder, App};
// List all installed applications
let apps = AppFinder::list();
for app in apps {
println!("App: {:?}", app);
}
// Export app icons to a folder
let folder_path = Path::new("/path/to/export/folder");
AppFinder::export_icons_to_folder(&apps, &folder_path, 64).unwrap();
// Get the base64-encoded icon of a specific app
let base64_icon = AppFinder::get_app_icon_base64(&apps[0], 64).unwrap();
println!("Base64 Icon: {}", base64_icon);
// Find an app by its network address
let addr: SocketAddr = "127.0.0.1:8080".parse().unwrap();
if let Some(app) = AppFinder::get_app_by_addr(addr) {
println!("App found by address: {:?}", app);
}
// Find an app by its installation path
let app_path = Path::new("/path/to/app");
if let Some(app) = AppFinder::get_app_by_path(app_path) {
println!("App found by path: {:?}", app);
}