Monday, April 29, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 356  / 3 Years ago, tue, july 20, 2021, 3:31:09

Is there a place/tool that rank apps based on given statistics? For example, say I want to see which music player is more popular (amarok, clementine, gmusicbrowser...)



Gnome Software does not have that information. I know there are some statistics in the Debian Popularity Contest, but you can only search one app at the time. Additionally, you need to know the app you are looking for (which does not allow you to discover those that you do not know), and, you can search only using the name of the package, which might not coincide with the app name.



Any idea? Maybe using some type of script that gets a list of related packages (from where?) and look up for them in the aforementioned website? Perhaps using a web scrapper tool? This could be a nice feature to have in Gnome Software and in Ubuntu apps, and surely not too difficult to implement.


More From » software-center

 Answers
4

I know there are some statistics in the Debian Popularity Contest, but you can only search one app at the time. Additionally, you need to know the app you are looking for (which does not allow you to discover those that you do not know), and, you can search only using the name of the package, which might not coincide with the app name.




If you look in /usr/share/app-install/desktop, you'll see a list of .desktop files for applications available in the Software Center.



Each of these .desktop files has a line with a Popcon score. For example, the Audacious music player has this:

X-AppInstall-Popcon=1395



It is possible to scan all the .desktop files, or just a subset, for their Popcon scores. The code in the following example looks at a subset of .desktop files that contain any of the following strings: audio, media, music, or video.



cd /usr/share/app-install/desktop
grep -iE "(audio|media|music|video)" *.desktop | awk -F: '{ print $1":"$2 }' | sort -u | tr '
' '0' | xargs -0 grep -A5 Popcon



  • grep is used to get a list of such .desktop files.


  • awk extracts just the actual filenames and duplicates are removed using sort -u


  • tr makes the output from sort suitable to xargs


  • xargs takes the filenames, now separated by null bytes, and appends each filename as an argument to grep.


  • grep lists out the .desktop files with their Popcon scores on the first line and, on a subsequent line, you mostly will see the applications common name. There's some ambiguity about which exact line the common name will appear on, because not all .desktop files have exactly the same structure!




Here's are some "successful" samples:



Amarok



amarok:kde4__amarok.desktop:X-AppInstall-Popcon=2313
amarok:kde4__amarok.desktop-X-AppInstall-Section=universe
amarok:kde4__amarok.desktop-
amarok:kde4__amarok.desktop-Type=Application
amarok:kde4__amarok.desktop-Version=1.0
amarok:kde4__amarok.desktop-Name=Amarok


Clementine



clementine:clementine.desktop:X-AppInstall-Popcon=919
clementine:clementine.desktop-X-AppInstall-Section=universe
clementine:clementine.desktop-
clementine:clementine.desktop-Version=1.0
clementine:clementine.desktop-Type=Application
clementine:clementine.desktop-Name=Clementine


gmusicbrowser



gmusicbrowser:gmusicbrowser.desktop:X-AppInstall-Popcon=498
gmusicbrowser:gmusicbrowser.desktop-X-AppInstall-Section=universe
gmusicbrowser:gmusicbrowser.desktop-
gmusicbrowser:gmusicbrowser.desktop-Name=gmusicbrowser
gmusicbrowser:gmusicbrowser.desktop-Comment=Jukebox for large collections of mp3/ogg/flac/mpc
gmusicbrowser:gmusicbrowser.desktop-Exec=gmusicbrowser %F


mpv



mpv:mpv.desktop:X-AppInstall-Popcon=126
mpv:mpv.desktop-X-AppInstall-Section=universe
mpv:mpv.desktop-
mpv:mpv.desktop-Type=Application
mpv:mpv.desktop-Name=mpv Media Player
mpv:mpv.desktop-GenericName=Multimedia player


vlc



vlc:vlc.desktop:X-AppInstall-Popcon=19735
vlc:vlc.desktop-X-AppInstall-Section=universe
vlc:vlc.desktop-
vlc:vlc.desktop-Version=1.0
vlc:vlc.desktop-Name=VLC media player
vlc:vlc.desktop-GenericName=Media player


Once you have this output, you can clean it up further and perhaps stick it into a spreadsheet for further study.






I don't know how often the Popcon scores are updated. The .desktop files on my system are dated 20150910!


[#12681] Tuesday, July 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ousear

Total Points: 395
Total Questions: 114
Total Answers: 89

Location: Jordan
Member since Thu, Aug 5, 2021
3 Years ago
ousear questions
Tue, Sep 27, 22, 03:29, 2 Years ago
Thu, Nov 25, 21, 00:51, 2 Years ago
Tue, Feb 22, 22, 17:47, 2 Years ago
;