Arabic-source web markup transpiler for HTML5, CSS, and JavaScript contexts
Project description
Arabic Web Transpiler
arhtml is a source-to-source compiler for Arabic-authored web markup. It reads
.arhtml and emits browser-ready HTML5 with standard HTML, CSS, and JavaScript
syntax. Generated HTML keeps the release contract <!doctype html>,
dir="rtl", and lang="ar".
Current status: phased baseline implementation. HTML elements, attributes,
attribute values, ARIA basics, SVG/MathML basics, CSS token rewriting, and
JavaScript token rewriting are supported through dictionaries/ar-web-v1.json.
CLI
python -m arweb examples/static.arhtml -o examples/static.html
Use an expanded bundled dictionary by name:
python -m arweb examples/minor-v1.1.arhtml -o examples/minor-v1.1.html --dictionary ar-web-v1.1
python -m arweb examples/aria-v1.2.arhtml -o examples/aria-v1.2.html --dictionary ar-web-v1.2
python -m arweb examples/svg-v1.2.arhtml -o examples/svg-v1.2.html --dictionary ar-web-v1.2
python -m arweb examples/mathml-v1.2.arhtml -o examples/mathml-v1.2.html --dictionary ar-web-v1.2
python -m arweb examples/css-v1.2.arhtml -o examples/css-v1.2.html --dictionary ar-web-v1.2
python -m arweb examples/css-visual-v1.3.arhtml -o examples/css-visual-v1.3.html --dictionary ar-web-v1.3
python -m arweb examples/js-browser-v1.3.arhtml -o examples/js-browser-v1.3.html --dictionary ar-web-v1.3
python -m arweb examples/js-parser-v1.3.arhtml -o examples/js-parser-v1.3.html --dictionary ar-web-v1.3
python -m arweb examples/html-v1.4.arhtml -o examples/html-v1.4.html --dictionary ar-web-v1.4
python -m arweb examples/css-effects-v1.5.arhtml -o examples/css-effects-v1.5.html --dictionary ar-web-v1.5
python -m arweb examples/svg-v1.6.arhtml -o examples/svg-v1.6.html --dictionary ar-web-v1.6
python -m arweb examples/js-browser-v1.7.arhtml -o examples/js-browser-v1.7.html --dictionary ar-web-v1.7
python -m arweb examples/mathml-v1.8.arhtml -o examples/mathml-v1.8.html --dictionary ar-web-v1.8
python -m arweb examples/css-modern-v1.9.arhtml -o examples/css-modern-v1.9.html --dictionary ar-web-v1.9
python -m arweb examples/js-components-v1.10.arhtml -o examples/js-components-v1.10.html --dictionary ar-web-v1.10
python -m arweb examples/aria-v1.11.arhtml -o examples/aria-v1.11.html --dictionary ar-web-v1.11
python -m arweb examples/svg-v1.12.arhtml -o examples/svg-v1.12.html --dictionary ar-web-v1.12
python -m arweb examples/mathml-v1.13.arhtml -o examples/mathml-v1.13.html --dictionary ar-web-v1.13
python -m arweb examples/html-v1.14.arhtml -o examples/html-v1.14.html --dictionary ar-web-v1.14
python -m arweb examples/css-current-v1.15.arhtml -o examples/css-current-v1.15.html --dictionary ar-web-v1.15
python -m arweb examples/js-current-v1.16.arhtml -o examples/js-current-v1.16.html --dictionary ar-web-v1.16
python -m arweb examples/aria-v1.17.arhtml -o examples/aria-v1.17.html --dictionary ar-web-v1.17
python -m arweb examples/svg-v1.18.arhtml -o examples/svg-v1.18.html --dictionary ar-web-v1.18
python -m arweb examples/mathml-v1.19.arhtml -o examples/mathml-v1.19.html --dictionary ar-web-v1.19
python -m arweb examples/html-v1.20.arhtml -o examples/html-v1.20.html --dictionary ar-web-v1.20
python -m arweb examples/css-current-v1.21.arhtml -o examples/css-current-v1.21.html --dictionary ar-web-v1.21
python -m arweb examples/js-current-v1.22.arhtml -o examples/js-current-v1.22.html --dictionary ar-web-v1.22
python -m arweb examples/aria-v1.23.arhtml -o examples/aria-v1.23.html --dictionary ar-web-v1.23
python -m arweb examples/svg-v1.24.arhtml -o examples/svg-v1.24.html --dictionary ar-web-v1.24
python -m arweb examples/mathml-v1.25.arhtml -o examples/mathml-v1.25.html --dictionary ar-web-v1.25
Start here for a complete walkthrough: docs/TUTORIAL.md. Runnable examples catalog: docs/EXAMPLES.md. Full generated CLI reference: docs/CLI.md. Standards coverage roadmap: docs/STANDARDS_COVERAGE_ROADMAP.md. Arabic-first production ecosystem guide: docs/PRODUCTION_ECOSYSTEM.md. Product-ready app demo: docs/PRODUCT_DEMO.md. Compatibility guide: docs/COMPATIBILITY.md. Post-v1.3 expansion selection: docs/POST_V1_3_EXPANSION_SELECTION.md. Post-v1.8 expansion selection: docs/POST_V1_8_EXPANSION_SELECTION.md. Post-v1.9 expansion selection: docs/POST_V1_9_EXPANSION_SELECTION.md. Post-v1.10 expansion selection: docs/POST_V1_10_EXPANSION_SELECTION.md. Post-v1.11 expansion selection: docs/POST_V1_11_EXPANSION_SELECTION.md. Post-v1.12 expansion selection: docs/POST_V1_12_EXPANSION_SELECTION.md. Post-v1.13 expansion selection: docs/POST_V1_13_EXPANSION_SELECTION.md. Post-v1.13 stabilization selection: docs/POST_V1_13_STABILIZATION_SELECTION.md. Post-v1.14 expansion selection: docs/POST_V1_14_EXPANSION_SELECTION.md. Post-v1.15 expansion selection: docs/POST_V1_15_EXPANSION_SELECTION.md. Post-v1.16 expansion selection: docs/POST_V1_16_EXPANSION_SELECTION.md. Post-v1.16 stabilization selection: docs/POST_V1_16_STABILIZATION_SELECTION.md. Post-v1.17 expansion selection: docs/POST_V1_17_EXPANSION_SELECTION.md. Post-v1.18 expansion selection: docs/POST_V1_18_EXPANSION_SELECTION.md. Post-v1.19 expansion selection: docs/POST_V1_19_EXPANSION_SELECTION.md. Post-v1.19 stabilization selection: docs/POST_V1_19_STABILIZATION_SELECTION.md. Post-v1.20 expansion selection: docs/POST_V1_20_EXPANSION_SELECTION.md. Post-v1.21 expansion selection: docs/POST_V1_21_EXPANSION_SELECTION.md. Post-v1.22 expansion selection: docs/POST_V1_22_EXPANSION_SELECTION.md. Post-v1.22 stabilization selection: docs/POST_V1_22_STABILIZATION_SELECTION.md. Post-v1.23 expansion selection: docs/POST_V1_23_EXPANSION_SELECTION.md. Post-v1.24 expansion selection: docs/POST_V1_24_EXPANSION_SELECTION.md.
Python API
from arweb import transpile
html = transpile("<قسم><فقرة>مرحبا</فقرة></قسم>")
The compiler always emits <!doctype html> and guarantees the root output tag
has dir="rtl" and lang="ar".
Dictionaries
ar-web-v1.jsonis frozen by SHA-256 snapshot.ar-web-v1.1.jsonextends v1 and adds newer/less-common vocabulary without mutating the frozen baseline.ar-web-v1.2.jsonextends v1.1 and adds the first standards-roadmap packets: author-facing WAI-ARIA 1.2 roles/states/properties and expanded SVG structural, paint, mask, clip, marker, and filter vocabulary, plus MathML Core token, script, table, operator, and annotation vocabulary, plus CSS layout and box-model vocabulary.ar-web-v1.3.jsonextends v1.2 and adds CSS color, typography, transform, animation, DOM traversal, browser event, storage, fetch, and URL vocabulary.- JavaScript scanner hardening preserves regex literals and template text while
translating
${...}template expressions. ar-web-v1.4.jsonextends v1.3 and adds broader author-facing HTML attributes and value contexts for forms, media, metadata, embeds, scripts, microdata, and global attributes.ar-web-v1.5.jsonextends v1.4 and adds CSS effects, filters, clipping, scroll snapping, containment, container-query, and media-query vocabulary.ar-web-v1.6.jsonextends v1.5 and adds SVG animation, text layout, presentation attributes, geometry helpers, foreign objects, and advanced filter value contexts.ar-web-v1.7.jsonextends v1.6 and adds browser JavaScript vocabulary for timers, animation frames, canvas, class lists, observers, structured data, clipboard, media queries, and performance helpers.ar-web-v1.8.jsonextends v1.7 and adds MathML operator/layout attributes, richer math value contexts, annotation encoding aliases, and CSS math layout extension terms.ar-web-v1.9.jsonextends v1.8 and adds modern CSS selectors, cascade and scoped rules, property registration, UI/form styling, and value/function vocabulary.ar-web-v1.10.jsonextends v1.9 and adds Web Components, Shadow DOM, workers, message channels, streams, abort signals, and IndexedDB-oriented JavaScript vocabulary.ar-web-v1.11.jsonextends v1.10 and adds remaining ARIA text attributes, accessible widget relationship fixtures, live-region and drag/drop values, and opaque accessibility data preservation.ar-web-v1.12.jsonextends v1.11 and adds SVG paint/presentation attributes, marker and mask/clip value contexts, symbol/use composition coverage, and a runnable accessible graphic fixture.ar-web-v1.13.jsonextends v1.12 and adds MathML enclosures, glyphs, alignment markers, linebreaking/indent controls, stacked arithmetic, long-division vocabulary, and richer MathML value contexts.ar-web-v1.14.jsonextends v1.13 and adds HTML Living Standard authoring attributes and values for command buttons, dialog close policy, color input alpha/colorspace controls, declarative shadow-root templates, metadata, links, script types, hidden-until-found, and heading/discoverability controls.ar-web-v1.15.jsonextends v1.14 and adds current CSS authoring vocabulary for anchor positioning, scroll/view timelines, view-transition pseudo-elements, nested selectors, animation ranges, and animation composition.ar-web-v1.16.jsonextends v1.15 and adds current JavaScript web application APIs for Navigation API, URLPattern, Web Crypto, Web Locks, ClipboardItem, Cache Storage, and related events.ar-web-v1.17.jsonextends v1.16 and adds WAI-ARIA 1.3-oriented role values for comments, marks, suggestions, and image role vocabulary.ar-web-v1.18.jsonextends v1.17 and adds remaining practical SVG 2 authoring vocabulary for cursor controls, transform boxes, radial-gradient focal controls, filter resolution, text controls, and font presentation.ar-web-v1.19.jsonextends v1.18 and adds Content MathML binding, operator, set/list, calculus, vector/matrix, constants, and annotation-XML vocabulary.ar-web-v1.20.jsonextends v1.19 and adds an HTML Living Standard follow-up forselectedcontent, page lifecycle and context event handler attributes, command dialog values, target keywords, compatibility metadata values, shape defaults, and opaque source-set data preservation.ar-web-v1.21.jsonextends v1.20 and adds CSS Snapshot 2024/current CSSWG follow-up vocabulary for text wrapping, white-space longhands, CSS Values 5 functions, CSS Color 5 device CMYK, custom functions, mixins, and opaque CSS data preservation.ar-web-v1.22.jsonextends v1.21 and adds ECMAScript 2025 and current browser JavaScript API follow-up vocabulary for iterators, Set operations, RegExp.escape, Float16Array, task scheduling, AbortSignal aliases, Service Worker workflows, and opaque JavaScript data preservation.ar-web-v1.23.jsonextends v1.22 and adds WAI-ARIA 1.3 follow-up vocabulary for IDREF relationship aliases, ARIA current/relevant values, ARIA Notify, ARIA IDL member terms, and opaque accessibility data preservation.ar-web-v1.24.jsonextends v1.23 and adds SVG 2 follow-up vocabulary for external-resource and zoom/pan attributes, glyph orientation, enable-background values, SVG DOM reflection terms, and opaque SVG data preservation.ar-web-v1.25.jsonextends v1.24 and adds MathML 4 follow-up vocabulary for fallback image attributes, content dictionary groups, maximum width, theMathMLElementDOM interface, and opaque formula/annotation data preservation.- Generated dictionary references are in
docs/dictionaries/.
Refresh generated dictionary docs:
python scripts/generate_dictionary_docs.py
Check for drift:
python scripts/generate_dictionary_docs.py --check
Refresh CLI docs:
python scripts/generate_cli_docs.py
Refresh examples index:
python scripts/generate_examples_index.py
Check CLI docs:
python scripts/generate_cli_docs.py --check
Check examples index:
python scripts/generate_examples_index.py --check
Check v1.3 release review:
python scripts/generate_v1_3_release_review.py --check
Check v1.8 release review:
python scripts/generate_v1_8_release_review.py --check
Check v1.13 release review:
python scripts/generate_v1_13_release_review.py --check
Check v1.16 release review:
python scripts/generate_v1_16_release_review.py --check
Check v1.19 release review:
python scripts/generate_v1_19_release_review.py --check
Check v1.22 release review:
python scripts/generate_v1_22_release_review.py --check
Packaging Check
The test suite installs the project into a temporary target directory and checks that bundled dictionaries still work outside the repository layout.
Project Health
Run the standard verification set:
python scripts/project_health.py
List the commands without running them:
python scripts/project_health.py --list
Validate the progress ledger directly:
python scripts/check_project_status.py
Validate release readiness:
python scripts/check_release.py
CI runs the same health command on Python 3.11, 3.12, and 3.13.
Contributing
- Contributor guide: CONTRIBUTING.md
- Dictionary expansion checklist: docs/DICTIONARY_EXPANSION_CHECKLIST.md
- Release review checklist: docs/RELEASE_REVIEW_CHECKLIST.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arabic_web_transpiler-0.2.0.tar.gz.
File metadata
- Download URL: arabic_web_transpiler-0.2.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d1856556c9882fd24e0f73dd3a0221621b65ab89872945efd130569aa5bf54d
|
|
| MD5 |
734f28e23601f5c4fe51b1f2b2fbf5b3
|
|
| BLAKE2b-256 |
2930c9ff19e9998ed47dd04045fdc91df84bd6f8101009e07541b0846611cf53
|
File details
Details for the file arabic_web_transpiler-0.2.0-py3-none-any.whl.
File metadata
- Download URL: arabic_web_transpiler-0.2.0-py3-none-any.whl
- Upload date:
- Size: 195.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca4080e8aa7e66bd70f75cd2fccbdc94a351d650f6a93f2c28e28f8b8a5cbd9d
|
|
| MD5 |
5e2cad63678bb95e2e8892dda1f6ce59
|
|
| BLAKE2b-256 |
63798d328433bd00a5e956a135704cd322553fdaa09dd176844bc6f092babc7c
|