rage_flip is a comprehensive Ruby gem that provides text manipulation utilities with clipboard integration. It flips text upside down with rage table flip emoticons, includes extensive text formatting tools, and features a rich collection of emotes and text substitutions for enhanced communication.
Add this line to your application's Gemfile:
gem 'rage_flip'And then execute:
bundle installOr install it yourself as:
gem install rage_flipThe gem provides several command-line utilities for text manipulation:
The main command flips text upside down and adds rage table flip emoticons:
rage_flip "Hello World"
# Output: (ノಠ益ಠ)ノ彡┻plɹoM ollǝH┻
# Result is automatically copied to clipboardThe flip transformation:
- Reverses the text order
- Maps characters to their upside-down equivalents
- Wraps the result with
(ノಠ益ಠ)ノ彡┻and┻
The classic table flip command flips text upside down with the iconic table flip emoticons:
table_flip "Hello World"
# Output: (╯°□°)╯︵┻plɹoM ollǝH┻
# Result is automatically copied to clipboardUses the classic (╯°□°)╯︵ and ┻━┻ emoticons for a more traditional table flip style.
Flips text upside down without any emoticons:
flip_text "Hello World"
# Output: plɹoM ollǝH
# Result is automatically copied to clipboardJust the pure flipped text without any rage or table flip decorations.
The emote system provides a comprehensive collection of emoticons, text substitutions, and emoji sequences:
emote # List all available emotes
emote list # List all available emotes
emote categories # List all emote categories
emote category food # List emotes in the food category
emote disapproval # Output: (ಠ_ಠ)
emote rage # Output: ಠ益ಠ
emote flip # Output: (╯°□°)╯︵ ┻━┻
emote rageflip # Output: (ノಠ益ಠ)ノ彡┻━┻
emote shrug # Output: ¯\_(ツ)_/¯
emote fu # Output: t(-__-t)
emote facepalm # Output: (-‸ლ)
emote rock # Output: \m/ (>_<) \m/Various poop emoji combinations:
emote bullshit # Output: 🐄💩
emote catshit # Output: 🐱💩
emote dogshit # Output: 🐶💩
emote pandashit # Output: 🐼💩
emote horseshit # Output: 🐴💩
emote koalashit # Output: 🐨💩
emote batshit # Output: 🦇💩Keyboard shortcuts and symbols:
emote cmd # Output: ⌘
emote command # Output: ⌘
emote cmd- # Output: ⌘-
emote optn # Output: ⌥
emote option # Output: ⌥
emote cntl # Output: ⌃
emote shft # Output: ⇧
emote shift # Output: ⇧Multi-line and unique expressions:
emote kungfuhamster # Output: Multi-line ASCII hamster
emote noevil # Output: 🙈🙉🙊
emote omw # Output: On my way!
emote bugeyes # Output: (⊙_◎)
emote dogshrug # Output: ¯\_🐶_/¯
emote javaflip # Output: (╯°□°)╯︵ ┻ɐʌɐɾ┻
emote heresatable # Output: ┬─┬ ノ( ゜-゜ノ)
emote shrugtable # Output: ┻━┻ ︵ ¯\(ツ)/¯ ︵ ┻━┻
emote unsee # Output: ♨_♨
emote yuno # Output: ლ(ಠ益ಠლ)All emotes are accessed through the emote command followed by the emote name. Use emote list to see the complete collection of available emotes.
The emote system supports combining multiple emoji-only emotes into compound expressions. This allows you to create custom combinations on the fly:
With Hyphens:
emote bullshit-catshit # Output: 🐄💩🐱💩
emote omg-cat # Output: 😱🐱
emote dog-panda-cat # Output: 🐶🐼🐱Without Separators:
emote bullshitcatshit # Output: 🐄💩🐱💩
emote omgcat # Output: 😱🐱 (also available as a standalone emote)
emote dogpandacat # Output: 🐶🐼🐱The system uses dynamic programming to automatically detect and combine emoji-only emotes. Note that:
- Only emoji-only emotes can be combined (ASCII art emotes like
shrugorkungfuhamstercannot be combined) - The longest matching emote names are prioritized
- If an exact emote name exists (like
omgcat), it will be used instead of parsing as a combination
Example emoji-only emotes that can be combined:
bullshit, catshit, dogshit, pandashit, horseshit, koalashit, batshit, shboatload, popcorn, omg, omgcat, deer, middlefinger, noevil
The emote collection is organized into categories to help you discover and browse the 1,600+ available emotes:
# List all available categories
emote categories
# Shows all categories with descriptions and emote counts
# List emotes in a specific category
emote category food
# Shows all food & drink related emotes
emote category animals
# Shows all animal & nature emotesAvailable Categories:
-
custom - Custom ASCII Art and Text Emotes (17 emotes)
- Classic text-based emotes like
shrug,flip,disapproval,kungfuhamster
- Classic text-based emotes like
-
keyboard - Keyboard Shortcuts (8 emotes)
- Mac keyboard symbols:
cmd,option,shift,control
- Mac keyboard symbols:
-
smileys - Smileys & People (215 emotes)
- Emoji faces and people:
smile,laugh,wink,thumbsup,facepalm, etc.
- Emoji faces and people:
-
animals - Animals & Nature (210 emotes)
- Animals, plants, and nature:
cat,dog,deer,tree,flower, etc.
- Animals, plants, and nature:
-
combined - Combined/Custom Emotes (9 emotes)
- Special combinations:
bullshit,catshit,dogshit,omgcat, etc.
- Special combinations:
-
food - Food & Drink (132 emotes)
- Food and beverages:
pizza,beer,coffee,taco,popcorn, etc.
- Food and beverages:
-
activity - Activity (101 emotes)
- Sports and activities:
soccer,basketball,running,gaming, etc.
- Sports and activities:
-
travel - Travel & Places (209 emotes)
- Locations and transportation:
car,plane,building,mountain, etc.
- Locations and transportation:
-
objects - Objects (242 emotes)
- Everyday objects:
phone,computer,book,gift, etc.
- Everyday objects:
-
symbols - Symbols (216 emotes)
- Symbols and signs:
heart,star,check,warning, etc.
- Symbols and signs:
-
flags - Flags (261 emotes)
- Country and regional flags:
usa,canada,uk,japan, etc.
- Country and regional flags:
Use emote categories to see the full list with emote counts, or emote category <name> to explore emotes within a specific category. This makes it easy to discover new emotes without having to browse the entire collection.
You can define your own custom emotes that persist across sessions:
# Initialize a custom emote configuration file
emote init-custom
# Creates ~/.config/rage_flip/emote.json with sample emotes
# List only your custom emotes
emote list-custom
# Shows all custom emotes and the config file locationConfiguration Format:
Custom emotes can be defined in either JSON or YAML format:
JSON (~/.config/rage_flip/emote.json):
{
"myemote": "🎉🎊",
"team": "👥💪",
"coffee": "☕"
}YAML (~/.config/rage_flip/emote.yml):
myemote: "🎉🎊"
team: "👥💪"
coffee: "☕"Custom emotes:
- Are automatically merged with built-in emotes
- Can override built-in emotes (use with caution)
- Support all emoji and Unicode characters
- Work with multi-emote combinations if they are emoji-only
- Persist across terminal sessions and system reboots
Usage:
emote myemote # Output: 🎉🎊
emote coffee # Output: ☕
emote team-coffee # Multi-emote combination: 👥💪☕The init-custom command creates a sample configuration file with examples to get you started. Edit the file to add your own custom emotes, then use emote list to see all available emotes (both built-in and custom) or emote list-custom to see only your custom emotes.
Alternates between uppercase and lowercase characters:
sarcasm "this is sarcastic"
# Output: ThIs Is SaRcAsTiCAdds strikethrough formatting to text using Unicode combining characters:
strikethrough "crossed out text"
# Output: c̶r̶o̶s̶s̶e̶d̶ ̶o̶u̶t̶ ̶t̶e̶x̶t̶Adds single underline formatting:
underline "underlined text"
# Output: u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲ ̲t̲e̲x̲t̲Adds double underline formatting:
doubleunderline "double underlined"
# Output: d̳o̳u̳b̳l̳e̳ ̳u̳n̳d̳e̳r̳l̳i̳n̳e̳d̳Adds random Unicode combining characters for a chaotic effect:
chaos "chaotic text"
# Output: c̸̰̈h̴̲̆a̷̰̋ò̶̰ẗ̸̲ḭ̷̋c̶̰̈ ̸̰̈t̷̰̋ĕ̴̲ẍ̸̰t̷̰̋The chaos level is persistently stored in ~/.chaos_level.txt and can be controlled with the chaos_level command.
Controls the chaos level for the chaos command:
chaos_level # Show current chaos level
chaos_level show # Show current chaos level
chaos_level more # Increase chaos level by 1
chaos_level less # Decrease chaos level by 1
chaos_level 15 # Set chaos level to 15The default chaos level is 10. Higher numbers create more chaotic effects.
The gem automatically detects your platform and uses the appropriate clipboard command:
- macOS: Uses
pbcopy - Linux: Uses
xcliporxsel(install one of these first) - Windows: Uses
clipwith proper UTF-16LE encoding for Unicode support
All commands automatically copy their output to the clipboard and display the result.
The Windows clipboard implementation has been specifically enhanced to handle Unicode characters correctly. The gem automatically converts text to UTF-16LE encoding with BOM (Byte Order Mark) before passing it to the Windows clip command. This ensures that Unicode characters such as:
- Rage flip emoticons:
(ノಠ益ಠ)ノ彡┻━┻ - Flipped text characters:
ʇsǝʇ - Emoji characters:
🐄💩 - Accented characters:
café résumé naïve - International text:
こんにちは,测试文本
...are properly preserved when copied to the clipboard and can be pasted correctly into other applications.
The flip functionality uses comprehensive character mappings including:
- Regular alphabet (A-Z, a-z)
- Numbers (0-9)
- Common punctuation and symbols
- Special Unicode characters for upside-down equivalents
The gem includes an extensive collection of emotes organized into categories:
disapproval,rage,flip,rageflip,javaflip,shrugtable
shrug,fu,facepalm,rock,bugeyes,dogshrug,yuno
bullshit,catshit,dogshit,pandashit,horseshit,koalashit,batshit
cmd/command(⌘),optn/option(⌥),cntl(⌃),shft/shift(⇧),cmd-(⌘-)
noevil(🙈🙉🙊),omw("On my way!"),heresatable,kungfuhamster(ASCII art),unsee
Use emote list to see all available emotes with their outputs.
- Chaos Level: Stored in
~/.chaos_level.txtand controls the intensity of the chaos effect (default: 10). This setting persists across terminal sessions and system reboots.
You can also use the gem programmatically:
require 'rage_flip'
# Flip text with rage emoticons
RageFlip::Flipper.rage_flip("Hello World")
# => "(ノಠ益ಠ)ノ彡┻plɹoM ollǝH┻"
# Flip text with classic table flip emoticons
RageFlip::Flipper.table_flip("Hello World")
# => "(╯°□°)╯︵ plɹoM ollǝH ┻━┻"
# Just flip without emoticons
RageFlip::Flipper.flip("Hello")
# => "ollǝH"
# Flip text (same as flip)
RageFlip::Flipper.flip_text("Hello")
# => "ollǝH"
# Sarcastic text
RageFlip::Sarcasm.process("hello world")
# => "HeLlO WoRlD"
# Strikethrough
RageFlip::Strikethrough.process("text")
# => "t̶e̶x̶t̶"
# Underline (single or double)
RageFlip::Underline.single_underline("text")
# => "t̲e̲x̲t̲"
RageFlip::Underline.double_underline("text")
# => "t̳e̳x̳t̳"
# Chaos
RageFlip::Chaos.process("text", 5)
# => "t̸e̷x̸t̷"
# Emotes
RageFlip::Emote.process("disapproval")
# => "(ಠ_ಠ)"
RageFlip::Emote.process("bullshit")
# => "🐄💩"
RageFlip::Emote.process("cmd")
# => "⌘"
RageFlip::Emote.process("shrug")
# => "¯\_(ツ)_/¯"
# Multi-emote combinations
RageFlip::Emote.process("bullshit-catshit")
# => "🐄💩🐱💩"
RageFlip::Emote.process("bullshitcatshit")
# => "🐄💩🐱💩"
RageFlip::Emote.process("omg-deer-popcorn")
# => "😱🦌🍿"
RageFlip::Emote.list_emotes
# => "Available emotes:\n batshit - 🦇💩\n bugeyes - (⊙_◎)\n..."
# Check if emote exists
RageFlip::Emote.emote_exists?("rage")
# => true
# Get all emote names
RageFlip::Emote.emote_names
# => ["disapproval", "bullshit", "catshit", ...]
# Custom emotes
RageFlip::Emote.init_custom_config
# => "Custom emote config initialized: ~/.config/rage_flip/emote.json\nEdit this file..."
RageFlip::Emote.list_custom_emotes
# => "Custom emotes:\n myemote - 🎉🎊\n..."
RageFlip::Emote.load_custom_emotes
# => {"myemote" => "🎉🎊", "team" => "👥💪", ...}
RageFlip::Emote.all_emotes
# => {"disapproval" => "(ಠ_ಠ)", "bullshit" => "🐄💩", "myemote" => "🎉🎊", ...}
RageFlip::Emote.refresh_emotes
# Reloads custom emotes from disk (useful after editing config file)
# Copy to clipboard
RageFlip::Clipboard.copy("text to copy")After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests.
The gem includes comprehensive version management tools:
# Show current version
rake version:show
# Bump patch version (1.0.0 -> 1.0.1)
rake version:bump:patch
# Bump minor version (1.0.0 -> 1.1.0)
rake version:bump:minor
# Bump major version (1.0.0 -> 2.0.0)
rake version:bump:major
# Set specific version
rake version:set[1.2.3]# Show current version
./bin/version show
# Bump versions
./bin/version patch
./bin/version minor
./bin/version major
# Set specific version
./bin/version set 1.2.3# Complete release workflow
rake release
# This will: run tests, build gem, create git tagThe project includes GitHub Actions workflows for:
- Continuous Integration: Runs tests on Ruby 3.0, 3.1, and 3.2
- Automated Releases: Creates GitHub releases when commits start with "Release v"
To create a release:
- Bump the version:
./bin/version minor - Update CHANGELOG.md with changes
- Commit:
git commit -am "Release v1.1.0" - Push:
git push origin main - The CI will automatically create a GitHub release with the built gem
Bug reports and pull requests are welcome on GitHub at https://github.com/stringsn88keys/rage_flip_gem.
The gem is available as open source under the terms of the MIT License.