Archive clone sniffer (ACS) is a simple command line utility to catalog your archive file collection. Currently only RAR and ZIP archives are supported.
Note: No files are stored in the database. Only their metadata.
- Catalog your ZIP or RAR archives in an sqlite-3 database.
- Compare files or archives against entries in the database or against each other independent of a database. All-in-all four comparison modes are available:
- Compare 'list of files' against 'database' records
- Compare 'archive' against 'database' records
- Compare 'list of files' against 'archive'
- Compare 'archive' against 'another archive'
- CRC-32 checksum is used to check if matching files are already present
- SHA-1 checksum is computed to check for the uniqueness of the entire archive
- Uses the nifty terminaltable package to create nicely formatted reports
Create a Database
python clone_sniffer.py --create -db my_sqlite_database.db
Add files
# Add list of files
python clone_sniffer.py --add -db my_sqlite_database.db -f <list of files delimited by space>
# Add an archive
python clone_sniffer.py --add -db my_sqlite_database.db -a <ZIP or RAR archive>
Compare
# Check if file(s) are in database
python clone_sniffer.py --compare -db my_sqlite_datbase.db -f <list of files delimited by space>
# Check if files in archive are in database
python clone_sniffer.py --compare -db my_sqlite_datbase.db -a <ZIP or RAR archive>
# Check if file(s) are in archive
python clone_sniffer.py --compare -a <ZIP or RAR archive> -f <list of files delimited by space>
# Check if two archives contain matching files
python clone_sniffer.py --compare -a <ZIP or RAR archive> -a2 <ZIP or RAR archive>
List files
# For archive in Database
python clone_sniffer.py --list -db my_sqlite_database.db -a <ZIP or RAR archive>
# For archive
python clone_sniffer.py --list -a <ZIP or RAR archive>
Delete archive from Database
python clone_sniffer.py --delete -db my_sqlite_database.db -a <ZIP or RAR archive>
Run your own SQL query on the Database
python clone_sniffer.py -db my_sqlite_database.db --sql <SQL Statment>
- Unicode support on 2.x is shaky especially on Windows shell. Setting chcp to 65001 brings with it a different set of problems. There should be no problems with Python 3.x