Crates.io | freedesktop-desktop-entry |
lib.rs | freedesktop-desktop-entry |
version | 0.7.5 |
source | src |
created_at | 2019-07-07 21:32:47.780573 |
updated_at | 2024-09-05 23:25:13.065502 |
description | Freedesktop Desktop Entry Specification |
homepage | |
repository | https://github.com/pop-os/freedesktop-desktop-entry |
max_upload_size | |
id | 147414 |
size | 87,333 |
This crate provides a library for efficiently parsing Desktop Entry files.
use freedesktop_desktop_entry::{default_paths, get_languages_from_env, Iter, PathSource};
fn main() {
let locales = get_languages_from_env();
for entry in Iter::new(default_paths()).entries(Some(&locales)) {
let path_src = PathSource::guess_from(&entry.path);
println!("{:?}: {}\n---\n{}", path_src, entry.path.display(), entry);
}
}
Licensed under the Mozilla Public License 2.0. Permissions of this copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.
Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the Mozilla Public License 2.0 (MPL-2.0). It is required to add a boilerplate copyright notice to the top of each file:
// Copyright {year} {person OR org} <{email}>
// SPDX-License-Identifier: MPL-2.0