{"id":26155118,"url":"https://github.com/luigichopper/clarityscript","last_synced_at":"2026-05-26T20:31:19.547Z","repository":{"id":279839717,"uuid":"940164961","full_name":"Luigichopper/ClarityScript","owner":"Luigichopper","description":"A programming language that combines the functionality of HTML with the readability of Python","archived":false,"fork":false,"pushed_at":"2025-02-27T18:10:51.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T08:51:30.963Z","etag":null,"topics":["clarity-script","parser","programming-language","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luigichopper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-27T18:06:32.000Z","updated_at":"2025-02-27T18:28:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5f2958a-66d1-413e-8ee3-371827194bb6","html_url":"https://github.com/Luigichopper/ClarityScript","commit_stats":null,"previous_names":["luigichopper/clarityscript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Luigichopper/ClarityScript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luigichopper%2FClarityScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luigichopper%2FClarityScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luigichopper%2FClarityScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luigichopper%2FClarityScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luigichopper","download_url":"https://codeload.github.com/Luigichopper/ClarityScript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luigichopper%2FClarityScript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33538659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clarity-script","parser","programming-language","python"],"created_at":"2025-03-11T08:49:28.242Z","updated_at":"2026-05-26T20:31:19.538Z","avatar_url":"https://github.com/Luigichopper.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClarityScript Programming Language\n\n## Overview\n\nClarity is a programming language that combines the functionality of HTML with the readability of Python. It provides a more intuitive, indentation-based approach to creating web content that eliminates the verbosity of HTML while preserving its power.\n\n## Features\n\n- **Python-like Syntax**: Use indentation for nesting instead of closing tags\n- **Variables**: Easily define and reuse content with variables\n- **Control Flow**: Include conditionals and loops directly in your markup\n- **Components**: Create reusable components with parameters\n- **CSS and JavaScript Integration**: Seamlessly include styles and scripts\n\n## Installation\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/Luigichopper/ClarityScript\n   cd clarity-language\n   ```\n\n2. Make sure you have Python 3.6+ installed\n\n3. Run the compiler:\n   ```bash\n   python clarity.py input.clar output.html\n   ```\n\n## Example\n\nHere's a simple example of Clarity code:\n\n```python\n$title = \"Hello, Clarity!\"\n\ndocument:\n    head:\n        title: $title\n        meta charset=\"utf-8\"\n        style:\n            \"\"\"\n            body {\n                font-family: sans-serif;\n                max-width: 800px;\n                margin: 0 auto;\n                padding: 20px;\n            }\n            \"\"\"\n    body:\n        h1: $title\n        p: \"Welcome to Clarity, where HTML meets Python!\"\n        \n        # A simple component example\n        @Button(\"Click Me\", \"primary\")\n        \n        # Looping through items\n        ul:\n            for item in [\"Simple\", \"Readable\", \"Powerful\"]:\n                li: item\n\n# Component definition\n@component Button(text, type=\"default\"):\n    button class=f\"btn btn-{type}\": text\n```\n\n## Clarity Syntax Guide\n\n### Basic Elements and Attributes\n\n```python\nelement_name attribute1=\"value1\" attribute2=\"value2\":\n    nested_element: \"Content\"\n```\n\n### Variables\n\n```python\n$variable_name = \"Variable value\"\nelement: $variable_name\n```\n\n### Conditionals\n\n```python\nif $is_logged_in:\n    p: \"Welcome back!\"\nelse:\n    a href=\"/login\": \"Log in\"\n```\n\n### Loops\n\n```python\nul:\n    for item in $items:\n        li: item\n```\n\n### Components\n\n```python\n# Define a component\n@component Card(title, body, footer=None):\n    div class=\"card\":\n        div class=\"card-header\": title\n        div class=\"card-body\": body\n        if footer:\n            div class=\"card-footer\": footer\n\n# Use a component\n@Card(\"My Title\", \"Card content\")\n@Card(\"With Footer\", \"More content\", footer=\"Footer text\")\n```\n\n### Special Blocks (CSS and JavaScript)\n\n```python\nstyle:\n    \"\"\"\n    .container {\n        max-width: 1200px;\n        margin: 0 auto;\n    }\n    \"\"\"\n\nscript:\n    \"\"\"\n    document.addEventListener('DOMContentLoaded', function() {\n        console.log('Page loaded!');\n    });\n    \"\"\"\n```\n\n## File Structure\n\n- **clarity.py** - Main entry point\n- **clarity_lexer.py** - Tokenizes Clarity code\n- **clarity_parser.py** - Parses tokens into AST\n- **clarity_ast.py** - AST node definitions\n- **clarity_compiler.py** - Generates HTML from AST\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Inspired by the readability of Python and the functionality of HTML\n- Created for developers who prefer clean, minimal syntax\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluigichopper%2Fclarityscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluigichopper%2Fclarityscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluigichopper%2Fclarityscript/lists"}