Crate desktop_edit

Crate desktop_edit 

Source
Expand description

§desktop-edit

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.

§Features

  • Lossless parsing: All whitespace, comments, and formatting are preserved
  • FreeDesktop .desktop file support: Full support for the freedesktop.org Desktop Entry specification
  • Locale support: Handle localized keys like Name[de]=...

§Example

use desktop_edit::Desktop;
use std::str::FromStr;

§License

Apache-2.0 A lossless .desktop file parser and editor.

This library provides a lossless parser for .desktop files as specified by the freedesktop.org Desktop Entry Specification. It preserves all whitespace, comments, and formatting. It is based on the rowan library.

Structs§

Desktop
The root of an INI/.desktop file
Entry
A key-value entry in a group
Group
A group/section in an INI/.desktop file (e.g., [Desktop Entry])
Parse
The result of parsing: a syntax tree and a collection of errors.
ParseError
List of encountered syntax errors.
PositionedParseError
A positioned parse error containing location information.
TextRange
A range in text, represented as a pair of TextSize.

Enums§

Error
Error parsing INI/.desktop files
Lang
Language definition for rowan
SyntaxKind
Token types for INI/.desktop files