ezsort 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ezsort-0.1.0/LICENSE +21 -0
- ezsort-0.1.0/PKG-INFO +357 -0
- ezsort-0.1.0/README.md +327 -0
- ezsort-0.1.0/ezsort/__init__.py +10 -0
- ezsort-0.1.0/ezsort/__main__.py +7 -0
- ezsort-0.1.0/ezsort/classifier.py +103 -0
- ezsort-0.1.0/ezsort/cli.py +429 -0
- ezsort-0.1.0/ezsort/config.py +98 -0
- ezsort-0.1.0/ezsort/constants.py +77 -0
- ezsort-0.1.0/ezsort/duplicate.py +101 -0
- ezsort-0.1.0/ezsort/history.py +144 -0
- ezsort-0.1.0/ezsort/models.py +69 -0
- ezsort-0.1.0/ezsort/organizer.py +121 -0
- ezsort-0.1.0/ezsort/planner.py +63 -0
- ezsort-0.1.0/ezsort/scanner.py +104 -0
- ezsort-0.1.0/ezsort/utils.py +91 -0
- ezsort-0.1.0/ezsort/watcher.py +107 -0
- ezsort-0.1.0/ezsort.egg-info/PKG-INFO +357 -0
- ezsort-0.1.0/ezsort.egg-info/SOURCES.txt +32 -0
- ezsort-0.1.0/ezsort.egg-info/dependency_links.txt +1 -0
- ezsort-0.1.0/ezsort.egg-info/entry_points.txt +2 -0
- ezsort-0.1.0/ezsort.egg-info/requires.txt +4 -0
- ezsort-0.1.0/ezsort.egg-info/top_level.txt +1 -0
- ezsort-0.1.0/pyproject.toml +59 -0
- ezsort-0.1.0/setup.cfg +4 -0
- ezsort-0.1.0/tests/test_classifier.py +156 -0
- ezsort-0.1.0/tests/test_cli.py +135 -0
- ezsort-0.1.0/tests/test_config.py +71 -0
- ezsort-0.1.0/tests/test_duplicates.py +69 -0
- ezsort-0.1.0/tests/test_history.py +108 -0
- ezsort-0.1.0/tests/test_organizer.py +107 -0
- ezsort-0.1.0/tests/test_planner.py +68 -0
- ezsort-0.1.0/tests/test_scanner.py +80 -0
- ezsort-0.1.0/tests/test_utils.py +60 -0
ezsort-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kritagya Dubey
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ezsort-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ezsort
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A safe, lightweight Python CLI that automatically organizes messy folders into categories.
|
|
5
|
+
Author: Kritagya Dubey
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kritagyadubey/EzSort
|
|
8
|
+
Project-URL: Repository, https://github.com/kritagyadubey/EzSort
|
|
9
|
+
Project-URL: Issues, https://github.com/kritagyadubey/EzSort/issues
|
|
10
|
+
Keywords: file-organizer,cli,cleanup,downloads,organization
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# EzSort
|
|
32
|
+
|
|
33
|
+
> Your downloads folder is a disaster. EzSort fixes that in one command.
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
___ ________ ____
|
|
37
|
+
/ | ______ / ____/ / / / /
|
|
38
|
+
/ /| | / __ \/ / / / / / /
|
|
39
|
+
/ ___ |/ /_/ / /___/ /_/ / /___
|
|
40
|
+
/_/ |_/_____/\____/\____/_____/
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## What does EzSort do?
|
|
46
|
+
|
|
47
|
+
It takes a messy folder and sorts every file into neat subfolders based on what kind of file it is.
|
|
48
|
+
|
|
49
|
+
**Before:**
|
|
50
|
+
```
|
|
51
|
+
Downloads/
|
|
52
|
+
├── vacation.jpg
|
|
53
|
+
├── tax-return.pdf
|
|
54
|
+
├── concert.mp4
|
|
55
|
+
├── playlist.mp3
|
|
56
|
+
├── backup.zip
|
|
57
|
+
├── setup.exe
|
|
58
|
+
├── app.py
|
|
59
|
+
├── budget.csv
|
|
60
|
+
├── presentation.pptx
|
|
61
|
+
├── .DS_Store
|
|
62
|
+
└── MyProject/
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**After `ezsort organize ~/Downloads`:**
|
|
66
|
+
```
|
|
67
|
+
Downloads/
|
|
68
|
+
├── Images/
|
|
69
|
+
│ └── vacation.jpg
|
|
70
|
+
├── Documents/
|
|
71
|
+
│ └── tax-return.pdf
|
|
72
|
+
├── Videos/
|
|
73
|
+
│ └── concert.mp4
|
|
74
|
+
├── Music/
|
|
75
|
+
│ └── playlist.mp3
|
|
76
|
+
├── Archives/
|
|
77
|
+
│ └── backup.zip
|
|
78
|
+
├── Applications/
|
|
79
|
+
│ └── setup.exe
|
|
80
|
+
├── Code/
|
|
81
|
+
│ └── app.py
|
|
82
|
+
├── Spreadsheets/
|
|
83
|
+
│ └── budget.csv
|
|
84
|
+
├── Presentations/
|
|
85
|
+
│ └── presentation.pptx
|
|
86
|
+
└── MyProject/ <- untouched
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
No files deleted. No files overwritten. Just organized.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Install
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install ezsort
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
That's it. Zero dependencies. Works on Windows, macOS, and Linux.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Quick Start
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Preview what would happen (nothing gets moved)
|
|
107
|
+
ezsort organize ~/Downloads --dry-run
|
|
108
|
+
|
|
109
|
+
# Actually sort the folder
|
|
110
|
+
ezsort organize ~/Downloads --yes
|
|
111
|
+
|
|
112
|
+
# Scan a folder to see what's in it
|
|
113
|
+
ezsort scan ~/Downloads
|
|
114
|
+
|
|
115
|
+
# Undo the last sort
|
|
116
|
+
ezsort undo
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Commands
|
|
122
|
+
|
|
123
|
+
### `organize` -- Sort a folder
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
ezsort organize ~/Downloads # Interactive (asks before moving)
|
|
127
|
+
ezsort organize ~/Downloads --yes # Skip confirmation
|
|
128
|
+
ezsort organize ~/Downloads --dry-run # Preview only
|
|
129
|
+
ezsort organize ~/Downloads -r # Include subfolders
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### `scan` -- Look without touching
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
ezsort scan ~/Downloads
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Shows file counts by category, potential duplicates, and how many files could be organized.
|
|
139
|
+
|
|
140
|
+
### `watch` -- Auto-sort new files
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
ezsort watch ~/Downloads
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Keeps a folder sorted automatically. New files get moved as they appear. Press `Ctrl+C` to stop.
|
|
147
|
+
|
|
148
|
+
### `undo` -- Take it back
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
ezsort undo
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Reverses the last sort operation. Every file goes back to where it was.
|
|
155
|
+
|
|
156
|
+
### `history` -- See what happened
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
ezsort history # List of past operations
|
|
160
|
+
ezsort history --details # Show individual files per operation
|
|
161
|
+
ezsort history --clear # Wipe the history
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### `stats` -- Your sorting numbers
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
ezsort stats
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Shows total files organized and breakdown by category.
|
|
171
|
+
|
|
172
|
+
### `config` -- View settings
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
ezsort config
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Shows categories, custom rules, excluded directories, and preferences.
|
|
179
|
+
|
|
180
|
+
### `--about` -- About EzSort
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
ezsort --about
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Shows version, author, and GitHub repo info.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Flags
|
|
191
|
+
|
|
192
|
+
| Flag | What it does |
|
|
193
|
+
|------|-------------|
|
|
194
|
+
| `--help` | Show help for any command |
|
|
195
|
+
| `--version` | Print version number |
|
|
196
|
+
| `--verbose`, `-v` | Show detailed logs |
|
|
197
|
+
| `--quiet`, `-q` | Suppress extra output |
|
|
198
|
+
| `--dry-run` | Preview without moving files |
|
|
199
|
+
| `--yes`, `-y` | Skip confirmation prompt |
|
|
200
|
+
| `--recursive`, `-r` | Include subdirectories |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## How it works
|
|
205
|
+
|
|
206
|
+
1. **Scan** -- EzSort walks through your folder and finds every file
|
|
207
|
+
2. **Classify** -- Each file gets matched to a category by its extension (140+ types supported)
|
|
208
|
+
3. **Plan** -- It builds a list of moves, skipping files that are already in the right place
|
|
209
|
+
4. **Execute** -- Files get moved into their category folders
|
|
210
|
+
5. **Record** -- Everything is logged so you can undo it later
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Safe by design
|
|
215
|
+
|
|
216
|
+
EzSort will never:
|
|
217
|
+
|
|
218
|
+
- Delete your files
|
|
219
|
+
- Overwrite existing files (duplicates get renamed: `report.pdf` -> `report (1).pdf`)
|
|
220
|
+
- Extract archives
|
|
221
|
+
- Move folders (only files)
|
|
222
|
+
- Upload anything
|
|
223
|
+
- Require internet access
|
|
224
|
+
|
|
225
|
+
It skips hidden files, symlinks, and its own working directories.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Custom rules
|
|
230
|
+
|
|
231
|
+
Create a config file to add your own classification rules:
|
|
232
|
+
|
|
233
|
+
- **Windows:** `%APPDATA%/EzSort/config.json`
|
|
234
|
+
- **Linux:** `~/.config/ezsort/config.json`
|
|
235
|
+
- **macOS:** `~/Library/Application Support/ezsort/config.json`
|
|
236
|
+
|
|
237
|
+
Example:
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"custom_rules": [
|
|
242
|
+
{
|
|
243
|
+
"type": "extension",
|
|
244
|
+
"pattern": ".psd",
|
|
245
|
+
"category": "Design"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "filename_contains",
|
|
249
|
+
"pattern": "invoice",
|
|
250
|
+
"category": "Documents/Invoices"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "filename_contains",
|
|
254
|
+
"pattern": "college",
|
|
255
|
+
"category": "Education"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Custom rules override the default categories. Priority goes top to bottom.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Supported file types
|
|
266
|
+
|
|
267
|
+
EzSort recognizes **140+ file extensions** across 12 categories:
|
|
268
|
+
|
|
269
|
+
| Category | Examples |
|
|
270
|
+
|----------|----------|
|
|
271
|
+
| Images | `.jpg`, `.png`, `.gif`, `.webp`, `.heic`, `.raw`, `.psd` |
|
|
272
|
+
| Videos | `.mp4`, `.mkv`, `.mov`, `.avi`, `.webm` |
|
|
273
|
+
| Music | `.mp3`, `.wav`, `.flac`, `.m4a`, `.ogg` |
|
|
274
|
+
| Documents | `.pdf`, `.docx`, `.txt`, `.md`, `.rtf` |
|
|
275
|
+
| Spreadsheets | `.xlsx`, `.csv`, `.ods`, `.tsv` |
|
|
276
|
+
| Presentations | `.pptx`, `.key`, `.odp` |
|
|
277
|
+
| Archives | `.zip`, `.rar`, `.7z`, `.tar.gz`, `.dmg` |
|
|
278
|
+
| Applications | `.exe`, `.msi`, `.deb`, `.apk`, `.app` |
|
|
279
|
+
| Code | `.py`, `.js`, `.ts`, `.java`, `.cpp`, `.go`, `.rs`, `.html` |
|
|
280
|
+
| Fonts | `.ttf`, `.otf`, `.woff2` |
|
|
281
|
+
| Ebooks | `.epub`, `.mobi`, `.azw3` |
|
|
282
|
+
| Torrents | `.torrent` |
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Platform support
|
|
287
|
+
|
|
288
|
+
- Windows 10/11
|
|
289
|
+
- macOS 10.15+
|
|
290
|
+
- Linux (Ubuntu, Fedora, Debian, Arch, etc.)
|
|
291
|
+
- Requires Python 3.8+
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Troubleshooting
|
|
296
|
+
|
|
297
|
+
**"command not found: ezsort"**
|
|
298
|
+
|
|
299
|
+
Make sure the package is installed:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
pip install ezsort
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Or run it as a Python module:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
python -m ezsort organize ~/Downloads
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**"Permission denied"**
|
|
312
|
+
|
|
313
|
+
Some system folders need elevated permissions. Try running with appropriate access for that specific folder.
|
|
314
|
+
|
|
315
|
+
**Files not being organized**
|
|
316
|
+
|
|
317
|
+
Add `--verbose` to see what's happening:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
ezsort organize ~/Downloads --verbose
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Development
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
git clone https://github.com/kritagyadubey/EzSort.git
|
|
329
|
+
cd EzSort
|
|
330
|
+
python -m venv venv
|
|
331
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
332
|
+
pip install -e ".[dev]"
|
|
333
|
+
pytest
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Contributing
|
|
339
|
+
|
|
340
|
+
Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## License
|
|
345
|
+
|
|
346
|
+
MIT License -- see [LICENSE](LICENSE) for details.
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Author
|
|
351
|
+
|
|
352
|
+
Built by **Kritagya Dubey**
|
|
353
|
+
|
|
354
|
+
- GitHub: [github.com/kritagyadubey/EzSort](https://github.com/kritagyadubey/EzSort)
|
|
355
|
+
- Issues: [github.com/kritagyadubey/EzSort/issues](https://github.com/kritagyadubey/EzSort/issues)
|
|
356
|
+
|
|
357
|
+
> Keep Your Files Sorted, Effortlessly.
|
ezsort-0.1.0/README.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# EzSort
|
|
2
|
+
|
|
3
|
+
> Your downloads folder is a disaster. EzSort fixes that in one command.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
___ ________ ____
|
|
7
|
+
/ | ______ / ____/ / / / /
|
|
8
|
+
/ /| | / __ \/ / / / / / /
|
|
9
|
+
/ ___ |/ /_/ / /___/ /_/ / /___
|
|
10
|
+
/_/ |_/_____/\____/\____/_____/
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What does EzSort do?
|
|
16
|
+
|
|
17
|
+
It takes a messy folder and sorts every file into neat subfolders based on what kind of file it is.
|
|
18
|
+
|
|
19
|
+
**Before:**
|
|
20
|
+
```
|
|
21
|
+
Downloads/
|
|
22
|
+
├── vacation.jpg
|
|
23
|
+
├── tax-return.pdf
|
|
24
|
+
├── concert.mp4
|
|
25
|
+
├── playlist.mp3
|
|
26
|
+
├── backup.zip
|
|
27
|
+
├── setup.exe
|
|
28
|
+
├── app.py
|
|
29
|
+
├── budget.csv
|
|
30
|
+
├── presentation.pptx
|
|
31
|
+
├── .DS_Store
|
|
32
|
+
└── MyProject/
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**After `ezsort organize ~/Downloads`:**
|
|
36
|
+
```
|
|
37
|
+
Downloads/
|
|
38
|
+
├── Images/
|
|
39
|
+
│ └── vacation.jpg
|
|
40
|
+
├── Documents/
|
|
41
|
+
│ └── tax-return.pdf
|
|
42
|
+
├── Videos/
|
|
43
|
+
│ └── concert.mp4
|
|
44
|
+
├── Music/
|
|
45
|
+
│ └── playlist.mp3
|
|
46
|
+
├── Archives/
|
|
47
|
+
│ └── backup.zip
|
|
48
|
+
├── Applications/
|
|
49
|
+
│ └── setup.exe
|
|
50
|
+
├── Code/
|
|
51
|
+
│ └── app.py
|
|
52
|
+
├── Spreadsheets/
|
|
53
|
+
│ └── budget.csv
|
|
54
|
+
├── Presentations/
|
|
55
|
+
│ └── presentation.pptx
|
|
56
|
+
└── MyProject/ <- untouched
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
No files deleted. No files overwritten. Just organized.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Install
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install ezsort
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
That's it. Zero dependencies. Works on Windows, macOS, and Linux.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Quick Start
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Preview what would happen (nothing gets moved)
|
|
77
|
+
ezsort organize ~/Downloads --dry-run
|
|
78
|
+
|
|
79
|
+
# Actually sort the folder
|
|
80
|
+
ezsort organize ~/Downloads --yes
|
|
81
|
+
|
|
82
|
+
# Scan a folder to see what's in it
|
|
83
|
+
ezsort scan ~/Downloads
|
|
84
|
+
|
|
85
|
+
# Undo the last sort
|
|
86
|
+
ezsort undo
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Commands
|
|
92
|
+
|
|
93
|
+
### `organize` -- Sort a folder
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
ezsort organize ~/Downloads # Interactive (asks before moving)
|
|
97
|
+
ezsort organize ~/Downloads --yes # Skip confirmation
|
|
98
|
+
ezsort organize ~/Downloads --dry-run # Preview only
|
|
99
|
+
ezsort organize ~/Downloads -r # Include subfolders
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### `scan` -- Look without touching
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
ezsort scan ~/Downloads
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Shows file counts by category, potential duplicates, and how many files could be organized.
|
|
109
|
+
|
|
110
|
+
### `watch` -- Auto-sort new files
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
ezsort watch ~/Downloads
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Keeps a folder sorted automatically. New files get moved as they appear. Press `Ctrl+C` to stop.
|
|
117
|
+
|
|
118
|
+
### `undo` -- Take it back
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
ezsort undo
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Reverses the last sort operation. Every file goes back to where it was.
|
|
125
|
+
|
|
126
|
+
### `history` -- See what happened
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
ezsort history # List of past operations
|
|
130
|
+
ezsort history --details # Show individual files per operation
|
|
131
|
+
ezsort history --clear # Wipe the history
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### `stats` -- Your sorting numbers
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
ezsort stats
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Shows total files organized and breakdown by category.
|
|
141
|
+
|
|
142
|
+
### `config` -- View settings
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
ezsort config
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Shows categories, custom rules, excluded directories, and preferences.
|
|
149
|
+
|
|
150
|
+
### `--about` -- About EzSort
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
ezsort --about
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Shows version, author, and GitHub repo info.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Flags
|
|
161
|
+
|
|
162
|
+
| Flag | What it does |
|
|
163
|
+
|------|-------------|
|
|
164
|
+
| `--help` | Show help for any command |
|
|
165
|
+
| `--version` | Print version number |
|
|
166
|
+
| `--verbose`, `-v` | Show detailed logs |
|
|
167
|
+
| `--quiet`, `-q` | Suppress extra output |
|
|
168
|
+
| `--dry-run` | Preview without moving files |
|
|
169
|
+
| `--yes`, `-y` | Skip confirmation prompt |
|
|
170
|
+
| `--recursive`, `-r` | Include subdirectories |
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## How it works
|
|
175
|
+
|
|
176
|
+
1. **Scan** -- EzSort walks through your folder and finds every file
|
|
177
|
+
2. **Classify** -- Each file gets matched to a category by its extension (140+ types supported)
|
|
178
|
+
3. **Plan** -- It builds a list of moves, skipping files that are already in the right place
|
|
179
|
+
4. **Execute** -- Files get moved into their category folders
|
|
180
|
+
5. **Record** -- Everything is logged so you can undo it later
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Safe by design
|
|
185
|
+
|
|
186
|
+
EzSort will never:
|
|
187
|
+
|
|
188
|
+
- Delete your files
|
|
189
|
+
- Overwrite existing files (duplicates get renamed: `report.pdf` -> `report (1).pdf`)
|
|
190
|
+
- Extract archives
|
|
191
|
+
- Move folders (only files)
|
|
192
|
+
- Upload anything
|
|
193
|
+
- Require internet access
|
|
194
|
+
|
|
195
|
+
It skips hidden files, symlinks, and its own working directories.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Custom rules
|
|
200
|
+
|
|
201
|
+
Create a config file to add your own classification rules:
|
|
202
|
+
|
|
203
|
+
- **Windows:** `%APPDATA%/EzSort/config.json`
|
|
204
|
+
- **Linux:** `~/.config/ezsort/config.json`
|
|
205
|
+
- **macOS:** `~/Library/Application Support/ezsort/config.json`
|
|
206
|
+
|
|
207
|
+
Example:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"custom_rules": [
|
|
212
|
+
{
|
|
213
|
+
"type": "extension",
|
|
214
|
+
"pattern": ".psd",
|
|
215
|
+
"category": "Design"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "filename_contains",
|
|
219
|
+
"pattern": "invoice",
|
|
220
|
+
"category": "Documents/Invoices"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "filename_contains",
|
|
224
|
+
"pattern": "college",
|
|
225
|
+
"category": "Education"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Custom rules override the default categories. Priority goes top to bottom.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Supported file types
|
|
236
|
+
|
|
237
|
+
EzSort recognizes **140+ file extensions** across 12 categories:
|
|
238
|
+
|
|
239
|
+
| Category | Examples |
|
|
240
|
+
|----------|----------|
|
|
241
|
+
| Images | `.jpg`, `.png`, `.gif`, `.webp`, `.heic`, `.raw`, `.psd` |
|
|
242
|
+
| Videos | `.mp4`, `.mkv`, `.mov`, `.avi`, `.webm` |
|
|
243
|
+
| Music | `.mp3`, `.wav`, `.flac`, `.m4a`, `.ogg` |
|
|
244
|
+
| Documents | `.pdf`, `.docx`, `.txt`, `.md`, `.rtf` |
|
|
245
|
+
| Spreadsheets | `.xlsx`, `.csv`, `.ods`, `.tsv` |
|
|
246
|
+
| Presentations | `.pptx`, `.key`, `.odp` |
|
|
247
|
+
| Archives | `.zip`, `.rar`, `.7z`, `.tar.gz`, `.dmg` |
|
|
248
|
+
| Applications | `.exe`, `.msi`, `.deb`, `.apk`, `.app` |
|
|
249
|
+
| Code | `.py`, `.js`, `.ts`, `.java`, `.cpp`, `.go`, `.rs`, `.html` |
|
|
250
|
+
| Fonts | `.ttf`, `.otf`, `.woff2` |
|
|
251
|
+
| Ebooks | `.epub`, `.mobi`, `.azw3` |
|
|
252
|
+
| Torrents | `.torrent` |
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Platform support
|
|
257
|
+
|
|
258
|
+
- Windows 10/11
|
|
259
|
+
- macOS 10.15+
|
|
260
|
+
- Linux (Ubuntu, Fedora, Debian, Arch, etc.)
|
|
261
|
+
- Requires Python 3.8+
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Troubleshooting
|
|
266
|
+
|
|
267
|
+
**"command not found: ezsort"**
|
|
268
|
+
|
|
269
|
+
Make sure the package is installed:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
pip install ezsort
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Or run it as a Python module:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
python -m ezsort organize ~/Downloads
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**"Permission denied"**
|
|
282
|
+
|
|
283
|
+
Some system folders need elevated permissions. Try running with appropriate access for that specific folder.
|
|
284
|
+
|
|
285
|
+
**Files not being organized**
|
|
286
|
+
|
|
287
|
+
Add `--verbose` to see what's happening:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
ezsort organize ~/Downloads --verbose
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Development
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
git clone https://github.com/kritagyadubey/EzSort.git
|
|
299
|
+
cd EzSort
|
|
300
|
+
python -m venv venv
|
|
301
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
302
|
+
pip install -e ".[dev]"
|
|
303
|
+
pytest
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Contributing
|
|
309
|
+
|
|
310
|
+
Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## License
|
|
315
|
+
|
|
316
|
+
MIT License -- see [LICENSE](LICENSE) for details.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Author
|
|
321
|
+
|
|
322
|
+
Built by **Kritagya Dubey**
|
|
323
|
+
|
|
324
|
+
- GitHub: [github.com/kritagyadubey/EzSort](https://github.com/kritagyadubey/EzSort)
|
|
325
|
+
- Issues: [github.com/kritagyadubey/EzSort/issues](https://github.com/kritagyadubey/EzSort/issues)
|
|
326
|
+
|
|
327
|
+
> Keep Your Files Sorted, Effortlessly.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""EzSort - Keep Your Files Sorted, Effortlessly.
|
|
2
|
+
|
|
3
|
+
A safe, lightweight Python CLI that automatically organizes messy folders
|
|
4
|
+
into categories based on file types.
|
|
5
|
+
|
|
6
|
+
Created by Kritagya Dubey
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
__version__ = "0.1.0"
|
|
10
|
+
__author__ = "Kritagya Dubey"
|