Created
October 6, 2017 16:18
-
-
Save ximion/b96c3f9c3d58907be093db4eef7b87aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/python3 | |
import gi | |
gi.require_version('AppStream', '1.0') | |
from gi.repository import AppStream | |
from glob import glob | |
pool = AppStream.Pool.new() | |
for asdir in glob('/var/lib/flatpak/appstream/*/*/active/'): | |
pool.add_metadata_location(asdir) | |
pool.load() | |
cpts = pool.get_components_by_id('vlc.desktop') | |
for cpt in cpts: | |
print('{} - {}'.format(cpt.get_id(), cpt.get_name())) | |
cpts = pool.get_components_by_id('org.gnome.Glade.desktop') | |
for cpt in cpts: | |
print('{} - {}'.format(cpt.get_id(), cpt.get_name())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment