Parse .desktop files
Project description
Desktop Parser
This is a parser for the .desktop
file format. It's used in Desktop Creator.
Installation
From pypi
pip install desktop-parser
From source
git clone https://github.com/DesktopCreatorTeam/desktop-parser
cd desktop-parser
poetry install
From the AUR
yay -S python-desktop-parser
Usage
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.
License
This project is licensed under the GNU GPLv3 license - see the LICENSE.md file for details.
Acknowledgments
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Authors and Contributors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
desktop-parser-0.1.1.tar.gz
(15.2 kB
view details)
Built Distribution
File details
Details for the file desktop-parser-0.1.1.tar.gz
.
File metadata
- Download URL: desktop-parser-0.1.1.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b5622521343480d5175b369e72af894332a7c663baa08afd1d26edfe0111971 |
|
MD5 | 08449e234972e84b4868f6777d58d74e |
|
BLAKE2b-256 | 1fd5325d97cdcee29849d2fef8f11fee1358e07e848c605c144b766e325b4a58 |
File details
Details for the file desktop_parser-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: desktop_parser-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9e15799d6d79284239be5f6ee69d919c997c1c3e5646536daef16455780561c |
|
MD5 | f297088b1710db89c0ff656da4ab6596 |
|
BLAKE2b-256 | 5f018b13350d611989378c6c4d08ace8a7e0d8fb51c49ea52800262799a43a55 |