#desktop #entry #freedesktop

freedesktop-desktop-entry

Freedesktop Desktop Entry Specification

20 releases

0.7.5 Sep 5, 2024
0.7.0 Jul 16, 2024
0.5.1 Mar 11, 2024
0.5.0 Jan 15, 2022
0.1.1 Jul 7, 2019

#45 in Unix APIs

Download history 5598/week @ 2024-07-18 4198/week @ 2024-07-25 4261/week @ 2024-08-01 8731/week @ 2024-08-08 4459/week @ 2024-08-15 3366/week @ 2024-08-22 3337/week @ 2024-08-29 3355/week @ 2024-09-05 3642/week @ 2024-09-12 2595/week @ 2024-09-19 2841/week @ 2024-09-26 2417/week @ 2024-10-03 2216/week @ 2024-10-10 1388/week @ 2024-10-17 1212/week @ 2024-10-24 1581/week @ 2024-10-31

6,754 downloads per month
Used in 9 crates (8 directly)

MPL-2.0 license

41KB
935 lines

Freedesktop Desktop Entry Specification

crates.io docs.rs

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);
    }
}

License

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.

Contribution

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

Dependencies

~13–25MB
~136K SLoC