Software Heritage - Listers#
Collection of listers for source code distribution places like development forges, FOSS distributions, package managers, etc. Each lister is in charge to enumerate the software origins (e.g., VCS, packages, etc.) available at a source code distribution place.
A lister is a component from the Software Heritage stack aims to produce listings of software origins and their urls hosted on various public developer platforms or package managers. As these operations are quite similar, this package provides a set of Python modules abstracting common software origins listing behaviors.
It also provides several lister implementations, contained in the Python
swh.lister.*
modules. See this documentation for the list of
supported listers.
Dependencies#
All required python dependencies can be found in the requirements*.txt
files
located at the root of the repository.
In order to be able to run all the listers (and thus execute the tests), some tools must be available on your system, namely:
opam
tar
psql
On a Debian-like system, you may use:
Local deployment#
Lister configuration#
Each lister implemented so far by Software Heritage (bitbucket
, cgit
,
cran
, debian
, gitea
, github
, gitlab
, gnu
, golang
,
launchpad
, npm
, packagist
, phabricator
, pypi
, tuleap
,
maven
) must be configured by following the instructions below (please note
that you have to replace <lister_name>
by one of the lister name introduced
above).
Preparation steps#
mkdir ~/.config/swh/
create configuration file
~/.config/swh/listers.yml
Configuration file sample#
Minimalistic configuration shared by all listers to add in file
~/.config/swh/listers.yml
:
scheduler:
cls: 'remote'
args:
url: 'http://localhost:5008/'
credentials: {}
Note: This expects scheduler (5008) service to run locally
Executing a lister#
Once configured, a lister can be executed by using the swh
CLI tool with
the following options and commands:
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister <lister_name> [lister_parameters]
Examples:
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister bitbucket
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister cran
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister gitea url=https://codeberg.org/api/v1/
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister gitlab url=https://salsa.debian.org/api/v4/
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister npm
$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister pypi
Licensing#
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See top-level LICENSE file for the full text of the GNU General Public License along with this program.
Overview#
- Tutorial: list the content of your favorite forge in just a few steps
- Tutorial: run a lister within docker-dev in just a few steps
- Save a forge
- swh.lister package
- swh.lister.arch package
- swh.lister.aur package
- swh.lister.bioconductor package
- swh.lister.bitbucket package
- swh.lister.bower package
- swh.lister.cgit package
- swh.lister.conda package
- swh.lister.cpan package
- swh.lister.cran package
- swh.lister.crates package
- swh.lister.debian package
- swh.lister.dlang package
- swh.lister.elm package
- swh.lister.gitea package
- swh.lister.github package
- swh.lister.gitiles package
- swh.lister.gitlab package
- swh.lister.gitweb package
- swh.lister.gnu package
- swh.lister.gogs package
- swh.lister.golang package
- swh.lister.hackage package
- swh.lister.hex package
- swh.lister.julia package
- swh.lister.launchpad package
- swh.lister.maven package
- swh.lister.nixguix package
- swh.lister.npm package
- swh.lister.nuget package
- swh.lister.opam package
- swh.lister.packagist package
- swh.lister.pagure package
- swh.lister.phabricator package
- swh.lister.pubdev package
- swh.lister.puppet package
- swh.lister.pypi package
- swh.lister.rpm package
- swh.lister.rubygems package
- swh.lister.save_bulk package
- swh.lister.sourceforge package
- swh.lister.stagit package
- swh.lister.tuleap package
- swh.lister.cli module
- swh.lister.pattern module
- swh.lister.utils module