turbotask
v0.2.20
Published
A command-line tool that Makes Handling files quick and easy.
Downloads
77
Maintainers
Readme
TurboTask File Processing Toolkit
A versatile Node.js toolkit designed to simplify file processing tasks, with a focus on efficiency and ease of use. Currently supports File Grouping and CSS minification with plans for expanded functionality including media analysis, and more.
🚀 Quick Start
npm install -g turbotask
✨ Features
Current Features
File Grouping
- Automatically organize files by file type
- Handle nested directory processing
CSS Processing
- Minify CSS files by removing comments and whitespace
- Process single files or entire directories
- Maintain directory structures
- Safe processing with validation checks
Planned Features
- Media analysis
- More file processing capabilities (coming soon)
📦 Installation
NPM (Recommended) [Stable]
npm install -g turbotask
Manual Installation
# Clone the repository
git clone https://github.com/Fector101/TurboTask.git
# Navigate to the project directory
cd TurboTask/nodejs
# Install dependencies
npm install -g .
🔨 Usage Guide
File Grouping
turbotask group [optional_main_path]
The argument:
- [optional_main_path] The main Folder the code will start the scan from (default is './' the folder the code is being ran from).
Examples For CLI Usage
# Group files in current directory
turbotask group
# Group files in specific directory
turbotask group "C:/Users/Bob/Downloads"
Examples For In-File Usage
const {group} = require("turbotask")
// Groups are files in downloads folder
group('C:/Users/Bob/Downloads')
.then(details=>console.log(details))
// The resulting output will resemble:
// {
// 'Number of scanned folders': 100,
// 'Number of Moved Files': 467,
// Errors: []
// }
// Groups are files in current file directory
group('./')
CSS Whitespace Removal
turbotask noWhiteSpace <input_css_path> [optional_output_path]
The noWhiteSpace arguments:
- <input_css_path> can be a CSS file or Folder with CSS Files.
- [optional_output_path] Output directory (defaults to "TurboTask-output") can be changed to a File or Folder Path
Examples For CLI Usage
turbotask noWhiteSpace rough.css clean.css
OR
turbotask noWhiteSpace ./styles ./minified
Examples For In-File Usage
const {noWhiteSpace} = require("turbotask")
// For Single File
noWhiteSpace('main.css','main-new.css')
// For a Folder
noWhiteSpace('./styles','./minified')
noWhiteSpace('./','./minified')
// If you dont' want to Over-Write Original Files add a output folder
noWhiteSpace('','')
Error Handling
The toolkit implements comprehensive error handling:
- File existence validation
- Directory creation verification
- Read/Write operation protection
- Format-specific validation (e.g., CSS comment structure)
- Colored error messages for visibility
🔄 Future Development
The toolkit is designed for expansion. Planned features include:
File Organization
- Duplicate detection
Media Processing
- Duration analysis
- Format conversion
- Metadata extraction
General Utilities
- Advanced file manipulation
🤝 Contributing
Contributions are welcome! The modular architecture makes it easy to add new features:
- Add new worker modules for specific file types
- Extend helper utilities for common operations
- Implement new CLI commands for new features
⚠️ Error Codes
Common error messages and their meanings:
<Error - [filepath] Doesn't Exist>
: File not foundFailed to create directory
: Permission or path issues- Custom error messages can be specified for writeFile operations
🐛 Reporting Issues
Found a bug? Please open an issue on our GitHub Issues page.
📝 Notes
- The toolkit is under active development
- New features will be added progressively
- Maintains backward compatibility with existing functionality
- Focuses on safe file operations with comprehensive error handling
☕ Support the Project
If you find TurboTask helpful, consider buying me a coffee! Your support helps maintain and improve the project.
Your support helps me to:
- Maintain and improve TurboTask
- Web interface / API services
- Add new features
- Keep the project active
📄 License
MIT © Fabian Joseph
Author
- Fabian - [email protected]
- GitHub: https://github.com/Fector101/TurboTask