Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The .desktop spec requires keeping comments, so I can use a Python library that supports them listed below. #234

Open
DrewNaylor opened this issue Jul 12, 2023 · 1 comment

Comments

@DrewNaylor
Copy link
Owner

It's this one:
https://codeberg.org/JakobDev/desktop-entry-lib

I had to go through the developer's desktop file editor project to find the library that was in use but I don't remember the code, to be fully transparent on this. Hopefully it's ok because I don't remember any of the rest of the code I read even though the project is under GPLv3 (I'm planning on switching to it where necessary, anyway). Even then, I purposefully skimmed it to not internalize it.

This library is under the BSD 2-clause license.

I may have to figure out how it's keeping comments and extract that so I can have my config files keep their comments if I can't figure out anything else.

@DrewNaylor
Copy link
Owner Author

Or maybe I could use ConfigUpdater? https://github.com/pyscaffold/configupdater

Only issue is it doesn't support duplicate sections and keys, a major issue considering one of the Gnome .desktop files has a duplicate key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant