Metadata-Version: 2.4
Name: onlyone
Version: 2.5.9
Summary: Fast duplicate file finder with optional GUI
Author-email: initumX <initum.x@gmail.com>
License: MIT License
        
        Copyright (c) 2026 initumX (initum.x@gmail.com)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: xxhash>=3.0.0
Requires-Dist: send2trash>=1.8.0
Provides-Extra: gui
Requires-Dist: PySide6; extra == "gui"
Requires-Dist: Pillow>=9.0.0; extra == "gui"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-qt>=4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: license-file


# [OnlyOne](https://github.com/initumX/onlyone)

![screenshot](https://raw.githubusercontent.com/initumX/onlyone/refs/heads/main/onlyone258.png)

A PyQt-based tool for finding and removing duplicate files with advanced filtering and progress tracking.

*Note: GUI-version is "extra"(not mandatory part), so to install app with gui, use:

`pip install onlyone[gui]`

## How to install and run
  1. Create python virtual environment: `python3 -m venv ~/mytestenv`
  2. Switch and activate to it `cd ~/mytestenv && source bin/activate`
  3. Install onlyone into it: `pip install onlyone[gui]`
  4. Run the app: `onlyone-gui`  or `onlyone`(for cli)  
Note: Newest OnlyOne requires at least **python 3.8** (but higher version is recommended)

##  [GitHub](https://github.com/initumX/onlyone)   
* You can download binary for linux and windows from [github release](https://github.com/initumX/onlyone/releases)  
* If you like this app, push a star on its [github page](https://github.com/initumX/onlyone)  
* See [Changelog](https://github.com/initumX/onlyone/blob/main/CHANGELOG.md) to see what's new you can find here

## NOTE!
FOR HIGHLY SIMILAR FILES ONLY FULL MODE IS RELIABLE.  
Highly similar files means the same size, same 64+ kbytes at start, end and middle point of the file.  
Normal mode is 100% reliable only for files <= 256KB (app uses 128KB chunks for files of this size).  
Bigger files are compared in NORMAL mode just by size and 3 little chunks (64+ KB, chunk is adaptive).  
It's ok in the most cases, but sometimes it can lead to false positives.  
Don't use versions older than 2.5.7, they are not reliable.

### Features
* Filtering by file size and extension
* Sorting inside duplicate groups 
* Supporting various deduplication modes
* Preview images/pdf directly in the interface
* Context menu(open/delete/reveal in explorer)
* Progress tracking
* One click deletion (delete all duplicates at once)
* Priority and excluded directories functionality
* Statistics/report
* XXHASH hashing algorithm (30% faster than BLAKE3, and 3-3.5x faster than MD5)

### How does it work?
1. Recursively scans folder using filters (min/max size, extension)  
2. Applies one of the initial grouping ways from "boosting" option (size, size+extension, etc)  
3. Further checking depends on mode:  
   * "normal": checks hash-sum of 3 parts of the file: front -> middle -> end (generally reliable)  
   * "full": checks hash-sum of front -> middle -> end -> entire file (very slow for large files)  
4. Shows the list of groups sorted in descending order (groups with larger files come first).   
   **Files inside a group are sorted by path/filename length (you can regulate this).

### Deleting all duplicates at once
The main principle: ALL files moved to trash EXCEPT the FIRST file in each group.  
Which file is "first" depends on sorting:  
* Priority files(files from "Priority Folders", if set) always come first
  * Among priorities: file with shortest path (by default) comes first
* Among non-priorities: same rule (shortest path is used by default for in-group sorting)  
If both files have the same path depth, the file with shortest filename wins the first place.

      REMEMBER: In the end, there can be only one file/per group :)
---


### How to use cli-version
Examples:  
Find and show duplicates in Downloads, Documents and Videos folders:  
`onlyone -i ~/Downloads ~/Documents ~/Videos`  

Filter files by size and extensions and find duplicates:  
`onlyone -i .~/Downloads -m 500KB -M 10MB -x .jpg .png`

Filter files by size, exclude extensions jpg and png, find duplicates:  
`onlyone -i .~/Downloads -m 500KB -M 10MB -x ^ .jpg .png`

Filter files by size, include extensions jpg and png only, find duplicates:  
`onlyone -i .~/Downloads -m 500KB -M 10MB -x .jpg .png`

Same as above + move duplicates to trash (with confirmation prompt):  
`onlyone -i .~/Downloads -m 500KB -M 10MB -x .jpg .png --keep-one`

Same as above but without confirmation and with output to a file (for scripts):  
`onlyone -i .~/Downloads -m 500KB -M 10MB -x .jpg .png --keep-one --force > ~/Downloads/report.txt`
    
Options:  
`-i, --input`          input folder(or multiple space separated folders)  
`-m, --min-size`       min size filter  
`-M, --max-size`       max size filter  
`-x, --extensions`     extension filter (space separated, start with ^ to make extensions list work in "blacklist" mode)    
`-p, --priority-dirs`  priority dirs (space separated). Files from here are prioritized to keep (come first in each group)   
`--excluded-dirs`     excluded/ignored dirs (space separated)  
`--boost {size,extension,filename,fuzzy}`  Rule for initial file grouping:  
* `size` Group files of the same size only (default)  
* `extension`  Group files of the same size and extension  
* `filename`   Group files of the same size and filename  
* `fuzzy`      Group files of the same size and similar filename

`**Groups formed above will be checked (hash-checking) in further stages`  

`--mode {fast, normal, full}` checking mode (normal by default)
* `normal`  check by hashsum from 3 parts of file  
* `full`    same as "normal mode" but with whole file hashsum at final stage

`--sort {shortest-path, shortest-filename}` sorting inside a group (shortest-path by default)  
`--dry-run`             Test running  
`--keep-one`            Keep one file/per group and move the rest to trash (one confirmation)  
`--keep-one --force`    Keep one file/per group and move the rest to trash (no confirmation)  
`--ascii`               ASCII-compilant output  
`--stats`               Show stats  
`--version, -v`         Show version and exit   
`--help, -h`            Show help file  

### TESTS
`pytest tests/ -v` 

### Build with Pyinstaller
`pyinstaller --noconfirm --clean --noconsole --copy-metadata=onlyone --onefile --paths ./src --name=OnlyOne --exclude-module=PySide6.QtNetwork ./src/onlyone/gui/launcher.py` 

### Built With  
- Python 3.x
- PySide6 (Qt)
- send2trash
- PIL/Pillow (for image handling)
- xxhash

### LINKS
 * [GitHub Page](https://github.com/initumX/onlyone)
 * [Releases](https://github.com/initumX/onlyone/releases)
 * [PyPI](https://pypi.org/project/onlyone/)
 * email (initum.x@gmail.com)  

[![PyPI Downloads](https://static.pepy.tech/personalized-badge/onlyone?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/onlyone)

© 2026 initumX
