Metadata-Version: 2.1
Name: swh.alter
Version: 0.0.1
Summary: Software Heritage archive modification tools
Home-page: https://gitlab.softwareheritage.org/swh/devel/swh-alter
Author: Software Heritage developers
Author-email: swh-devel@inria.fr
Project-URL: Bug Reports, https://gitlab.softwareheritage.org/swh/devel/swh-alter/-/issues
Project-URL: Funding, https://www.softwareheritage.org/donate
Project-URL: Source, https://gitlab.softwareheritage.org/swh/devel/swh-alter
Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-alter/
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
Provides-Extra: testing
License-File: LICENSE
License-File: AUTHORS

Software Heritage - Archive altering facilities
===============================================

It happens for Software Heritage to record content that either should not
have been archived or should no longer be archived. ``swh-alter`` holds
the tools necessary to prune or make inaccessible content from Software
Heritage archive.

Usage
-----

First, create a configuration file, for example in ``~/.config/swh/alter.yml``, like the following:

.. code:: yaml

    storage:
      cls: postgresql
      db: "service=…"
      objstorage:
        cls: memory

    graph:
      cls: remote
      url: "http://granet.internal.softwareheritage.org:5009"

Then, the following command line will print a list of objects that can be
safely removed from the archive to take down the given origins:

.. code:: console

    $ SWH_CONFIG_FILENAME=~/config/swh.alter.yml \
      swh alter remove --dry-run \
          https://gitlab.softwareheritage.org/swh/devel/swh-alter.git \
          https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git

Only ``-dry-run`` is supported currently. Implementing actual removal is still
pending.
