This library provides a Command-Line Interface (CLI) for converting text between various encoding formats, including binary, hexadecimal, decimal, Base64, Morse code, leetspeak, and more.
Convert text to its binary representation.
Example:
$ python cli.py to_binary "Hello World" 8
Convert binary to text.
Example:
$ python cli.py to_text "01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100"
Convert text to hexadecimal representation.
Example:
$ python cli.py to_hex "Hello World"
Convert hexadecimal string to text.
Example:
$ python cli.py from_hex "48 65 6c 6c 6f 20 57 6f 72 6c 64"
Convert text to decimal representation.
Example:
$ python cli.py to_decimal "Hello World"
Convert decimal string to text.
Example:
$ python cli.py from_decimal "72 101 108 108 111 32 87 111 114 108 100"
Reverse the input text.
Example:
$ python cli.py reverse_text "Hello World"
Encode text to Base64.
Example:
$ python cli.py to_base64 "Hello World"
Decode Base64 string to text.
Example:
$ python cli.py from_base64 "SGVsbG8gV29ybGQ="
Check if the text is a palindrome.
Example:
$ python cli.py is_palindrome "A man a plan a canal Panama"
Count the frequency of each character in the text.
Example:
$ python cli.py count_characters "Hello World"
Convert text to leetspeak.
Example:
$ python cli.py to_leetspeak "Hello World"
Convert text to Morse code.
Example:
$ python cli.py to_morsecode "Hello World"
Convert Morse code to text.
Example:
$ python cli.py from_morsecode ".... . .-.. .-.. --- / .-- --- .-. .-.. -.."
- Python 3.x
click
library (install usingpip install click
)
- Clone or download the repository.
- Install the required dependencies:
pip install -r requirements.txt
- Run the CLI using:
python cli.py <command> <args>
This project is licensed under the MIT License - see the LICENSE file for details.