file-organizer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFile Organizer - Mac 智能文件整理助手
File Organizer - Smart File Organizer for Mac
帮助用户整理下载文件夹中散落的办公文档,支持手动整理(智能文件夹)和自动整理两种模式,并与 disk-cleaner 配合保护重要文件。
Helps users organize scattered office documents in the Downloads folder, supporting two modes: manual organization (Smart Folder) and automatic organization, and works with disk-cleaner to protect important files.
When to Use
When to Use
Use this skill when users:
- 想整理电脑上的文件
- 下载文件夹太乱想整理
- 清理磁盘前想先把重要文件整理好
- 截图太多想归类
- 想找出占空间的大文件
Use this skill when users:
- Want to organize files on their computer
- Have a messy Downloads folder and want to organize it
- Want to organize important files before disk cleanup
- Have too many screenshots and want to categorize them
- Want to find large files that take up space
Features
Features
- 📥 默认整理下载文件夹 - 避免误动其他目录
- 🖐️ 手动模式 - 创建 macOS 智能文件夹,用户自己整理
- 🤖 自动模式 - 自动扫描并分类文件
- 📸 截图整理 - 按月份归类截图
- 💾 大文件发现 - 只显示明确用途的文件(PDF、PPT、视频等)
- 🔒 白名单机制 - 排除代码目录,保护项目文件
- 📥 Defaults to organizing the Downloads folder - Avoids accidental changes to other directories
- 🖐️ Manual Mode - Creates macOS Smart Folders for users to organize on their own
- 🤖 Automatic Mode - Automatically scans and categorizes files
- 📸 Screenshot Organization - Categorizes screenshots by month
- 💾 Large File Detection - Only displays files with clear purposes (PDF, PPT, videos, etc.)
- 🔒 Whitelist Mechanism - Excludes code directories to protect project files
File Categories
File Categories
专注办公文档,避免误移动代码文件:
| 分类 | 扩展名 |
|---|---|
| 📊 演示文稿 | .ppt, .pptx, .key |
| 📝 文档 | .doc, .docx, .pages, .rtf |
| 📈 表格 | .xls, .xlsx, .numbers, .csv |
| 🖼️ 图片 | .jpg, .png, .gif, .webp, .heic |
| 🎬 视频 | .mp4, .mov, .avi, .mkv |
| 🎵 音频 | .mp3, .wav, .flac, .m4a |
| 📦 压缩包 | .zip, .rar, .7z, .dmg |
| 📚 电子书 | .epub, .mobi, .azw3 |
Focuses on office documents and avoids accidental movement of code files:
| Category | Extensions |
|---|---|
| 📊 Presentations | .ppt, .pptx, .key |
| 📝 Documents | .doc, .docx, .pages, .rtf |
| 📈 Spreadsheets | .xls, .xlsx, .numbers, .csv |
| 🖼️ Images | .jpg, .png, .gif, .webp, .heic |
| 🎬 Videos | .mp4, .mov, .avi, .mkv |
| 🎵 Audio | .mp3, .wav, .flac, .m4a |
| 📦 Compressed Files | .zip, .rar, .7z, .dmg |
| 📚 E-books | .epub, .mobi, .azw3 |
Excluded Directories
Excluded Directories
类似 Mole 的白名单机制,自动排除:
- 代码目录: ,
.git,node_modules,venv__pycache__ - 系统目录: ,
Library.Trash - IDE 配置: ,
.idea.vscode - 构建产物: ,
build,distDerivedData
Similar to Mole's whitelist mechanism, automatically excludes:
- Code directories: ,
.git,node_modules,venv__pycache__ - System directories: ,
Library.Trash - IDE configurations: ,
.idea.vscode - Build artifacts: ,
build,distDerivedData
Usage
Usage
手动模式(创建智能文件夹)
Manual Mode (Create Smart Folders)
bash
undefinedbash
undefined默认整理下载文件夹
Defaults to organizing the Downloads folder
python scripts/file_organizer.py --manual
python scripts/file_organizer.py --manual
整理文档文件夹
Organize the Documents folder
python scripts/file_organizer.py --manual --scope documents
python scripts/file_organizer.py --manual --scope documents
整理整个用户目录
Organize the entire user directory
python scripts/file_organizer.py --manual --scope home
undefinedpython scripts/file_organizer.py --manual --scope home
undefined自动模式
Automatic Mode
bash
undefinedbash
undefined自动整理下载文件夹
Automatically organize the Downloads folder
python scripts/file_organizer.py --auto
python scripts/file_organizer.py --auto
预览模式(不实际移动)
Preview mode (no actual movement)
python scripts/file_organizer.py --auto --dry-run
python scripts/file_organizer.py --auto --dry-run
只整理最近 30 天的文件
Only organize files from the last 30 days
python scripts/file_organizer.py --auto --days 30
undefinedpython scripts/file_organizer.py --auto --days 30
undefined截图整理
Screenshot Organization
bash
undefinedbash
undefined查看截图
View screenshots
python scripts/file_organizer.py --screenshots
python scripts/file_organizer.py --screenshots
自动整理截图(按月份)
Automatically organize screenshots (by month)
python scripts/file_organizer.py --screenshots --auto
undefinedpython scripts/file_organizer.py --screenshots --auto
undefined大文件发现
Large File Detection
bash
undefinedbash
undefined查找大于 100MB 的文件
Find files larger than 100MB
python scripts/file_organizer.py --large-files
python scripts/file_organizer.py --large-files
查找大于 500MB 的文件
Find files larger than 500MB
python scripts/file_organizer.py --large-files --min-size 500
undefinedpython scripts/file_organizer.py --large-files --min-size 500
undefined查看状态
View Status
bash
python scripts/file_organizer.py --statusbash
python scripts/file_organizer.py --statusOutput Structure
Output Structure
手动模式
Manual Mode
~/Desktop/待整理/
├── 📊 演示文稿.savedSearch
├── 📝 文档.savedSearch
├── 📈 表格.savedSearch
├── 📄 PDF.savedSearch
├── 🖼️ 图片.savedSearch
├── 🎬 视频.savedSearch
├── 🎵 音频.savedSearch
├── 📦 压缩包.savedSearch
├── 📚 电子书.savedSearch
└── 💾 大文件 (>100MB).savedSearch~/Desktop/To-Organize/
├── 📊 Presentations.savedSearch
├── 📝 Documents.savedSearch
├── 📈 Spreadsheets.savedSearch
├── 📄 PDF.savedSearch
├── 🖼️ Images.savedSearch
├── 🎬 Videos.savedSearch
├── 🎵 Audio.savedSearch
├── 📦 Compressed Files.savedSearch
├── 📚 E-books.savedSearch
└── 💾 Large Files (>100MB).savedSearch自动模式
Automatic Mode
~/Desktop/已整理文件-20240125/
├── 演示文稿/
├── 文档/
├── 表格/
├── PDF/
├── 图片/
├── 视频/
├── 音频/
├── 压缩包/
└── 电子书/~/Desktop/Organized-Files-20240125/
├── Presentations/
├── Documents/
├── Spreadsheets/
├── PDF/
├── Images/
├── Videos/
├── Audio/
├── Compressed Files/
└── E-books/Integration with disk-cleaner
Integration with disk-cleaner
自动模式整理后的文件夹路径会自动写入 ,确保这些文件不会被 disk-cleaner 清理。
~/.config/mole/whitelist.txtThe folder path organized in automatic mode is automatically written to to ensure these files are not cleaned by disk-cleaner.
~/.config/mole/whitelist.txtDependencies
Dependencies
- macOS (使用 Spotlight 和智能文件夹功能)
- Python 3.8+
- macOS (uses Spotlight and Smart Folder features)
- Python 3.8+
Credits
Credits
- 与 disk-cleaner 配合使用
- 灵感来自 macOS 智能文件夹功能
- Works with disk-cleaner
- Inspired by macOS Smart Folder feature