Skip to content

ulpati/bash-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐚 Bash Scripts Collection

Professional collection of Bash utilities for automation, privacy, and productivity

License Bash Platform Maintenance


📋 Table of Contents


🎯 Overview

This repository contains a curated collection of production-ready Bash scripts designed for developers, system administrators, and power users. Each tool is built with best practices, comprehensive error handling, and detailed documentation.

Why This Collection?

  • Production Ready: Battle-tested scripts with robust error handling
  • Well Documented: Each tool has comprehensive README with examples
  • Privacy Focused: Tools designed with security and anonymity in mind
  • No Dependencies: Pure Bash solutions (except where explicitly noted)
  • Cross-Platform: Works on Linux and macOS
  • Professional Quality: Follows industry best practices and coding standards

🛠 Available Tools

1. 🛡️ Metadata Cleaner

File sanitization tool for privacy-conscious users

Remove all identifying metadata from files before sharing on any platform. Perfect for protecting your privacy when uploading to cloud storage, sharing datasets, or publishing content.

Key Features:

  • Removes EXIF, ID3, document metadata, and execution history
  • Supports images, documents, audio/video, Jupyter notebooks, and text files
  • Post-sanitization audit with verification
  • Compressed backups with SHA256 checksums
  • Aggressive mode for sensitive data removal
  • Parallel processing for large directories

📁 metadata-cleaner/ | 📖 Full Documentation

# Quick example
cd metadata-cleaner
./metadata_cleaner.sh -r -b -a /path/to/files

2. 🚀 Publish Repository

Streamlined Git repository initialization and GitHub publishing

Automate the process of creating, configuring, and publishing Git repositories to GitHub. Handles initialization, remote configuration, and pushing in one command.

Key Features:

  • Automatic Git repository initialization
  • GitHub repository creation via gh CLI
  • Remote configuration (SSH/HTTPS)
  • Automatic branch management (main)
  • Dry-run mode for safe previewing
  • Verbose output for debugging

📁 publish-repo/ | 📖 Full Documentation

# Quick example
cd publish-repo
./publish_repo.sh --remote git@github.com:user/repo.git

3. 🎮 Life Game

Gamified life tracker that turns habits into an engaging terminal game

Transform your daily habits, goals, and progress into an interactive game. Earn XP, level up, unlock badges, and stay motivated while completing real-life tasks. Fully customizable from the terminal - no code editing required!

Core Features:

  • 🎯 Long-term Goals: Set objectives with 10-200 point rewards
  • 📅 Daily Tasks: Build habits with automatic daily reset (5-50 pts)
  • 🗓️ Weekly Missions: Track weekly challenges with high rewards (50-300 pts)
  • 🏆 Badge System: 5 unique achievements to unlock
  • 📊 Progression: XP, levels (every 100 XP), and progress bars
  • 🎨 ASCII Art: Beautiful terminal graphics and animations
  • 💾 Auto-Save: Progress saved automatically after every action
  • 🎮 Interactive Menus: 13 menu options (0-13) for complete control

Customization (No Code Required):

  • Add: Create custom goals, daily tasks, and weekly missions
  • ✏️ Edit: Modify names and point values of existing items
  • 🗑️ Delete: Remove items with confirmation prompts
  • 🔢 Flexible Points: Set custom point values for each task
  • 0️⃣ Cancel Option: Press 0 to cancel any operation safely

Study Mode Features:

  • 🍅 Pomodoro Timer: 25-minute focus sessions (+25 XP per session)
  • 🃏 Flashcard Counter: Track daily flashcard creation (2 XP per card)
  • ⏱️ Study Hours Logging: Log study time (30 XP per hour)
  • 📊 Study Dashboard: Visualize pomodoros, flashcards, and hours
  • 📥 Import from Markdown: Load tasks with automatic categorization
  • 🔄 Sync Completed Tasks: Detect finished items ([x], [✅]) and award points
  • 🚫 Duplicate Prevention: Smart marker system prevents re-importing

Command-Line Options:

  • --help / -h: Show comprehensive help
  • --version / -v: Display version (v1.0.0)
  • --import <file>: Import tasks from Markdown with duplicate detection
  • --sync <file>: Sync completed tasks and award XP automatically

📁 life-game/ | 📖 Full Documentation

# Installation and basic usage
cd life-game
bash install.sh
./life_game.sh

# Complete workflow example
./life_game.sh                          # Launch game
# Select 1 to view goals
# Select 2 to complete a goal (enter number or 0 to cancel)
# Select 10 to add/edit/delete goals
# Select 13 for Study Mode

# Import study plan from Markdown (with duplicate detection)
./life_game.sh --import my_study_plan.md

# Sync completed tasks (marks [x] and [✅] as done)
./life_game.sh --sync my_study_plan.md

# View help and all options
./life_game.sh --help

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/ulpati/bash-scripts.git
cd bash-scripts

# Navigate to the tool you want to use
cd metadata-cleaner  # or publish-repo, or life-game

# Make script executable (if not already)
chmod +x *.sh

# View help
./script_name.sh --help

Using Tools

Each tool has comprehensive documentation:

# View version
./script_name.sh --version

# View help
./script_name.sh --help

# Read full documentation
cat README.md

📂 Repository Structure

