Package: iscc-cli
iscc-cli  - Command Line ToolA command line tool that createsISCC Codesfor digital media files based on thereference implementation.Table of ContentsBackgroundInstallUsageMaintainersContributingLicenseBackgroundTheInternational Standard Content Codeis a proposal for anopen standardfor decentralized content identification.ISCC Codesare generated algorithmicallyfrom the content itselfand offer many powerful features like content similarity clustering and partial integrity checks. If you want to learn more about theISCCplease check outhttps://iscc.codes.This tool offers an easy way to generate ISCC codes from the command line. It supports content extraction viaApache Tikaand uses theISCC reference implementation.Supported Media File TypesTextdoc, docx, epub, html, odt, pdf, rtf, txt, xml, ibooks, md, xls, mobi ...Imagegif, jpg, png, tif, bmp, psd, eps ...Note: EPS (postscript) support requiresGhostscriptto be installed on your system and available on your PATH. (Make sure you can rungsfrom your command line.)Audioaif, mp3, ogg, wav ...Note: Support for the Audio-ID is experimental and not yet part of thespecificationVideo3gp, 3g2, asf, avi, flv, gif, mpg, mp4, mkv, mov, ogv, webm, wmv ...Note: Support for the Video-ID is experimentel and not yet part of thespecificationRequirementsNOTE: Requires JAVA to be installed and on your path!iscc-cliis tested on Linux, Windows, and macOS with Python 3.6/3.7/3.8.This tool depends ontika-python.Tikais used for extracting metadata and content from media files before generating ISCC Codes. On first execution of theiscccommand 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 initInstallThe ISCC command line tool is published with the package nameiscc-clion thePython Package Indexand can be installed with pip:$pip3installiscc-cliSelf-contained Windows binary executables are available for download at:https://github.com/iscc/iscc-cli/releases/UsageGetting HelpShow help overview by callingisccwithout any arguments:$isccUsage: iscc [OPTIONS] COMMAND [ARGS]...Options:--version  Show the version and exit.--help     Show this message and exit.Commands:gen*   Generate ISCC Code for FILE.batch  Create ISCC Codes for all files in PATH.dump   Dump Tika extraction results for PATH (file or url path).info   Show information about environment.init   Inititalize and check environment.sim    Estimate Similarity of ISCC Codes A & B.test   Test conformance with latest reference data.web    Generate ISCC Code from URL.Get help for a specific command by enteringiscc <command>:$isccgenUsage: iscc gen [OPTIONS] FILEGenerate ISCC Code for FILE.Options:-g, --guess       Guess title (first line of text).-t, --title TEXT  Title for Meta-ID creation.-e, --extra TEXT  Extra text for Meta-ID creation.-v, --verbose     Enables verbose mode.-h, --help        Show this message and exit.Generating ISCC CodesFor local filesThegencommand generates an ISCC Code for a single file:$isccgentests/image/demo.jpgISCC:CC1GG3hSxtbWU-CYDfTq7Qc7Fre-CDYkLqqmQJaQk-CRAPu5NwQgAhvThegencommand is default so you can skip it and simply do$ iscc tests/demo.jpgTo get a more detailed result use the-v(--verbose) option:$iscc-vtests/image/demo.jpgISCC:CC1GG3hSxtbWU-CYDfTq7Qc7Fre-CDYkLqqmQJaQk-CRAPu5NwQgAhvNorm Title: concentrated catTophash:    7a8d0c513142c45f417e761355bf71f11ad61d783cd8958ffc0712d00224a4d0Filepath:   tests/image/demo.jpgGMT:        imageSeeiscc batchfor help on how to generate ISCC codes for multiple files at once.For web urlsThewebcommand allows you to create ISCC codes from URLs:$isccwebhttps://iscc.foundation/news/images/lib-arch-ottawa.jpgISCC:CCbUCUSqQpyJo-CYaHPGcucqwe3-CDt4nQptEGP6M-CRestDoG7xZFySimilarity of ISCC CodesThesimcommand computes estimated similarity of two ISCC Codes:$isccsimCCUcKwdQc1jUMCCjMmrCsKWu1DEstimated Similarity of Meta-ID: 78.00 % (56 of 64 bits match)You may also compare full four-component ISCC Codes.Using from your python codeWhile this package is not built to be used as a library, some of the high level commands to generate ISCC Codes are exposed as vanilla python functions:fromiscc_cliimportlibfrompprintimportpprintpprint(lib.iscc_from_url("https://iscc.foundation/news/images/lib-arch-ottawa.jpg")){'gmt':'image','iscc':'CCbUCUSqQpyJo-CYaHPGcucqwe3-CDt4nQptEGP6M-CRestDoG7xZFy','norm_title':'library and archives canada ottawa','tophash':'e264cc07209bfaecc291f97c7f8765229ce4c1d36ac6901c477e05b2422eea3e'}Maintainers@tituszContributingPull 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.You may also want join our developer chat on Telegram athttps://t.me/iscc_dev.Change Log[0.9.12] - 2021-07-16Update to custom mediatype detection (without Tika requirement)Update dependencies[0.9.11] - 2020-06-12Update dependenciesRemove support for creating ISCC codes from youtube urls[0.9.10] - 2020-05-19Fixed issue with mime-type detectionChanged wording of similarity outputAdded CSV-compatible output for batch commandAdded debug option for batch commandUpdated dependencies[0.9.9] - 2020-05-18Fixed issue with tika & macOSAdded macOS ci testingUpdated dependencies[0.9.8] - 2020-05-13Updated Content-ID-Audio for robustness against transcoding (breaking change)Changed similarity calculation to match with web demoFixed bug in mime-type detectionUpdated dependencies[0.9.7] - 2020-05-01Add support for flac and opus audio formatsUpdate dependencies[0.9.6] - 2020-04-24Support urls with dump commandUpdated tika 1.24 and fpcalc 1.50Use filename for meta-id as last resortSwitch to signed audio fingerprint (breaking change)Bugfixes and stability improvements[0.9.5] - 2020-03-02Support mobi7Support mobi print replicaSupport mobi with web command[0.9.4] - 2020-03-02Add experimental support for mobi files[0.9.3] - 2020-02-18Add support for XHTMLFix error on unsupported media types[0.9.2] - 2020-01-30Add support for bmp, psd, xls, xlsxAdd tika server live testingFix error with title guess on image files[0.9.1] - 2020-01-05Fix issue with APP_DIR creation[0.9.0] - 2020-01-05Add experimental support for Video-IDAdd special handling of YouTube URLsAdd support for more Media Types (try & error)Add support for Python 3.8Remove support for Python 3.5[0.8.2] - 2019-12-22Add newtestcommand for confromance testingAdd support for .md (Markdown) filesUpdate to ISCC v1.0.5Update to Apache Tika 1.23Fix issue with non-conformant Meta-ID[0.8.1] - 2019-12-13Add support for tif filesAdd support for eps filesSet application directory to non-roaming path[0.8.0] - 2019-11-23Add newdumpcommand (dumps extraction results)Add support for iBooks filesFix error with tika 1.22 dependencyStore tika server in non-volatile storage[0.7.0] - 2019-09-12Expose commands as python APIFix title guessing bug[0.6.0] - 2019-06-11Added newwebcommand (creates ISCC Codes for URLs)[0.5.0] - 2019-06-06Added experimental support for aif, mp3, ogg, wavMore verbose batch outputFix batch output default Meta-ID[0.4.0] - 2019-06-03Added support for html, odt, txt, xml, gifAdded optional guessing of title (first line of text)Added newinfocommandFixed wrong detection of identical Instance-ID[0.3.0] - 2019-06-01Addsimcommand similarity comparison of ISCC Codes[0.2.0] - 2019-05-31Add support for doc, docx and rtf documentsUpdate to ISCC 1.0.4 (fixes whitespace bug)[0.1.0] - 2019-05-31Basic ISCC Code creationSupported file types: jpg, png, pdf, epubLicenseMIT © 2019-2021 Titusz Pan