This is a parser for the .desktop file format. It's used in Desktop Creator.
pip install desktop-parsergit clone https://github.com/DesktopCreatorTeam/desktop-parser
cd desktop-parser
poetry installyay -S python-desktop-parserfrom 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")The documentation is available here.
This project is licensed under the GNU GPLv3 license - see the LICENSE.md file for details.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.