Skip to main content

A small duplicate handler CLI tool.

Project description

DUPLICATE-DETECTOR

Functions:

$ python -m duplicate-detector [compare|sort]

Compare :

$ python -m duplicate-detector compare INPUT_DIR TARGET

Scan both directories (INPUT-DIR and TARGET). Compares the files solely on FILE NAME. Every file found in both directories are moved from their originals paths in INPUT-DIR into INPUT-DIR/DUPLICATES.

Files in the TARGET directory are never moved.

sort:

$ python -m duplicate-detector sort INPUT_DIR OUTPUT_DIR

Sort a directory INPUT-DIR of pictures and videos ('JPG', 'JPEG', 'PNG', 'MP4', 'MOV') into an OUTPUT-DIR. Files in OUTPUT-DIR are sorted into folders by year and month, based on their metadata, as following : OUTPUT-DIR/YEAR/MONTH/pictures.

If multiple file have the same file name, the heaviest get sorted into OUTPUT-DIR/YEAR/MONTH and the others into OUTPUT-DIR/DUPLICATES.

If no metadata is found for a file, it is not moved. If a file is not in the supported extensions, it is not moved.

Installation:

For ubuntu:

Install python3.8 , and required librairies:

Without virtual env:

$ sudo python3.8 -m pip install -r requirements.txt

With virtual env:

$ virtualenv venv -p /usr/bin/python3.8
$ source venv/bin/activate
$ python -m pip install -r requirements.txt

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

duplicate_detector-0.0.7.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

duplicate_detector-0.0.7-py3-none-any.whl (7.2 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