Skip to content

Latest commit

 

History

1,693 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📘 Modern Arabic Grammar Book

A modern, high-quality Arabic Grammar book project built with HTML, CSS Paged Media, and Python.

🚀 Quick Start

Prerequisites

  • Python 3.10 or higher
  • GTK3 libraries (CRITICAL: Required for WeasyPrint rendering).
    • Linux: sudo apt-get install libpango-1.0-0
    • Mac: brew install pango
    • Windows: Install the GTK/Pango runtime from the WeasyPrint docs; pip install weasyprint is not enough by itself.

Installation

  1. Clone the repository.
  2. Install Python dependencies: pip install -r requirements.txt

Building the Book

Run the central control room to manage OCR, generation, and building the book: python system.py

If you see libgobject-2.0-0 / libpango errors on Windows, the Python package is installed but the native GTK runtime is missing.

📂 Project Structure

  • /pages: Contains the source content. Each chapter is a separate .html file (e.g., 01_intro.html).
  • /styles: Contains the CSS files. main.css controls the global layout and A4 dimensions.
  • /assets: Stores images and fonts.
  • build.py: The Python automation script that merges pages and renders the PDF.

✍️ Contribution Guidelines

Adding a New Chapter:

  1. Create a new file in /pages/ following the naming convention: XX_topic_name.html.

  2. Ensure the file starts with:
    <!DOCTYPE html>
    <html lang="ar" dir="rtl">

  3. Link the stylesheet:
    <link rel="stylesheet" href="../styles/main.css">

  4. Write your content using the approved semantic HTML tags (<article>, <h1>, .grammar-box).

Design Rules:

  • No Inline Styles: Use classes defined in CODING_STANDARDS.md.
  • A4 Layout: Do not change the global @page settings in main.css.
  • Diacritics: All Arabic text must include full Tashkeel.

🛠️ Technical Documentation

For detailed technical constraints, rules, and tool documentation, please refer to:

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages