Teemoji
like tee but with emojis 🍵
Install / Use
/learn @willswire/TeemojiREADME
teemoji
<img width="500" alt="teemoji in action!" src="https://github.com/user-attachments/assets/acdb7614-c3d3-4704-b6d2-e270f44ca67a" />teemoji is a command-line tool inspired by the classic tee utility. Unlike tee, teemoji leverages a Core ML model to predict and prepend an appropriate emoji to each incoming line of text, adding a touch of fun and context to your command-line workflows.
Features
- Emoji Prediction: Uses a Core ML model to intelligently select emojis based on the input text.
- Standard I/O Support: Reads from standard input and writes to both standard output and specified files.
- File Handling Options: Choose to append to existing files or overwrite them.
- Easy Integration: Seamlessly fits into your existing shell pipelines.
Installation
You can install teemoji via Homebrew:
brew install willswire/tap/teemoji
Usage
teemoji works similarly to the standard tee command but with the added functionality of prepending emojis to each line.
Basic Usage
Pipe the output of a command into teemoji to see emojis added to each line and simultaneously write to a file.
cat input.txt | teemoji output.txt
Append to Files
Use the -a or --append flag to append the output to existing files instead of overwriting them.
cat input.txt | teemoji -a output.txt another.log
Display Help
Get help information about teemoji's options and usage.
teemoji --help
Options
-a,--append: Append to the given FILE(s), do not overwrite.-h,--help: Display help information.
Example
Suppose you have a file named messages.txt and you want to log its contents with emojis:
cat messages.txt | teemoji --append log.txt
This command will read each line from messages.txt, prepend an emoji based on the content, display it on the terminal, and append it to log.txt.
Development
If you're interested in contributing or building teemoji from source:
-
Clone the Repository:
git clone https://github.com/willswire/teemoji.git cd teemoji -
Build the Project:
Ensure you have Swift 6.0 and Xcode 15 installed.
just build
License
Distributed under the MIT License. See LICENSE for more information.
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or feature requests.
