Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 194 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,195 @@
# script_flips
Collection of macOS, Windows, and Linux scripts to decorate text
Collection of macOS, Windows, and Linux scripts to decorate text with Unicode transformations that automatically copy results to the clipboard.

## Features

Transform your text with these fun Unicode effects:
- **Rage Flip** - Turn text upside-down (ɹǝʌǝɹsǝp)
- **Word Flip** - Reverse word order
- **Underline** - Add Unicode underlines (u̲n̲d̲e̲r̲l̲i̲n̲e̲)
- **sArCaSm** - Alternating case (sArCaStIc)
- **Strikethrough** - Add Unicode strikethrough (s̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶)

All scripts automatically copy the transformed text to your system clipboard!

## Installation

### Quick Install (Linux/macOS)

```bash
git clone https://github.com/stringsn88keys/script_flips.git
cd script_flips
./install.sh
```

The install script will:
- Make all scripts executable
- Check for clipboard utilities
- Test all scripts
- Provide setup instructions

### Manual Installation

#### Linux/macOS (Unix-like systems)

1. Clone the repository:
```bash
git clone https://github.com/stringsn88keys/script_flips.git
cd script_flips
```

2. Make scripts executable:
```bash
chmod +x unix/*.sh
```

3. For clipboard functionality on Linux, install one of:
```bash
# Ubuntu/Debian
sudo apt install xclip
# or
sudo apt install xsel
# or for Wayland
sudo apt install wl-clipboard

# Fedora/RHEL
sudo dnf install xclip
# or
sudo dnf install xsel

# Arch Linux
sudo pacman -S xclip
# or
sudo pacman -S xsel
```

### Windows (PowerShell)

1. Clone the repository or download the PowerShell scripts from the `windows/` folder
2. Scripts are ready to use (PowerShell 5.0+ required)

## Usage

### Linux/macOS Scripts

#### Individual Scripts
```bash
# Rage flip (upside-down text)
./unix/rage_flip.sh "Hello World!"
# Output: ¡plɹoM ollǝH

# Word flip (reverse word order)
./unix/word_flip.sh "Hello World Everyone"
# Output: Everyone World Hello

# Underline text
./unix/underline.sh "Hello World!"
# Output: H̲e̲l̲l̲o̲ W̲o̲r̲l̲d̲!̲

# sArCaSm text
./unix/sarcasm.sh "This is so cool"
# Output: ThIs Is So CoOl

# Strikethrough text
./unix/strikethrough.sh "Hello World!"
# Output: H̶e̶l̶l̶o̶ W̶o̶r̶l̶d̶!̶
```

#### Unified Script (Recommended)
```bash
# Use the unified script for all transformations
./unix/text_flip.sh rage "Hello World!"
./unix/text_flip.sh sarcasm "This is so cool"

# See all transformations at once
./unix/text_flip.sh all "Hello World!"
# Shows all effects and lets you choose which to copy
```

### Windows PowerShell Scripts

#### Individual Scripts
```powershell
# Rage flip (upside-down text)
.\windows\RageFlip.ps1 "Hello World!"
# Output: ¡plɹoM ollǝH

# Word flip (reverse word order)
.\windows\WordFlip.ps1 "Hello World Everyone"
# Output: Everyone World Hello

# Underline text
.\windows\Underline.ps1 "Hello World!"
# Output: H̲e̲l̲l̲o̲ W̲o̲r̲l̲d̲!̲

# sArCaSm text
.\windows\Sarcasm.ps1 "This is so cool"
# Output: ThIs Is So CoOl

# Strikethrough text
.\windows\Strikethrough.ps1 "Hello World!"
# Output: H̶e̶l̶l̶o̶ W̶o̶r̶l̶d̶!̶
```

#### Unified Script (Recommended)
```powershell
# Use the unified script for all transformations
.\windows\TextFlip.ps1 rage "Hello World!"
.\windows\TextFlip.ps1 sarcasm "This is so cool"

# See all transformations at once
.\windows\TextFlip.ps1 all "Hello World!"
# Shows all effects and lets you choose which to copy
```

## Examples

Transform "Hello World!" with different effects:

| Effect | Result |
|--------|--------|
| Original | Hello World! |
| Rage Flip | ¡plɹoM ollǝH |
| Word Flip | World! Hello |
| Underline | H̲e̲l̲l̲o̲ W̲o̲r̲l̲d̲!̲ |
| sArCaSm | HeLlO WoRlD! |
| Strikethrough | H̶e̶l̶l̶o̶ W̶o̶r̶l̶d̶!̶ |

## Directory Structure

