Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yougotwill/sortifiler-cli
Get your files sorted from the command line.
https://github.com/yougotwill/sortifiler-cli
cli command-line files filesystem folders productivity sort sorting
Last synced: about 6 hours ago
JSON representation
Get your files sorted from the command line.
- Host: GitHub
- URL: https://github.com/yougotwill/sortifiler-cli
- Owner: yougotwill
- License: gpl-3.0
- Created: 2019-12-28T07:33:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T20:23:38.000Z (about 3 years ago)
- Last Synced: 2024-04-26T22:41:12.447Z (7 months ago)
- Topics: cli, command-line, files, filesystem, folders, productivity, sort, sorting
- Language: JavaScript
- Size: 76.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sortifiler CLI
> Get your files sorted from the command line. 📚🗂🖥
## Description
An opinionated command line interface to sort your files and folders easily while feeling like [Hackerman](https://knowyourmeme.com/memes/hackerman).**Desktop app coming soon! 🚀**
Everyday you look at your *Desktop/Downloads* folder and think, "Damn I need to clean up this mess". 🤦
That feeling is why this CLI now exists. 😆
Sortifiler CLI classifies files and folders and moves them into *\_Type* folders for easy access at the root of your chosen directory. 🗃
## Installation
To install Sortifiler CLI enter `npm -g install sortifiler-cli` into your terminal.
If you are looking for the Sortifiler API then check out [Sortifiler](https://github.com/yougotwill/sortifiler)!
## Usage
```
sortifiler --helpUsage
$ sortfilerOptions
no flags, Sorts all files and folders in a given path.
--files, -f Sort all files in a given path.
--folders, -F Sort all folders in a given path.
--config, -c Use a custom configuration file.is the path to directory that needs sorting
Examples
Sort all files and folders in the Downloads folder.
$ sortifiler ~/Downloads
Sorting ...
Sorted ✔Sort all files on the Desktop
$ sortifiler ~/Desktop --files
Sorting files ...
Sorted ✔Sort all folders in the Downloads folder
$ sortifiler ~/Downloads --folders
Sorting folders ...
Sorted ✔Sort all files and folders on the Desktop using a custom configuration file
$ sortifiler ~/Desktop --config ~/sortifiler.json
Loaded configuration ✔
Sorting folders ...
Sorted ✔
```## How does the sorting work?
- Folders are classified using the best matching *_Type* folder based on the files within that folder (only 1 level down).
- Files are classified as follows:| _Type Folder | File Extension |
| :------------- | :--------------------------------------- |
| _Books | ".epub", ".mobi" |
| _Documents | ".pdf", ".txt", ".doc", ".docx", ".ppt", ".pptx", ".md", ".json", ".ods", ".log", ".xls", ".xlsx", ".ttf" |
| _Images | ".png", ".jpg", ".jpeg", ".gif", ".xcf", ".stl", ".blend", "*.obj", "*.mtl", "*.3ds", "*.tga", ".icns" |
| _Music | ".mp3", ".wav", ".flac", ".m4a", ".ogg", ".mid", ".asd", ".m3u", ".pls", ".alp", ".asx", ".bfxrsound", ".m3u8", ".als", ".m4r" |
| _Programs | ".dmg", ".exe", ".sh", ".app", ".pkg", ".apk", ".ipa", ".gba", ".gbc" |
| _Scripts | ".py", ".java", ".class", ".sh", "*.cs", "*.r", ".itermcolors", ".terminal", ".theme", ".gbaskin", ".tmtheme", ".resbackup" |
| _Torrents | ".torrent" |
| _Videos | ".mkv", ".mp4", ".mov", ".mpeg", ".webm", ".srt", ".avi" |
| _Web | ".html", ".css", ".js", ".htm" |
| _Zipped | ".zip", ".rar", ".7z", ".tar.gz", ".tar", ".gz", "*.unitypackage", "*.prefab", ".fbx" |- **Note:** This list maybe outdated please check out [Sortifiler](https://github.com/yougotwill/sortifiler) for the latest info.
## Custom Configuration
You can customise the whitelist and sorting rules used by Sortifiler. Create a custom JSON file and then pass the file path to the `config` flag.
Example: sortifiler.json
```json
{
"whitelist": ["fileToIgnore.txt"],
"rules": {
"_Documents": ["*.pdf"],
"_Music": ["*.mp3"]
}
}
```## Development
### Contributing
1. Fork it
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin feature/my-new-feature`
5. Submit a pull request### Requirements / Dependencies
- npm
## Version
0.2.0
## License
[GNU GPLv3](LICENSE)