#!/usr/bin/env python3 """ AOS HTML Generator Generates HTML boilerplate with AOS scroll animations. Creates ready-to-use HTML files with common AOS patterns. Usage: ./aos_generator.py # Interactive mode ./aos_generator.py --template landing # Use template ./aos_generator.py --template hero --output hero.html """ import sys import argparse import os # HTML Templates TEMPLATES = { "hero": { "name": "Hero Section", "description": "Animated hero section with heading, subtext, and CTA", "html": """ AOS Hero Section

Welcome to the Future

Transform your ideas into reality with cutting-edge technology

Get Started
""" }, "features": { "name": "Feature Cards", "description": "Grid of animated feature cards", "html": """ AOS Feature Cards

Our Features

🚀

Fast Performance

Lightning-fast load times and smooth interactions for the best user experience.

🎨

Beautiful Design

Carefully crafted interfaces that are both functional and aesthetically pleasing.

🔒

Secure

Enterprise-grade security to keep your data safe and protected.

📱

Responsive

Works perfectly on all devices from mobile phones to desktop computers.

âš¡

Easy to Use

Intuitive interface that requires no training to get started.

🌟

Quality Support

24/7 customer support ready to help you whenever you need assistance.

""" }, "landing": { "name": "Landing Page", "description": "Complete landing page with multiple sections", "html": """ AOS Landing Page

Build Something Amazing

The most powerful platform for creating extraordinary experiences

Start Free Trial

Why Choose Us

🚀

Lightning Fast

Optimized for speed and performance

🎨

Beautiful UI

Stunning designs that users love

🔒

Secure

Enterprise-grade security built-in

What Our Customers Say

"This product completely transformed how we work. Incredible!"

— Sarah Johnson, CEO at TechCorp

"Best investment we've made this year. Highly recommended!"

— Michael Chen, Founder at StartupXYZ

"The support team is amazing and the product is even better."

— Emma Davis, Designer at CreativeStudio

Ready to Get Started?

Join thousands of happy customers today

Start Free Trial
""" }, "gallery": { "name": "Image Gallery", "description": "Animated image gallery with zoom effects", "html": """ AOS Image Gallery

Our Portfolio

""" }, "timeline": { "name": "Timeline", "description": "Vertical timeline with alternating content", "html": """ AOS Timeline

Our Journey

January 2020

Company Founded

Started with a vision to transform the industry and make a difference.

June 2020

First Product Launch

Released our flagship product to market with overwhelming positive response.

December 2020

Reached 10,000 Users

Hit a major milestone with rapid user growth and engagement.

March 2021

Series A Funding

Secured significant investment to scale operations and expand the team.

Present

Global Expansion

Continuing to grow and serve customers worldwide with innovative solutions.

""" } } def list_templates(): """List all available templates.""" print("\nAvailable Templates:") print("=" * 60) for template_id, template in TEMPLATES.items(): print(f"\n{template_id}") print(f" Name: {template['name']}") print(f" Description: {template['description']}") print() def generate_html(template_name, output_path=None): """Generate HTML from template.""" if template_name not in TEMPLATES: print(f"Error: Template '{template_name}' not found") print("\nAvailable templates:") for tid in TEMPLATES.keys(): print(f" - {tid}") return False template = TEMPLATES[template_name] html_content = template["html"] if output_path: try: with open(output_path, 'w', encoding='utf-8') as f: f.write(html_content) print(f"✓ Generated {template['name']}: {output_path}") return True except Exception as e: print(f"Error writing file: {e}") return False else: # Output to stdout print(html_content) return True def interactive_mode(): """Run interactive HTML generator.""" print("\nAOS HTML Generator - Interactive Mode") print("=" * 60) list_templates() print("Enter template name:") template_name = input("> ").strip().lower() if template_name not in TEMPLATES: print(f"Error: Template '{template_name}' not found") return print("\nEnter output filename (or press Enter to print to console):") output_path = input("> ").strip() if not output_path: output_path = None generate_html(template_name, output_path) def main(): parser = argparse.ArgumentParser( description="Generate HTML boilerplate with AOS animations" ) parser.add_argument( "--template", choices=list(TEMPLATES.keys()), help="Template to use" ) parser.add_argument( "--output", help="Output file path (default: print to console)" ) parser.add_argument( "--list", action="store_true", help="List available templates" ) args = parser.parse_args() if args.list: list_templates() elif args.template: generate_html(args.template, args.output) else: interactive_mode() if __name__ == "__main__": main()