A beautiful Python application that generates colorful ASCII art from text and displays random inspirational quotes. Perfect for terminal enthusiasts, motivational displays, or just adding some fun to your command line!
- π¨ Beautiful ASCII Art: Convert any text to stunning ASCII art with gradient colors
- π Inspirational Quotes: Display random motivational quotes from a curated database
- π Rich Formatting: Beautiful terminal output with colors, panels, and styling
- π Multiple Modes: Database-connected or offline mode with JSON quotes
- π― Customizable: Choose different fonts and color schemes
- π¦ Easy Setup: Simple installation and usage
- Python 3.7 or higher
- pip (Python package installer)
-
Clone the repository
git clone https://github.com/sudipnext/ascii-art-generator.git cd ascii-art-generator
-
Create a virtual environment (recommended)
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
You can integrate the Python script into your terminal configuration for quick access. Update your .bashrc
or .zshrc
file to run the script automatically or create an alias for easier usage.
Use the pre-generated quotes database without needing database connectivity:
# Basic usage with default name
python main_offline.py
# Custom name
python main_offline.py "Your Name"
# Custom name and font
python main_offline.py "Hello World" "block"
If you have database credentials, you can use the live database connection:
-
Set up environment variables Create a
.env
file:DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=your_db_host DB_NAME=your_db_name DB_SSLMODE=require
-
Run with database connection
python main.py
Add the following line to your .bashrc
or .zshrc
file:
python /path/to/ascii-art-generator/main_offline.py "Welcome to your terminal!" "block"
This will display ASCII art with a custom message every time you open a new terminal window or tab.
Add an alias to your .bashrc
or .zshrc
file:
alias asciiart='python /path/to/ascii-art-generator/main_offline.py'
Reload your terminal configuration:
source ~/.bashrc # For bash
source ~/.zshrc # For zsh
Now, you can run the script with:
asciiart "Hello World" "slant"
Use the alias with different fonts and messages:
asciiart "Stay Motivated!" "doom"
asciiart "Code Like a Pro" "digital"
To display ASCII art and a motivational quote every time you open a terminal, add the following line to your .bashrc
or .zshrc
file:
python /path/to/ascii-art-generator/main_offline.py "Welcome Back!" "big"
This ensures the script runs automatically whenever a new terminal session starts.
These examples make it easy to display ASCII art and inspirational quotes directly from your terminal.
Try different ASCII art fonts by passing them as the second argument:
big
(default)block
3-d
banner
digital
doom
gothic
isometric1
letters
slant
Example:
python main_offline.py "AWESOME" "block"
ascii-art-generator/
βββ main.py # Database-connected version
βββ main_offline.py # Offline version (recommended)
βββ quotes_dump.json # Pre-generated quotes database
βββ requirements.txt # Python dependencies
βββ .env # Environment variables (create this)
βββ README.md # This file
βββ env/ # Virtual environment (created during setup)
- pyfiglet: ASCII art text generation
- rich: Beautiful terminal formatting and colors
- psycopg2-binary: PostgreSQL database connectivity (for database mode)
- python-dotenv: Environment variable management
The included quotes_dump.json
contains:
- 11,958+ inspirational quotes
- Multiple categories (motivational, life, success, happiness, etc.)
- Famous authors and thought leaders
- Regularly updated content
- Motivational
- Life
- Success
- Happiness
- Wisdom
- Leadership
- Innovation
- And many more!
You can modify the gradient colors in the code:
# Default: Pink to Cyan gradient
start_color = (255, 105, 180) # Hot Pink
end_color = (0, 255, 255) # Cyan
# Other color combinations to try:
# Purple to Blue: (138, 43, 226) to (0, 191, 255)
# Orange to Red: (255, 165, 0) to (255, 69, 0)
# Green to Blue: (0, 255, 127) to (0, 191, 255)
To add custom quotes to the offline version:
- Edit
quotes_dump.json
- Follow the existing format:
{ "id": 99999, "category": "custom", "quote": "Your inspiring quote here", "author": "Your Name", "created_at": "2025-01-01T00:00:00" }
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- π¨ New color schemes
- π Additional quote categories
- π§ Performance improvements
- π Documentation enhancements
- π Bug fixes
- β¨ New features
This project is licensed under the MIT License - see the LICENSE file for details.
- pyfiglet developers for ASCII art generation
- Rich library for beautiful terminal output
- Quote contributors and authors for inspiration
- Open source community for tools and libraries
-
"Module not found" errors
pip install -r requirements.txt
-
Database connection issues
- Use offline mode:
python main_offline.py
- Check your
.env
file configuration
- Use offline mode:
-
Font not found
- Use one of the supported fonts listed above
- Check pyfiglet documentation for more fonts
-
Colors not displaying
- Ensure your terminal supports colors
- Try:
export FORCE_COLOR=1
- π Bug reports: Open an issue
- π‘ Feature requests: Start a discussion
- β Questions: Check existing issues or start a new discussion
Made with β€οΈ by sudipnext
β Star this repo if you found it helpful!