```
script_flips/
├── unix/ # Linux/macOS bash scripts
│ ├── rage_flip.sh
│ ├── word_flip.sh
│ ├── underline.sh
│ ├── sarcasm.sh
│ ├── strikethrough.sh
│ └── text_flip.sh # 🌟 Unified script (recommended)
├── windows/ # Windows PowerShell scripts
│ ├── RageFlip.ps1
│ ├── WordFlip.ps1
│ ├── Underline.ps1
│ ├── Sarcasm.ps1
│ ├── Strikethrough.ps1
│ └── TextFlip.ps1 # 🌟 Unified script (recommended)
├── install.sh # Installation script for Unix
└── README.md
```

## Technical Details

- **Unicode Support**: Uses Unicode combining characters and special Unicode symbols
- **Clipboard Integration**: Automatically copies results to system clipboard
- **Cross-Platform**: Native implementations for Linux/macOS (bash) and Windows (PowerShell)
- **No Dependencies**: Works with standard system tools (except clipboard utilities on Linux)

## Supported Platforms

- **Linux**: Any distribution with bash (clipboard requires xclip, xsel, or wl-clipboard)
- **macOS**: Built-in clipboard support via pbcopy
- **Windows**: PowerShell 5.0+ with built-in clipboard support

## License

MIT License - see [LICENSE](LICENSE) file for details.
127 changes: 127 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#!/bin/bash
# Installation script for text_flips scripts

set -e

# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

print_step() {
echo -e "${BLUE}➤${NC} $1"
}

print_success() {
echo -e "${GREEN}✓${NC} $1"
}

print_warning() {
echo -e "${YELLOW}⚠${NC} $1"
}

print_error() {
echo -e "${RED}✗${NC} $1"
}

echo "🎨 script_flips Installation"
echo "============================="
echo ""

# Check if we're in the right directory
if [[ ! -f "unix/rage_flip.sh" ]]; then
print_error "Installation script must be run from the script_flips directory"
exit 1
fi

print_step "Making scripts executable..."
chmod +x unix/*.sh
print_success "Scripts are now executable"

# Check for clipboard tools
print_step "Checking for clipboard utilities..."

clipboard_found=false

if command -v pbcopy >/dev/null 2>&1; then
print_success "Found pbcopy (macOS clipboard support)"
clipboard_found=true
fi

if command -v xclip >/dev/null 2>&1; then
print_success "Found xclip (Linux clipboard support)"
clipboard_found=true
fi

if command -v xsel >/dev/null 2>&1; then
print_success "Found xsel (Linux clipboard support)"
clipboard_found=true
fi

if command -v wl-copy >/dev/null 2>&1; then
print_success "Found wl-copy (Wayland clipboard support)"
clipboard_found=true
fi

if ! $clipboard_found; then
print_warning "No clipboard utility found"
echo ""
echo "To enable clipboard functionality on Linux, install one of:"
echo " • xclip: sudo apt install xclip (Ubuntu/Debian) or sudo dnf install xclip (Fedora)"
echo " • xsel: sudo apt install xsel (Ubuntu/Debian) or sudo dnf install xsel (Fedora)"
echo " • wl-clipboard: sudo apt install wl-clipboard (Ubuntu/Debian) - for Wayland"
echo ""
fi

# Test scripts
print_step "Testing scripts..."

test_text="Hello World!"
failed_tests=0

for script in unix/*.sh; do
script_name=$(basename "$script")
if [[ "$script_name" == "text_flip.sh" ]]; then
continue # Skip the unified script for now
fi

if ./"$script" "$test_text" >/dev/null 2>&1; then
print_success "$(basename "$script") - OK"
else
print_error "$(basename "$script") - FAILED"
((failed_tests++))
fi
done

# Test unified script
if ./unix/text_flip.sh rage "$test_text" >/dev/null 2>&1; then
print_success "text_flip.sh (unified) - OK"
else
print_error "text_flip.sh (unified) - FAILED"
((failed_tests++))
fi

echo ""

if [[ $failed_tests -eq 0 ]]; then
print_success "All tests passed! Installation complete."
echo ""
echo "🎯 Quick Start:"
echo " ./unix/text_flip.sh rage \"Hello World!\""
echo " ./unix/text_flip.sh all \"Your text here\""
echo ""
echo "📖 See README.md for detailed usage instructions"
else
print_error "$failed_tests script(s) failed testing"
exit 1
fi

# Optional: Add to PATH suggestion
echo ""
echo "💡 Optional: Add to your PATH for global access"
echo " Add this line to your ~/.bashrc or ~/.zshrc:"
echo " export PATH=\"\$PATH:$(pwd)/unix\""
echo ""
echo " Then you can use: text_flip.sh rage \"Hello World!\" from anywhere"
Loading