Metadata-Version: 2.4
Name: engrave
Version: 3.1.4
Summary: A static site generator with live preview capability
Author-email: Nitipit Nontasuwan <nitipit@gmail.com>
Maintainer-email: Nitipit Nontasuwan <nitipit@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: generator,preview,static site generator,template,web,website
Requires-Python: >=3.10
Requires-Dist: aiostream>=0.6.4
Requires-Dist: cyclopts>=3.11.2
Requires-Dist: dacite>=1.9.2
Requires-Dist: fastapi[standard]>=0.115.8
Requires-Dist: ipython>=8.37.0
Requires-Dist: jinja2>=3.1.5
Requires-Dist: markupsafe>=3.0.2
Requires-Dist: mistune>=3.1.2
Requires-Dist: uvicorn>=0.34.0
Requires-Dist: watchfiles>=1.0.4
Description-Content-Type: text/markdown

# Engrave

**A lightweight static-site generator using Python + Jinja2**
Version: 3.1.4

## 🚀 What is Engrave

Engrave is a static-site generator that transforms plain HTML or Markdown files into ready-to-deploy static websites using Jinja2 templating. It’s ideal for documentation sites, project landing pages, blogs, or any static content without server-side rendering.

## ✅ Why use Engrave / Use-cases

* Quickly build documentation sites, landing pages, or simple blogs without needing a database or backend
* Write content in HTML or Markdown and reuse templates/layouts easily
* Lightweight and easy to deploy (works well with GitHub Pages, Netlify, S3/static-hosting)
* Highly flexible via Jinja2 templates — layout, partials, includes

## 🌟 Features

* Supports HTML and Markdown as input
* Uses Jinja2 templates for layout and partials
* Simple CLI command for build and watch/rebuild workflow
* Clean project structure and Python packaging-ready

## 🧰 Installation

```bash
pip install engrave
```

## 🚀 Quick Start / Usage

## 📘 CLI Usage

### Build

Generate a static site from a source directory into the output directory.

```bash
engrave build <content_dir> <output_dir>
```

### Development Mode (Auto‑Rebuild + SSE)

Rebuilds automatically when files change. Can optionally run a preview server.

```bash
engrave server <content_dir> <output_dir> [--watch]

# Example: watch only Markdown + HTML files
engrave server docs/ build/ --watch ".*\.(md|html)$"
```

### CLI Help
`engrave -h`  
`engrave server -h`

```
Usage: engrave server [ARGS] [OPTIONS]

Start a development server with live preview.

╭─ Parameters ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *  DIR-SRC --dir-src                  Source directory [required]                                                          │
│ *  DIR-DEST --dir-dest                Destination directory for build output [required]                                    │
│    COPY --copy --empty-copy           RegEx patterns based on dir_src for files/directories to copy verbatim [default: []] │
│    WATCH --watch --empty-watch        Additional paths to watch, expressed as regular expression patterns relative to the  │
│                                       current working directory. These are in addition to files under dir_src and any      │
│                                       paths matched by copy. Changes to matched paths will be streamed to web clients via  │
│                                       Server-Sent Events (SSE) to enable live preview/reload. [default: []]                │
│    EXCLUDE --exclude --empty-exclude  RegEx patterns to exclude from processing and watching [default: []]                 │
│    LOG --log                          [default: INFO]                                                                      │
│    HOST --host                        Host interface to bind the development server [default: 127.0.0.1]                   │
│    PORT --port                        Port number for the development server [default: 8000]                               │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

## 🛠️ Testing

To run all tests, use:

```bash
python -m unittest
```

## 📄 License

This project is licensed under the MIT License — see the LICENSE file.