bash-scripts/
├── README.md                          # This file (repository overview)
├── CONTRIBUTING.md                    # Contribution guidelines
├── LICENSE                            # CC BY-NC-SA 4.0 License
│
├── metadata-cleaner/
│   ├── README.md                      # Metadata Cleaner documentation
│   └── metadata_cleaner.sh            # File sanitization script
│
├── publish-repo/
│   ├── README.md                      # Publish Repo documentation
│   └── publish_repo.sh                # Repository publishing script
│
└── life-game/
    ├── README.md                      # Life Game documentation (800+ lines)
    ├── CONTRIBUTING.md                # Contributor guidelines
    ├── CHANGELOG.md                   # Version history
    ├── LICENSE                        # CC BY-NC-SA 4.0
    ├── .gitignore                     # Git ignore rules
    ├── life_game.sh                   # Main game script (1550+ lines)
    ├── install.sh                     # Installation script
    ├── example_todo.md                # Example markdown import template
    ├── modules/
    │   ├── ascii_art.sh              # ASCII art functions
    │   └── badges.sh                 # Badge system
    └── data/
        ├── progress.txt              # Game progress (auto-generated)
        ├── study_data.txt            # Study mode data
        ├── pomodoro_log.txt          # Pomodoro history
        └── .imported_*               # Import markers

🛠️ Development Philosophy

All scripts in this collection follow rigorous best practices:

Code Quality Standards

  • Error Handling: set -euo pipefail for safe execution
  • Input Validation: All user inputs are validated and sanitized
  • Portable: Compatible with Bash 4.0+ on Linux and macOS
  • Documented: Comprehensive inline comments and external docs
  • Tested: Syntax-checked and functionally tested
  • Versioned: Each tool maintains semantic versioning

Coding Standards

# Safety first
set -euo pipefail
IFS=$'\n\t'

# Readonly constants
readonly VERSION="1.0.0"
readonly SCRIPT_NAME="$(basename "$0")"

# Clear variable names
local user_input=""
local exit_code=0

# Proper quoting
echo "Value: ${variable}"
[[ -f "$file" ]] && process_file "$file"

# Functions with documentation
# Description of what function does
# Arguments: $1 - description
# Returns: 0 on success, 1 on failure
function_name() {
    local arg="$1"
    # Implementation
}

User Experience

  • 🎨 Color-coded output (info, success, warning, error)
  • 📊 Progress indicators and statistics
  • 🔍 Verbose mode for debugging
  • 🏃 Dry-run mode for safe testing
  • 📝 Detailed help messages
  • ✅ Version information

🤝 Contributing

Contributions are welcome! We appreciate bug reports, feature requests, and pull requests.

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes: Follow coding standards
  4. Test thoroughly: bash -n script.sh for syntax
  5. Update documentation: Keep README.md current
  6. Commit changes: git commit -m 'Add amazing feature'
  7. Push to branch: git push origin feature/amazing-feature
  8. Open Pull Request: Describe your changes

Contribution Guidelines

Please read CONTRIBUTING.md for detailed guidelines including:

  • Code style and standards
  • Testing requirements
  • Documentation expectations
  • Pull request process

Ideas for New Scripts

We're always looking for useful automation tools:

  • System administration utilities
  • Development workflow tools
  • Security and privacy scripts
  • Productivity enhancers
  • Data processing utilities

🔒 Security & Privacy

Before Running Scripts

⚠️ Always review scripts before execution:

# Read the source code
less script_name.sh

# Check for suspicious commands
grep -E "rm -rf|curl.*bash|wget.*bash" script_name.sh

# Verify syntax
bash -n script_name.sh

Safe Testing

All scripts support dry-run mode:

# Preview actions without making changes
./script_name.sh --dry-run

# Use verbose mode for detailed output
./script_name.sh --verbose --dry-run

Privacy Considerations

  • Local Data: All scripts store data locally
  • No Telemetry: No data is sent to external servers
  • Open Source: Full transparency of all operations
  • Metadata: Cleaner tool specifically designed for privacy

Reporting Security Issues

Found a security vulnerability? Please email privately rather than opening a public issue:

  • Contact: [Your security contact]
  • PGP Key: [If available]

📄 License

This repository is licensed under CC BY-NC-SA 4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License).

Terms

  • ✅ Free to use and modify for non-commercial purposes
  • ✅ Share adaptations under the same license
  • 📝 Attribution required
  • ❌ No commercial use without permission

See LICENSE file for complete details.


🙏 Acknowledgements

Technologies & Tools

  • Bash: The GNU Bourne-Again Shell
  • ExifTool: Metadata manipulation (Metadata Cleaner)
  • MAT2: Metadata removal toolkit (Metadata Cleaner)
  • GitHub CLI: Repository management (Publish Repo)
  • Git: Version control (Publish Repo)

Inspiration

  • Unix philosophy: "Do one thing and do it well"
  • Open source community best practices
  • Security and privacy-focused development

Community

Thanks to all contributors, bug reporters, and users who provide feedback and help improve these tools.


👤 Author

ulpati


📊 Project Status

Tool Version Status Last Updated
Metadata Cleaner v1.0.0 ✅ Stable December 2025
Publish Repo v1.0.0 ✅ Stable December 2025
Life Game v1.0.0 ✅ Stable December 2025

🗺️ Roadmap

Planned Features

  • Configuration file support for all tools
  • Additional file format support (Metadata Cleaner)
  • GitLab/Bitbucket support (Publish Repo)
  • Multiplayer leaderboards (Life Game)
  • Web dashboard for statistics
  • Docker containers for each tool
  • CI/CD integration examples

Future Tools

  • System backup automation
  • Log analysis and monitoring
  • Network security utilities
  • Development environment setup
  • Database management tools

Automate smarter, not harder! 🚀

Last updated: December 2025

About

Production-ready Bash utilities: metadata cleaner (privacy), Git automation, gamified life tracker. Professional scripts for automation and productivity

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages