I want to generate a list of trending Arch/AUR packages that focuses on user-facing applications rather than background libraries and dependencies.

I wrote a script that uses the data from pkgstats to show non-dependency packages sorted by popularity. However, it doesn’t distinguish between applications and libraries, so the output isn’t very useful.

I want to identify and separate standalone applications from libraries and dependencies for both Arch official repositories and AUR packages. Not just for installed packages but for all of them.

pamac, Graphical Package Manager for Manjaro Linux with Alpm, AUR, Appstream, Flatpak and Snap support, seems to identify applications vs libraries/dependencies when grouping packages into categories like “Music & Audio” or “Games”. As seen in this code, pamac gets categorized package lists and populates the UI accordingly.

Since it may not be clear what libraries or dependencies are and I’m already using pamac as an example. I’ll consider packages that appear in pamac’s categories like Games and Music & Audio as applications, and other packages as libraries/dependencies.

As an alternative, I would consider end-user software the ones that aren’t required by any other packages. This isn’t perfect, just good enough. For example, this is how I would do this for installed packages.

How can I identify standalone applications and separate them from libraries/dependencies in the Arch/AUR package lists? The end goal is a trending packages list focused on end-user software rather than background components.

      • t0m5k1@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        To check all the repo’s you’re going to have to use something more than pacman, maybe a perl or python script that uses libalpm_databases to get the info you need, man libalpm_databases will help you get an idea of how to interact with it.

      • FiskFisk33@lemmy.one
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        I want to check all the packages in the Arch/AUR repositories, not just installed packages.

        yay -Syu *
        

        hahah I’m kidding, just to be clear

  • Atemu@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    You could count anything that is depended upon (a node in the dependency tree) as a library and anything that isn’d (a leaf) an app.

    Note that some end-usor applications are not “leaf” packages but nodes as they are both a library and an app (i.e. yt-dlp).

  • blobjim [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Maybe also add a criteria that they depend on X11, Wayland, (will still include libraries like java) or GUI toolkits like Qt or libadwaita/gtk.