Metadata-Version: 2.1
Name: desktop-parser
Version: 0.1.1
Summary: Parse .desktop files
Home-page: https://desktopcreatorteam.github.io/
License: GPL-3.0-or-later
Keywords: desktop,linux,freedesktop,parser,file,format,standard
Author: 0xMRTT
Author-email: 0xMRTT@tuta.io
Maintainer: 0xMRTT
Maintainer-email: 0xMRTT@tuta.io
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Project-URL: Bug Tracker, https://github.com/DesktopCreatorTeam/DesktopCreator/issues
Project-URL: Documentation, https://desktopcreatorteam.github.io/
Project-URL: Repository, https://github.com/DesktopCreatorTeam/DesktopCreator
Description-Content-Type: text/markdown

# Desktop Parser

This is a parser for the [`.desktop` file format](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). It's used in [Desktop Creator](https://github.com/DesktopCreatorTeam/DesktopCreator).

## Installation

### From pypi

```bash
pip install desktop-parser
```

### From source

```bash
git clone https://github.com/DesktopCreatorTeam/desktop-parser
cd desktop-parser
poetry install
```

### From the AUR

```bash
yay -S python-desktop-parser
```

## Usage

```python
from desktop_parser import DesktopFile

# Parse a file
desktop_file = DesktopFile.from_file("path/to/file.desktop")

desktop_file.data["Name"] = "New Name"
desktop_file.data["Exec"] = "new-exec"

# Save the file
desktop_file.save("path/to/file.desktop")
```

## Documentation

The documentation is available [here](https://desktopcreatorteam.github.io/desktop-parser/).

## License

This project is licensed under the GNU GPLv3 license - see the [LICENSE.md](LICENSE.md) file for details.

## Acknowledgments

* [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Authors and Contributors

* [Desktop Creator Team](https://github.com/DesktopCreatorTeam/DesktopCreator)
    - **[0xMRTT](https://github.com/0xMRTT)**
