Skip to main content

ISCC CLI - Creates ISCC Codes from Media Files

Project description

iscc-cli - Command Line Tool

Linux Build Status Windows Build Status

A command line tool that creates ISCC Codes for digital media files based on the reference implementation.

Table of Contents

Background

The International Standard Content Code is a proposal for an open standard for decentralized content identification. ISCC Codes are generated algorithmically from the content itself and offer many powerful features like content similarity clustering and partial integrity checks. If you want to learn more about the ISCC please check out https://iscc.codes.

Requirements

NOTE: Requires JAVA to be installed and on your path!

iscc-cli is tested on Linux and Windows with Python 3.5/3.6/3.7.

This tool depends on tika-python. Tika is used for extracting metadata and content from media files before generating ISCC Codes. On first execution of the iscc command line tool it will automatically download and launch the Java Tika Server in the background (this may take some time). Consecutive runs will access the existing Tika instance. You may explicitly pre-launch the Tika server with $ iscc init

Install

The ISCC command line tool is published with the package name iscc-cli on the Python Package Index and can be installed with pip:

$ pip3 install iscc-cli

Usage

Show help by calling iscc without any arguments:

$ iscc
Usage: iscc [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  gen*   Generate ISCC Code for a single media file.
  batch  Generate ISCC Codes for multiple files.
  init   Inititalize and check Tika server.

The gen command generates an ISCC Code for a single file:

$ iscc gen tests/demo.jpg
ISCC:CCTcjug7rM3Da-CYDfTq7Qc7Fre-CDYkLqqmQJaQk-CRAPu5NwQgAhv

The gen command is default so you can skip it and simply do $ iscc tests/demo.jpg

To get a more detailed result use the -v (--verbose) option:

$ iscc -v tests/demo.jpg
ISCC:CCTcjug7rM3Da-CYDfTq7Qc7Fre-CDYkLqqmQJaQk-CRAPu5NwQgAhv
Norm Title: concentrated cat
Tophash:    7a8d0c513142c45f417e761355bf71f11ad61d783cd8958ffc0712d00224a4d0
Filepath:   tests/demo.jpg
GMT:        image

Get help for a specific command:

$ iscc batch --help
Usage: iscc batch [OPTIONS] PATH

  Batch create ISCC Codes.

  Generates ISCC Codes for all media files in <PATH>.

Options:
  -r, --recursive  Recurse into subdirectories.
  --help           Show this message and exit.

Maintainers

@titusz

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT © 2019 Titusz Pan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iscc-cli-0.1.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

iscc_cli-0.1.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page