Skip to content

cold-briu/terminal-flyers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Typing Animation with Rich Live

A sophisticated Python script that creates an engaging terminal animation featuring a Spanish "mensaje entrante" followed by a colorful Web3 event announcement flyer. Uses the Rich library's Live feature with Ethereum address-like encoding and multi-color sections.

✨ Features

  • 📡 Spanish Intro Message: Starts with "📡 MENSAJE ENTRANTE 📡" in bold red
  • 🎨 Multi-Color Sections: Different colors for title, agenda, sessions, and event details
  • 🔗 Ethereum Address Effect: Text appears as encoded addresses that gradually decode
  • ⚡ Fast Animation: Quick typing and decoding with responsive cursor
  • 📏 Professional Layout: Top padding and clean visual positioning
  • 🔄 Line-by-Line Processing: Each line completes before moving to the next
  • 💫 Smooth Transitions: Screen clears between message phases
  • 🇪🇸 Spanish Content: Web3 event flyer in Spanish with blockchain education focus

Prerequisites

  • Python 3.7 or newer installed
  • pip package manager available

Installation

  1. Open your terminal or command prompt.
  2. Run: pip install rich

Alternatively, you can install from the requirements file:

pip install -r requirements.txt

Script Setup

The script typing_terminal.py is already created and ready to use. It contains:

  • A Spanish incoming message animation with Ethereum address encoding
  • A multi-line Web3 event announcement with color-coded sections
  • Smooth transitions and professional layout
  • Clean exit handling with Ctrl+C

Usage

Quick Start (Recommended)

  1. In your terminal, navigate to the folder containing the project files.
  2. Run: ./run.sh
  3. The script will automatically set up the virtual environment and run the animation.
  4. Press Ctrl+C to exit cleanly (cursor cleared).

Manual Setup

  1. In your terminal, navigate to the folder containing typing_terminal.py.
  2. Create and activate a virtual environment: python3 -m venv venv && source venv/bin/activate
  3. Install dependencies: pip install -r requirements.txt
  4. Run: python typing_terminal.py
  5. Observe the Spanish incoming message, then the Web3 event announcement with color-coded sections.
  6. Press Ctrl+C to exit cleanly (cursor cleared).

Animation Sequence

  1. Screen Clear: Clean start with no terminal clutter
  2. Incoming Message: 📡 MENSAJE ENTRANTE 📡 appears in bold red
  3. Screen Clear: Transition to main content
  4. Web3 Event Flyer: Multi-line announcement with color-coded sections:
    • Title: "Impulsa tus Ideas en Web3 🚀🧠" (bold magenta)
    • Ecosystem Features: Grants, Public Goods, Retroactive Funding (cyan)
    • Description: Web3 development incentives (white)
    • Agenda: "🎈 Agenda 🎈" (bold yellow)
    • Session 1: "🤯 ¿Wtf es Blockchain? 🐙💥" (bold green)
    • Session 2: "🦄 Oportunidades de emprendimiento en Lisk 🌴🚀" (bold blue)
    • Session 3: "🎓 Presentando DeFi Builder Bootcamp CeloColombia 🔧🦖" (bold bright yellow)
    • Event Details: Date/time and location (bold white)

Configuration

You can customize the animation by editing these variables at the top of typing_terminal.py:

Option Description Default Type
TYPING_DELAY Seconds between each character 0.02 float
BLINK_INTERVAL Seconds between cursor blink toggles 0.2 float
CURSOR_SYMBOL Character used as the cursor '█' string
INCOMING_MESSAGE Initial message text "📡 MENSAJE ENTRANTE 📡" string
CONTENT Main flyer content array Web3 event announcement array

Example Configuration

# --- Configuration (edit these as needed) ---
INCOMING_MESSAGE = "🚨 TRANSMISIÓN URGENTE 🚨"
INCOMING_STYLE = Style(color="bright_red", bold=True, italic=True)
TYPING_DELAY = 0.03      # Slightly slower
BLINK_INTERVAL = 0.3     # Slower blinking
CURSOR_SYMBOL = "|"      # Different cursor symbol

Content Customization

The CONTENT array allows easy line-by-line customization:

CONTENT = [
    {"text": "Your Custom Title", "style": Style(color="blue", bold=True)},
    {"text": "", "style": Style()},  # Empty line
    {"text": "Your content here", "style": Style(color="white")},
    # Add more lines as needed
]

Color Scheme

The animation uses a sophisticated color scheme:

  • Incoming Message: Bold red (red, bold=True)
  • Title: Bold magenta (magenta, bold=True)
  • Ecosystem Features: Cyan (cyan)
  • Description: White (white)
  • Agenda Header: Bold yellow (yellow, bold=True)
  • Session Titles: Green, blue, bright yellow (all bold=True)
  • Speaker Names: Bright black (bright_black)
  • Event Details: Bold white (white, bold=True)

Troubleshooting

  • Import errors: Ensure rich is installed: pip show rich
  • Script doesn't run: Verify you're using Python ≥3.7: python --version
  • Cursor alignment issues: Adjust terminal font to a monospaced type for best cursor alignment
  • Display issues: Some terminals may not support the default cursor symbol (█). Try changing CURSOR_SYMBOL to "|" or "_"
  • Color issues: Ensure your terminal supports ANSI color codes

Technical Details

Animation Phases

  1. Incoming Message Phase:

    • Type Ethereum address character by character
    • Decode to reveal "MENSAJE ENTRANTE"
    • Blink cursor for attention
    • Clear screen
  2. Web3 Event Flyer Phase:

    • Type each line as Ethereum address
    • Decode each line completely before moving to next
    • Apply color coding based on content
    • Show final result with blinking cursor

Key Components

  • Rich Library: Provides live display, text styling, and color support
  • Ethereum Address Generation: Creates realistic-looking encoded text
  • Multi-line Processing: Handles complex text layouts
  • Color Mapping: Automatic section detection and styling
  • Cursor Management: Realistic blinking and positioning
  • Spanish Content: Web3-focused event announcement

Dependencies

  • Rich: A Python library for rich text and beautiful formatting in the terminal
    • Provides the Live display feature for smooth animations
    • Handles terminal output, cursor management, and color styling
    • Supports complex text layouts and multi-color displays

License

This project is open source and available under the MIT License.

About

Flyers as terminal typed messages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors