| Crates.io | desktop-edit |
| lib.rs | desktop-edit |
| version | 0.1.1 |
| created_at | 2025-11-24 14:02:51.002395+00 |
| updated_at | 2025-12-08 02:47:08.824027+00 |
| description | A lossless parser and editor for .desktop files |
| homepage | https://github.com/jelmer/desktop-edit-rs |
| repository | |
| max_upload_size | |
| id | 1947915 |
| size | 55,125 |
A lossless parser and editor for .desktop files as specified by freedesktop.org Desktop Entry Specification.
This library preserves all whitespace, comments, and formatting while providing a structured way to read and modify .desktop files.
Name[de]=...use desktop_edit::Desktop;
use std::str::FromStr;
# let input = r#"[Desktop Entry]
# Name=Example Application
# Type=Application
# Exec=example
# Icon=example.png
# "#;
# let desktop = Desktop::from_str(input).unwrap();
# assert_eq!(desktop.groups().count(), 1);
# let group = desktop.groups().nth(0).unwrap();
# assert_eq!(group.name(), Some("Desktop Entry".to_string()));
Apache-2.0