Skip to content

dynapsys/whyml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhyML - Modular YAML Manifest Ecosystem

 ██╗    ██╗██╗  ██╗██╗   ██╗███╗   ███╗██╗     
 ██║    ██║██║  ██║╚██╗ ██╔╝████╗ ████║██║     
 ██║ █╗ ██║███████║ ╚████╔╝ ██╔████╔██║██║     
 ██║███╗██║██╔══██║  ╚██╔╝  ██║╚██╔╝██║██║     
 ╚███╔███╔╝██║  ██║   ██║   ██║ ╚═╝ ██║███████╗
  ╚══╝╚══╝ ╚═╝  ╚═╝   ╚═╝   ╚═╝     ╚═╝╚══════╝

🏗️ Transform websites into maintainable YAML manifests and generate multi-format applications

Python License Tests Coverage Modular

🚀 Quick Start

# Install WhyML ecosystem
pip install whyml whyml-cli whyml-core whyml-converters whyml-scrapers

# Scrape a website to YAML manifest
whyml scrape https://example.com -o data/manifest.yaml

# Convert to multiple formats
whyml convert data/manifest.yaml --format html -o output.html
whyml convert data/manifest.yaml --format react -o Component.tsx
whyml convert data/manifest.yaml --format vue -o Component.vue

📖 Complete Installation Guide →

📚 Documentation

🏁 Getting Started

📋 Core Documentation

🏗️ Modular Architecture

WhyML is built as a modular ecosystem of specialized packages:

📦 Core Packages

  • whyml-core - Core functionality (validation, loading, processing, utilities)
  • whyml-scrapers - Web scraping and analysis capabilities
  • whyml-converters - Multi-format conversion (HTML, React, Vue, PHP)
  • whyml-cli - Unified command-line interface
  • whyml - Main package orchestrating all modules

📖 View Modular Package Documentation → | whyml-converters → | whyml-scrapers → | whyml-cli →

🎯 Key Features

  • 🚀 Multi-Format Conversion: Generate HTML, React, Vue, and PHP from YAML manifests
  • 🕷️ Advanced Web Scraping: Intelligent website-to-manifest conversion with structure simplification
  • 🔗 Template Inheritance: Advanced inheritance system with dependency resolution
  • Async Processing: High-performance asynchronous manifest loading and processing
  • 🧪 Comprehensive Testing: 127+ test cases with 85%+ coverage across all packages
  • 🛠️ CLI & API: Command-line interface and FastAPI server for integration

⚡ Example YAML Manifest

metadata:
  title: "Landing Page"
  description: "Modern landing page component"
  version: "1.0.0"

template_vars:
  hero_text: "Welcome to Our Product"
  cta_text: "Get Started"

styles:
  hero:
    background: "linear-gradient(135deg, #007bff, #0056b3)"
    padding: "80px 0"
    text-align: "center"
    color: "white"

structure:
  main:
    class: "hero-section"
    children:
      div:
        class: "container"
        children:
          - h1:
              text: "{{ hero_text }}"
              class: "display-4"
          - button:
              text: "{{ cta_text }}"
              class: "btn btn-success btn-lg"

📁 View More Examples → | Data Samples →

🚀 Development

Testing

Each package includes comprehensive testing with Makefiles:

# Test specific packages
cd whyml-core && make test
cd whyml-converters && make test-coverage
cd whyml-scrapers && make test-watch
cd whyml-cli && make test-integration

# Test all packages
make test

Building & Publishing

# Build specific packages
cd whyml-converters && make build
cd whyml-core && make publish-test

# Clean all packages
find . -name "Makefile" -execdir make clean \;

🧪 Testing & Development

Current Status

  • 127+ test cases across all modular packages
  • 117+ passing tests (85%+ coverage)
  • Each package includes dedicated Makefiles with test targets

Package Development

# Individual package development
cd whyml-core && make test-coverage
cd whyml-converters && make test-html test-react test-vue test-php
cd whyml-scrapers && make test-scraper test-analyzer
cd whyml-cli && make test-integration

# Cross-package integration testing
make test

📖 Complete Testing Guide →

📄 Contributing & License

Development Setup

git clone https://github.com/dynapsys/whyml.git
cd whyml
python -m venv venv
source venv/bin/activate
pip install -e .

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.


📞 Support & Links


⭐ Star this repo if WhyML helps you build better applications!

Made with ❤️ by Tom Sapletta