Skip to main content

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


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.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

desktop_parser-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file desktop-parser-0.1.0.tar.gz.

File metadata

  • Download URL: desktop-parser-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for desktop-parser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ac2237e5de574629b3938d9822b323628a97e7ef4a0d22bc39d85ff29258cfbd
MD5 d7c3829ed39269a6f7e7afa8c9c1c3cc
BLAKE2b-256 e177d8286f1fac3f2b4075a3c17642d3eb02cef9db019a03ecf2d5d920daef17

See more details on using hashes here.

File details

Details for the file desktop_parser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for desktop_parser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e049f1614d10c44bc842e267d1b26360dcb114cac760fd022e54d22c2295b9b6
MD5 b1d1517cf85c598bfb828e4c41c84a61
BLAKE2b-256 665c58a1a82f51846deac391eae7063708142a9e900acb1edaf601e6921a045c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page