archive-tools

Tools for managing archives


Keywords
archiving, backup, cli, python, tar
License
Apache-2.0
Install
pip install archive-tools==0.5.1

Documentation

travis build status pypi version

Tools for managing archives

This package provides tools for managing archives. An archive in terms of this package is a (compressed) tar archive file with some embedded metadata on the included files. This metadata include the name, file stats, and checksums of the file.

The package provides a command line tool to enable the following tasks:

  • Create an archive, takes a list of files to include in the archive as input.
  • Check the integrity and consistency of an archive.
  • List the contents of the archive.
  • Display details on a file in an archive.
  • Given a list of files as input, list those files that are either not in the archive or where the file in the archive differs.

All tasks providing information on an archive take this information from the embedded metadata. Retrieving this metadata does not require reading through the compressed tar archive.

Download

The latest release version is available on PyPI, see https://pypi.org/project/archive-tools/

System requirements

Python:

  • Python 3.4 or newer.

Required library packages:

Optional library packages:

  • imapclient

    Required for the imap-to-archive.py script.

  • python-dateutil

    If the package is not available, some features will show slightly reduced functionality:

    • date strings will lack time zone indication.
    • the date formats recognized in the --mtime argument to archive-tool.py find are reduced.
  • setuptools_scm

    The version number is managed using this package. All source distributions add a static text file with the version number and fall back using that if setuptools_scm is not available. So this package is only needed to build out of the plain development source tree as cloned from GitHub.

  • pytest >= 3.0

    Only needed to run the test suite.

  • distutils-pytest

    Only needed to run the test suite.

  • pytest-dependency >= 0.2

    Only needed to run the test suite.

Installation

This package uses the distutils Python standard library package and follows its conventions of packaging source distributions. See the documentation on Installing Python Modules for details or to customize the install process.

  1. Download the sources, unpack, and change into the source directory.

  2. Build:

    $ python setup.py build
    
  3. Test (optional):

    $ python setup.py test
    
  4. Install:

    $ python setup.py install
    

The last step might require admin privileges in order to write into the site-packages directory of your Python installation.

Copyright and License

Copyright 2019 Rolf Krahl

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.