A Python application for encoding and decoding text using 7 different ciphers with both web interface (Streamlit) and CLI support.
- 7 Ciphers: Morse Code, Semaphore, Braille, Binary, Caesar, Pigpen, and ASCII
- Bidirectional: Encode text to cipher or decode cipher to text
- Visual Export: Generate PNG images showing cipher representations
- Batch Processing: Process multiple texts from CSV/TXT files
- Web Interface: Modern Streamlit-based UI
- CLI Support: Command-line interface for automation
pip install -r requirements.txtstreamlit run app.py# Encode text with Morse code
python cli.py Morse encode "Hello World"
# Decode Caesar cipher with custom shift
python cli.py Caesar decode "KHOOR" --shift 3
# Generate visual output
python cli.py Binary encode "ABC" --visual --output result.txt| Cipher | Description | Example |
|---|---|---|
| Morse | Dots and dashes | A → •– |
| Semaphore | Flag positions | A → 1,1 |
| Braille | Unicode Braille | A → ⠁ |
| Binary | 8-bit ASCII | A → 01000001 |
| Caesar | Letter shift | A+3 → D |
| Pigpen | Grid symbols | A → ┌─ |
| ASCII | Numeric values | A → 65 |
code-weaver-prompt/
├── app.py # Streamlit web interface
├── cli.py # Command-line interface
├── requirements.txt # Dependencies
├── ciphers/ # Cipher implementations
│ ├── __init__.py
│ ├── base.py # Base cipher class
│ ├── factory.py # Cipher factory
│ ├── morse.py # Morse code
│ ├── binary.py # Binary cipher
│ ├── caesar.py # Caesar cipher
│ ├── braille.py # Braille cipher
│ ├── semaphore.py # Semaphore flags
│ └── pigpen.py # Pigpen cipher
└── README.md
The project uses an object-oriented architecture with:
- BaseCipher: Abstract base class with common functionality
- CipherFactory: Registry pattern for cipher management
- Individual Ciphers: Each cipher implements encode/decode/visual methods
- Streamlit UI: Reactive web interface with real-time preview
- Pillow: Image generation for visual exports
MIT License