Command-line interface#

swh indexer#

Software Heritage Indexer tools.

The Indexer is used to mine the content of the archive and extract derived information from archive source code artifacts.

Usage

swh indexer [OPTIONS] COMMAND [ARGS]...

Options

-C, --config-file <config_file>#

Configuration file.

journal-client#

Listens for new objects from the SWH Journal, and runs the indexers which names are passed as argument.

If no indexer name is given, or if ‘*’ is passed as indexer name, then runs all registered indexers.

Usage

swh indexer journal-client [OPTIONS] INDEXER

Options

--broker <brokers>#

Kafka broker to connect to.

--prefix <prefix>#

Prefix of Kafka topic names to read from.

--group-id <group_id>#

Consumer/group id for reading from Kafka.

-m, --stop-after-objects <stop_after_objects>#

Maximum number of objects to replay. Default is to run forever.

-b, --batch-size <batch_size>#

Batch size. Default is 200.

Arguments

INDEXER#

Optional argument(s)

list#

List registered indexers

Usage

swh indexer list [OPTIONS]

Options

-v, --verbose#

Show description of each listed indexer.

-l, --long#

Show full description of each listed indexer.

mapping#

Manage Software Heritage Indexer mappings.

Usage

swh indexer mapping [OPTIONS] COMMAND [ARGS]...

list#

Prints the list of known mappings.

Usage

swh indexer mapping list [OPTIONS]

list-terms#

Prints the list of known CodeMeta terms, and which mappings support them.

Usage

swh indexer mapping list-terms [OPTIONS]

Options

--exclude-mapping <exclude_mapping>#

Exclude the given mapping from the output

--concise#

Don’t print the list of mappings supporting each term.

translate#

Translates file from mapping-name to codemeta format.

Usage

swh indexer mapping translate [OPTIONS] MAPPING_NAME FILE

Arguments

MAPPING_NAME#

Required argument

FILE#

Required argument

rpc-serve#

Starts a Software Heritage Indexer RPC HTTP server.

Usage

swh indexer rpc-serve [OPTIONS] CONFIG_PATH

Options

--host <host>#

Host to run the server

--port <port>#

Binding port of the server

--debug, --nodebug#

Indicates if the server should run in debug mode

Arguments

CONFIG_PATH#

Required argument