UNPARTY_STYLES.SH Integration Guide for run-repo-analysis
Analysis Date: 2026-03-31
Files Analyzed: run-repo-analysis (63 lines) + unparty_styles.sh (477 lines)
---
Executive Summary
This guide demonstrates how unparty_styles.sh can transform run-repo-analysis from basic bash output to branded, consistent, and visually enhanced terminal experience.
Key Benefits:
✅ Consistent branding across all repository scripts
✅ Reusable styling functions (no code duplication)
✅ Enhanced visual hierarchy and readability
✅ Better accessibility with proper color contrast
✅ Animation support for long-running operations
✅ Platform-safe utilities (macOS/Linux compatibility)
---
Current State vs Styled State
Before (Current Implementation)
#!/bin/bash
echo "🚀 Starting Repository Metadata Analysis Pipeline..."
echo "=================================================="
if [[ ! -f .env ]]; then
echo "❌ Error: .env file not found"
echo "Please create .env file with:"
exit 1
fi
echo "📊 Step 1: Collecting repository metadata..."
./repo/repo-metadata-analyzer
echo "✅ Metadata collection complete"
echo ""
echo "🎉 Repository Metadata Collection Complete!"Issues:
Hardcoded emojis (not consistent across scripts)
No color/styling variables
Basic echo statements
No visual hierarchy
Emojis may not render consistently across terminals
---
After (With unparty_styles.sh)
#!/bin/bash
# Source THEUNPARTYRUNWAY styling system
source unparty_styles.sh
# Show branded header
show_unparty_header "Repository Metadata Analysis Pipeline" "Automated metadata collection and validation"
# Check dependencies
if [[ ! -f .env ]]; then
unparty_error "Error: .env file not found"
unparty_info "Please create .env file with:"
unparty_key_value "TOKEN" "your_github_token"
unparty_key_value "USERNAMES" "(\"jmurrym\" \"org1\" \"org2\")"
unparty_exit_error ".env configuration required" 1
fi
# Step 1: Collection
unparty_section "Step 1: Collecting repository metadata"
unparty_action "Running repo-metadata-analyzer..."
./repo/repo-metadata-analyzer
if [[ $? -ne 0 ]]; then
unparty_exit_error "Metadata collection failed" 1
fi
unparty_success "Metadata collection complete"
# Summary
unparty_section "Collection Complete!"
unparty_key_value "Raw Data (JSON)" "reports/raw-repo-metadata.json"
unparty_key_value "Raw Data (CSV)" "reports/raw-repo-metadata.csv"
unparty_key_value "Analysis Log" "reports/repo-metadata-analysis.log"
# Statistics
repo_count=$(jq '. | length' reports/raw-repo-metadata.json 2>/dev/null || echo "0")
unparty_key_value "Repositories Analyzed" "$repo_count"
if [[ $repo_count -gt 0 ]]; then
top_repo=$(jq -r 'sort_by(.stars) | reverse | .[0] | "\(.name) (\(.stars) stars)"' reports/raw-repo-metadata.json 2>/dev/null)
unparty_key_value "Top Repository" "$top_repo"
fi
unparty_divider
unparty_info "To view the report: open docs/repo-metadata-reference.md"
unparty_info "To analyze trends: open docs/repo_metadata_dashboard.png"
unparty_exit_successBenefits:
✅ Consistent color palette from unparty_styles.sh
✅ Branded header with logo animation
✅ Semantic function names (unparty_error, unparty_success)
✅ Visual hierarchy with sections and dividers
✅ Standardized key-value display
✅ Platform-safe and accessible
---
Line-by-Line Mapping
Header Section (Lines 1-7)
Before:
#!/bin/bash
echo "🚀 Starting Repository Metadata Analysis Pipeline..."
echo "=================================================="After:
#!/bin/bash
source unparty_styles.sh
show_unparty_header "Repository Metadata Analysis Pipeline" \
"Automated metadata collection and validation"What Changes:
Adds branded UNPARTY ASCII logo with animation
Includes official tagline
Consistent timing and spacing
Color-coded with BRAND_COLOR (#f9c22e)
---
Error Handling (Lines 10-16)
Before:
if [[ ! -f .env ]]; then
echo "❌ Error: .env file not found"
echo "Please create .env file with:"
echo "TOKEN=your_github_token"
echo "USERNAMES=(\"jmurrym\" \"org1\" \"org2\")"
exit 1
fiAfter:
if [[ ! -f .env ]]; then
unparty_error "Error: .env file not found"
unparty_info "Please create .env file with:"
unparty_key_value "TOKEN" "your_github_token"
unparty_key_value "USERNAMES" "(\"jmurrym\" \"org1\" \"org2\")"
unparty_exit_error ".env configuration required" 1
fiWhat Changes:
unparty_error: RED color + ❌ emoji (consistent)
unparty_info: BLUE color + 📌 emoji
unparty_key_value: Formatted key:value pairs with CYAN keys
unparty_exit_error: Branded exit message with "failure."
---
Progress Steps (Lines 18-27)
Before:
echo "📊 Step 1: Collecting repository metadata..."
./repo/repo-metadata-analyzer
if [[ $? -ne 0 ]]; then
echo "❌ Metadata collection failed"
exit 1
fi
echo "✅ Metadata collection complete"After:
unparty_section "Step 1: Collecting repository metadata"
unparty_action "Running repo-metadata-analyzer..."
./repo/repo-metadata-analyzer
if [[ $? -ne 0 ]]; then
unparty_exit_error "Metadata collection failed" 1
fi
unparty_success "Metadata collection complete"What Changes:
unparty_section: Creates visual divider with title (═══ title ═══)
unparty_action: BRAND_COLOR with 🚀 emoji
unparty_success: GREEN with 🪩 emoji (THEUNPARTYRUNWAY brand)
Consistent exit handling
---
Summary Section (Lines 42-63)
Before:
echo ""
echo "🎉 Repository Metadata Collection Complete!"
echo "========================================"
echo "📁 Generated Files:"
echo " 🗃️ Raw Data (JSON): reports/raw-repo-metadata.json"
echo " 📄 Raw Data (CSV): reports/raw-repo-metadata.csv"
repo_count=$(jq '. | length' reports/raw-repo-metadata.json 2>/dev/null || echo "0")
echo "📊 Analyzed $repo_count repositories"
top_repo=$(jq -r 'sort_by(.stars) | reverse | .[0] | "\(.name) (\(.stars) stars)"' reports/raw-repo-metadata.json 2>/dev/null)
echo "⭐ Top Repository: $top_repo"
echo ""
echo "To view the report: open docs/repo-metadata-reference.md"After:
unparty_section "Collection Complete!"
unparty_subsection "Generated Files"
unparty_key_value "Raw Data (JSON)" "reports/raw-repo-metadata.json"
unparty_key_value "Raw Data (CSV)" "reports/raw-repo-metadata.csv"
unparty_key_value "Analysis Log" "reports/repo-metadata-analysis.log"
repo_count=$(jq '. | length' reports/raw-repo-metadata.json 2>/dev/null || echo "0")
unparty_key_value "Repositories Analyzed" "$repo_count"
if [[ $repo_count -gt 0 ]]; then
top_repo=$(jq -r 'sort_by(.stars) | reverse | .[0] | "\(.name) (\(.stars) stars)"' reports/raw-repo-metadata.json 2>/dev/null)
unparty_key_value "Top Repository" "$top_repo"
fi
unparty_divider
unparty_info "To view the report: open docs/repo-metadata-reference.md"
unparty_info "To analyze trends: open docs/repo_metadata_dashboard.png"What Changes:
Hierarchical sections and subsections
Structured key-value pairs (easier to parse visually)
Color-coded dividers
Consistent info messaging
Better spacing and alignment
---
Visual Output Comparison
Current Output
🚀 Starting Repository Metadata Analysis Pipeline...
==================================================
📊 Step 1: Collecting repository metadata...
✅ Metadata collection complete
🎉 Repository Metadata Collection Complete!
========================================
📁 Generated Files:
🗃️ Raw Data (JSON): reports/raw-repo-metadata.json
📄 Raw Data (CSV): reports/raw-repo-metadata.csv
📝 Analysis Log: reports/repo-metadata-analysis.log
📊 Analyzed 42 repositories
⭐ Top Repository: theunpartyrunway (156 stars)
To view the report: open docs/repo-metadata-reference.md
To analyze trends: open docs/repo_metadata_dashboard.png---
Styled Output (Terminal Colors)
██╗ ██╗███╗ ██╗██████╗ █████╗ ██████╗ ████████╗██╗ ██╗
██║ ██║████╗ ██║██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝╚██╗ ██╔╝
██║ ██║██╔██╗ ██║██████╔╝███████║██████╔╝ ██║ ╚████╔╝
██║ ██║██║╚██╗██║██╔═══╝ ██╔══██║██╔══██╗ ██║ ╚██╔╝
╚██████╔╝██║ ╚████║██║ ██║ ██║██║ ██║ ██║ ██║
╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝
[YELLOW]
Repository Metadata Analysis Pipeline [WHITE]
Automated metadata collection and validation [CYAN]
═══ Step 1: Collecting repository metadata ═══ [YELLOW]
🚀 Running repo-metadata-analyzer... [YELLOW + WHITE]
🪩 Metadata collection complete [GREEN + WHITE]
═══ Collection Complete! ═══ [YELLOW]
## Generated Files [WHITE]
Raw Data (JSON): reports/raw-repo-metadata.json [CYAN: WHITE]
Raw Data (CSV): reports/raw-repo-metadata.csv [CYAN: WHITE]
Analysis Log: reports/repo-metadata-analysis.log [CYAN: WHITE]
Repositories Analyzed: 42 [CYAN: WHITE]
Top Repository: theunpartyrunway (156 stars) [CYAN: WHITE]
============================================================ [YELLOW]
📌 To view the report: open docs/repo-metadata-reference.md [BLUE + WHITE]
📌 To analyze trends: open docs/repo_metadata_dashboard.png [BLUE + WHITE]
cool! [YELLOW]---
Additional Enhancements Available
1. Loading Animations for Long Operations
# Replace static message with progress indicator
unparty_action "Running repo-metadata-analyzer..."
./repo/repo-metadata-analyzer &
PID=$!
# Show spinner while process runs
unparty_spinner 2.0 "Collecting metadata" &
SPINNER_PID=$!
wait $PID
kill $SPINNER_PID 2>/dev/null2. Progressive Loading for Multi-Step Process
unparty_progressive_loading "Repository Analysis Pipeline" \
"Validating .env configuration" \
"Connecting to GitHub API" \
"Fetching repository metadata" \
"Processing language statistics" \
"Generating reports"3. Typewriter Effect for Important Messages
unparty_typewriter "Analysis complete! Found $repo_count repositories." 0.05 "$BRAND_COLOR"4. Interactive Confirmation
if unparty_confirm "Run enhanced analysis on collected data?"; then
python3 scripts/enhanced_analysis.py
fi5. File Size and Date Display
if [[ -f "reports/raw-repo-metadata.json" ]]; then
size=$(unparty_file_size "reports/raw-repo-metadata.json")
date=$(unparty_file_date "reports/raw-repo-metadata.json")
unparty_key_value "File Size" "$size"
unparty_key_value "Last Modified" "$date"
fi---
Implementation Checklist
If you decide to integrate unparty_styles.sh into run-repo-analysis, follow these steps:
Phase 1: Basic Integration
[ ] Add source unparty_styles.sh at the top
[ ] Replace header with show_unparty_header
[ ] Replace error messages with unparty_error
[ ] Replace success messages with unparty_success
[ ] Replace info messages with unparty_info
Phase 2: Structured Output
[ ] Replace sections with unparty_section
[ ] Replace key-value pairs with unparty_key_value
[ ] Add dividers with unparty_divider
[ ] Use unparty_exit_success and unparty_exit_error
Phase 3: Enhanced UX (Optional)
[ ] Add loading animations for long operations
[ ] Add progress indicators for multi-step processes
[ ] Add file metadata display (size, date)
[ ] Add interactive confirmations
[ ] Add platform detection for conditional features
---
Consistency with Other Scripts
The following THEUNPARTYRUNWAY scripts already use similar patterns:
1. partnership_config.sh: Uses color-coded output functions (print_success, print_error)
2. search.sh: Implements branded output with consistent styling
3. scripts/project_manager.py: Uses THEUNPARTYRUNWAY header pattern
Benefit: Integrating unparty_styles.sh into run-repo-analysis creates consistency across all repository automation scripts.
---
Platform Compatibility Notes
unparty_styles.sh includes platform-safe utilities:
✅ macOS: Uses BSD-style stat commands
✅ Linux: Uses GNU-style stat commands
✅ Terminal Detection: Automatically disables colors in non-TTY environments
✅ CI/CD Safe: Bright color variants for better visibility in logs
---
Maintenance Benefits
Current Approach (Hardcoded)
❌ Emoji changes require editing multiple scripts
❌ Color changes require find/replace across files
❌ No standardization between scripts
❌ Difficult to test styling consistency
With unparty_styles.sh
✅ Single source of truth for all styling
✅ Change once, update everywhere
✅ Consistent emoji and color usage
✅ Testable styling functions
✅ Version-controlled branding
---
Estimated Impact
Lines of Code:
Current: 63 lines (basic bash)
With styling: ~75 lines (includes enhanced features)
Net: +12 lines (+19% for significantly better UX)
Functionality Gain:
✅ Branded header with logo animation
✅ Consistent error/success/info styling
✅ Visual hierarchy with sections
✅ Structured key-value display
✅ Platform-safe file utilities
✅ Exit handlers with branding
Development Time:
Basic integration: ~15 minutes
Full enhancement: ~30 minutes
Testing: ~10 minutes
Total: ~1 hour for complete transformation
---
Conclusion
Integrating unparty_styles.sh into run-repo-analysis provides:
1. Consistency: Aligns with THEUNPARTYRUNWAY branding standards 2. Maintainability: Centralized styling reduces duplication 3. User Experience: Better visual hierarchy and readability 4. Professionalism: Polished terminal interface 5. Accessibility: Proper color contrast and fallbacks
Recommendation: This integration follows the UNPPP methodology and 6 Gatekeepers:
BRAND: Consistent visual identity ✅
CORE: Improved functionality ✅
BUDGET: Minimal development time ✅
PRODUCT: Enhanced user experience ✅
RISK: Low (backward compatible) ✅
GROW: Reusable for other scripts ✅
---
Next Steps: Review this guide and decide if you'd like to proceed with BUILD (implement changes) or CONNECT (hybrid approach with fallbacks).