Update README.md
This commit is contained in:
91
README.md
91
README.md
@@ -1,53 +1,68 @@
|
|||||||
# How to Use the Scripts
|
# Bash Utility Scripts
|
||||||
|
|
||||||
## 📥 Download and Installation
|
Collection of practical bash scripts for common file processing tasks. Each script supports both terminal and graphical (Nemo file manager) usage modes.
|
||||||
|
|
||||||
Download the scripts individually from the project page, or clone the entire repository with:
|
## Script Categories
|
||||||
|
|
||||||
|
### [🧹 Cleanup Tools](cleanup-tools/)
|
||||||
|
Tools for system maintenance and file cleanup operations.
|
||||||
|
- **remove-mac-files.sh** - Recursively remove macOS hidden files (.DS_Store, ._*)
|
||||||
|
|
||||||
|
### [🔤 Font Tools](font-tools/)
|
||||||
|
Scripts for font processing and conversion.
|
||||||
|
- **convert-ttf-in-woff2.sh** - Convert TTF fonts to WOFF2 format for web usage
|
||||||
|
|
||||||
|
### [🖼️ Image Tools](image-tools/)
|
||||||
|
Utilities for image optimization and processing.
|
||||||
|
- **optimize-png.sh** - Minimize PNG images with color reduction
|
||||||
|
- **optimize-jpg.sh** - Compress JPG/JPEG images with quality control
|
||||||
|
|
||||||
|
## ⚡ Quick Start
|
||||||
|
|
||||||
|
### For Nemo File Manager Users
|
||||||
|
1. Copy desired scripts to `~/.local/share/nemo/scripts/`
|
||||||
|
2. Make them executable with `chmod +x *.sh`
|
||||||
|
3. Select files in Nemo and run scripts from context menu
|
||||||
|
|
||||||
|
### For Terminal Users
|
||||||
|
1. Make scripts executable with `chmod +x *.sh`
|
||||||
|
2. Run with `./script-name.sh [options] files...`
|
||||||
|
3. Use `--help` flag for detailed usage information
|
||||||
|
|
||||||
|
## 🔧 Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://gitea.it/krypt77/Bash-Utility-Scripts.git
|
# Clone repository
|
||||||
```
|
git clone https://git.marcocrippa.it/marco/bash-utility-scripts.git
|
||||||
|
cd bash-utility-scripts
|
||||||
|
|
||||||
## 🚀 Usage
|
# Make all scripts executable
|
||||||
|
find . -name "*.sh" -exec chmod +x {} \;
|
||||||
|
|
||||||
### Nemo File Manager Integration
|
# Optional: Install for Nemo integration
|
||||||
|
|
||||||
To use the scripts directly from Nemo with a graphical interface:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Create Nemo scripts directory
|
|
||||||
mkdir -p ~/.local/share/nemo/scripts
|
mkdir -p ~/.local/share/nemo/scripts
|
||||||
|
cp *-tools/*.sh ~/.local/share/nemo/scripts/
|
||||||
# Copy the downloaded scripts
|
|
||||||
cp font-tools/convert-ttf-in-woff2.sh ~/.local/share/nemo/scripts/
|
|
||||||
cp image-tools/optimize-jpg.sh ~/.local/share/nemo/scripts/
|
|
||||||
cp image-tools/optimize-png.sh ~/.local/share/nemo/scripts/
|
|
||||||
cp cleanup-tools/remove-mac-files.sh ~/.local/share/nemo/scripts/
|
|
||||||
|
|
||||||
# Make them executable
|
|
||||||
chmod +x ~/.local/share/nemo/scripts/*.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**💡 Tip:** After installation, the scripts will appear in Nemo's context menu when you select files!
|
## 📋 Requirements
|
||||||
|
|
||||||
### Terminal Usage
|
- **zenity** - For GUI dialogs (usually pre-installed)
|
||||||
|
- **pngquant** - For PNG optimization (image-tools)
|
||||||
|
- **woff2** - For font conversion (font-tools)
|
||||||
|
|
||||||
To use the scripts from the command line:
|
See individual README files in each category folder for detailed dependency information.
|
||||||
|
|
||||||
```bash
|
## 📖 Documentation
|
||||||
# Make scripts executable
|
|
||||||
chmod +x *.sh
|
|
||||||
|
|
||||||
# Use scripts with parameters
|
For detailed usage instructions, examples, and technical details, see the README file in each category:
|
||||||
./convert-ttf-in-woff2.sh font1.ttf font2.ttf
|
- [Cleanup Tools Documentation](cleanup-tools/README.md)
|
||||||
./optimize-jpg.sh image1.jpg image2.jpg
|
- [Font Tools Documentation](font-tools/README.md)
|
||||||
./optimize-png.sh image1.png image2.png
|
- [Image Tools Documentation](image-tools/README.md)
|
||||||
./remove-mac-files.sh /path/to/directory
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
|
||||||
|
|
||||||
|
**GPL v3 Summary:** You are free to use, modify, and distribute these scripts. Any derivative work must also be licensed under GPL v3 and include the source code.
|
||||||
|
|
||||||
# Or with wildcards
|
|
||||||
./optimize-jpg.sh *.jpg
|
|
||||||
./optimize-png.sh *.png
|
|
||||||
./convert-ttf-in-woff2.sh *.ttf
|
|
||||||
```
|
|
||||||
|
|
||||||
**⚠️ Note:** Zenity dialogs may not appear if you are running the scripts from a terminal where an X11 display is not available.
|
|
||||||
|
Reference in New Issue
Block a user