GNU-devel ELPA - repology

repology

Description
Repology API access via Elisp
Latest
repology-1.2.4.0.20240108.130348.tar (.sig), 2024-Jan-08, 90.0 KiB
Maintainer
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Website
https://elpa.gnu.org/packages/repology.html
Browse repository
CGit or Gitweb
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

This package provides tools to query Repology API
(<https://repology.org/api>), process results, and display them.

The results of a query revolve around three types of objects:
projects, packages and problems.  Using this library, you can find
projects matching certain criteria, packages in a given project,
and possible problems in some repository.  See `repology-search-projects',
`repology-lookup-project', and `repology-report-problems'.
Projects-related requests are limited to `repology-projects-limit'.
All requests are cached during `repology-cache-duration' seconds.

By default, only projects recognized as free are included in the search
results.  You can control this behavior with the variable
`repology-free-projects-only'.  The function `repology-check-freedom'
is responsible for guessing if a project, or a package, is free.

You can then access data from those various objects using dedicated
accessors.  See, for example, `repology-project-name',
`repology-project-packages', `repology-package-field', or
`repology-problem-field'.

You can also decide to display (a subset of) results in a tabulated
list.  See `repology-display-package', `repology-display-packages',
`repology-display-projects' and `repology-display-problems'.  You
can control various aspects of the display, like the faces used
or the columns shown (see `repology-display-packages-columns',
`repology-display-projects-columns' and `repology-display-problems-columns').
When projects or packages are displayed, pressing <RET> gives you more
information about the item at point, whereas pressing <F> reports their
freedom status.

For example, the following expression displays all outdated projects
named after "emacs" and containing a package in GNU Guix repository
that I do not ignore:

   (repology-display-projects
    (seq-filter (lambda (project)
                  (not (member (repology-project-name project)
                               my-ignored-projects)))
                (repology-search-projects
                 :search "emacs" :inrepo "gnuguix" :outdated "on")))

By default, the package trusts Repology's status values to report
outdated packages.  However, this can introduce false positives.
You can then set `repology-outdated-project-definition' and call
`repology-filter-outdated-projects' to ignore those.

For example, with the following set-up, I can look for every
outdated Emacs packages and Asymptote package in GNU Guix, ignoring
bogus versions for "emacs:circe", and "emacs:erlang" package
altogether.  I also sort projects alphabetically.

   (setq repology-outdated-project-definition
         '(("emacs:circe" "<=2.11" nil)
           ("emacs:erlang" nil nil))
         repology-display-projects-sort-key "Project")

   (let ((repo "gnuguix"))
     (repology-display-projects
      (repology-filter-outdated-projects
          (append (repology-search-projects :search "emacs:" :outdated "on"
                                            :inrepo repo)
                  '("asymptote"))
          repo)
      repo))

Eventually, this library provides an interactive function with
a spartan interface wrapping this up: `repology'.  Since it builds
and displays incrementally search filters, you may use it as
a template to create your own queries.

Known issues:

- The library has no notion of distribution "family", since this
  doesn't appear in the API.  As a consequence, display functions
  cannot compute the "spread" of a project.  It falls back to the
  number of packages in the project instead.
- It does not handle "maintainers" queries.
- It is synchronous.  Don't go wild with `repology-projects-limit'!

Old versions

repology-1.2.3.0.20220320.111223.tar.lz2022-Mar-2018.3 KiB
repology-1.2.2.0.20220223.122212.tar.lz2022-Feb-2318.1 KiB
repology-1.2.1.0.20220223.92131.tar.lz2022-Feb-2318.1 KiB
repology-1.1.0.0.20220216.140107.tar.lz2022-Feb-1616.5 KiB
repology-1.0.1.0.20210124.112507.tar.lz2021-Jan-2415.8 KiB
repology-0.0.20210123.104702.tar.lz2021-Jan-2315.8 KiB
repology-0.0.20210122.194312.tar.lz2021-Jan-2215.7 KiB
repology-0.0.20210120.182128.tar.lz2021-Jan-2015.7 KiB
repology-0.0.20210119.132756.tar.lz2021-Jan-1915.7 KiB
repology-0.0.20210116.205939.tar.lz2021-Jan-1615.2 KiB