Metadata-Version: 2.4
Name: scriptshape
Version: 0.1.0
Summary: A private handwriting practice coach that turns a letter photo into a clear next drill.
Author: Haider Sattar
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0
Dynamic: license-file

# ScriptShape

ScriptShape is a local handwriting practice coach. Photograph one handwritten word and it turns visible marks into a focused practice note: an overall rhythm score, baseline and spacing signals, and one small retry drill.

![ScriptShape home screen](screenshots/home.png)

## Why it exists

Handwriting advice is often vague: “be neater” or “slow down.” ScriptShape looks at a cropped writing sample and gives one concrete, low-pressure next move. The image is processed on your computer by a transparent image-measurement pipeline; nothing is uploaded.

## Features

- Works offline in a local browser window
- Measures ink distribution, approximate baseline steadiness, and inter-mark spacing
- Gives an approachable score and one tailored two-minute drill
- Drag-and-drop or choose an image from a phone or computer
- Uses a private, no-account interface

## Install

Requires Python 3.10+.

```bash
pip install scriptshape
scriptshape
```

For a checkout instead:

```bash
git clone https://github.com/iwaheedsattar/scriptshape.git
cd scriptshape
python -m pip install -e .
scriptshape
```

Then open `http://127.0.0.1:8765` if the browser did not open automatically.

## Example use

1. Write a familiar word such as “hello” in dark ink on plain paper.
2. Take a bright, close photo and drop it into ScriptShape.
3. Try the suggested drill once, then rewrite the same word.

The score is a practice signal, never a judgement of your handwriting.

## How it works

The built-in image pipeline finds dark pen marks, estimates their lower envelope for a writing baseline, and looks for empty vertical bands that indicate uneven spacing. It deliberately favors simple, inspectable measurements over opaque grading.

## Roadmap

- [ ] Compare a first and second attempt side by side
- [ ] Add print-friendly drill cards
- [ ] Support multiple writing styles and pencil samples

## Development

```bash
python -m unittest discover -s tests -v
```

## License

MIT
