Last active
February 9, 2025 22:08
-
-
Save jaraco/b94f5314064d4dbb5fa615fd8b31672e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import configparser | |
import pathlib | |
files = list(pathlib.Path().glob('*.desktop')) | |
assert files | |
def main(): | |
parser = configparser.ConfigParser(interpolation=None) | |
for shortcut in files: | |
parser.clear() | |
parser.read(shortcut, encoding="utf-8") | |
assert list(parser['Desktop Entry']) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment