Metadata-Version: 2.5
Name: parch
Version: 0.1.2
Summary: parch -- pages for e-ink.
Project-URL: Homepage, https://github.com/yyolk/parch
Project-URL: Repository, https://github.com/yyolk/parch
Project-URL: Issues, https://github.com/yyolk/parch/issues
Author-email: Joseph Chiocchi <joe@yolk.cc>
License: The MIT License (MIT)
        
        Copyright (c) 2026 PDF Planner Project
        Copyright (c) 2026 Vitaliy Kudryk (original LYP)
        
        This software is a Python port of Vitaliy Kudryk's LYP (latex yearly planner),
        originally licensed under the MIT License (2026).
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
License-File: LICENSE
Keywords: e-ink,planner,supernote,typst
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Printing
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.13.4
Requires-Dist: questionary
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: typst-native
Requires-Dist: typst==0.15.0; extra == 'typst-native'
Description-Content-Type: text/markdown

# parch

Yearly planner PDFs for e-ink, a Python port of [Vitaliy Kudryk’s LYP](https://github.com/kudrykv/latex-yearly-planner/tree/alpha).

[![PyPI](https://img.shields.io/pypi/v/parch)](https://pypi.org/project/parch/)
[![CI](https://github.com/yyolk/parch/actions/workflows/ci.yml/badge.svg)](https://github.com/yyolk/parch/actions/workflows/ci.yml)

<p>
<img src="docs/samples/158x210-mos-left/cover.svg" alt="Cover" width="180" />
<img src="docs/samples/158x210-mos-left/contents.svg" alt="Contents" width="180" />
<img src="docs/samples/158x210-mos-left/monthly-jan.svg" alt="January" width="180" />
</p>

## Install

Needs [uv](https://docs.astral.sh/uv/) and Python 3.12+.

```shell
uv tool install parch
parch press supernote-nomad
```

If `typst` is not on `PATH`, press downloads official Typst v0.15.1 into `.tools/`.

## Press

```shell
parch press supernote-nomad
```

| Flag | Default | Meaning |
| --- | --- | --- |
| `-w` / `--workdir` | `./out` | Where `index.typst` and `index.pdf` are written |
| `-l` / `--locale` | `en` | Locale code |
| `-g` / `--with-ghostscript` | off | Optional PDF shrink via `gs` |
| `--debug` | off | Draw MOS debug strokes (not a config key) |
| `--year` | file year | Overlay planner year (dates and cover title; not a config key) |

`--year` also rewrites the cover title year when the old year is in the title.

```shell
parch new --from supernote-nomad --year 2027 --yes -o mine.toml
```

Without `--yes`, `parch new` asks for starting profile, year, sections, and output path. Sections live in the profile `sections` list. Comment a name out to disable it.

## Devices

MOS-left is the right-handed writing layout (nav opposite the writing hand). MOS-right is the left-handed writing layout.

| Profile | Device | Writing hand |
| --- | --- | --- |
| `supernote-nomad` | SuperNote Nomad (A6 X2) | right |
| `supernote-nomad-mos-right` | SuperNote Nomad | left |
| `158x210-mos-left` | 158×210 | right |
| `158x210-mos-left-lined` | 158×210 lined | right |
| `158x210-mos-right` | 158×210 | left |
| `158x210-mos-right-lined` | 158×210 lined | left |
| `kindle-scribe` | Kindle Scribe | right |
| `kindle-scribe-mos-right` | Kindle Scribe | left |

## Development

```shell
uv sync
uv run pytest
```

CI runs pytest and a Nomad `parch press`.

Experimental: compile through the PyPI [`typst`](https://pypi.org/project/typst/) binding instead of the CLI.

```shell
uv sync --extra typst-native
PARCH_TYPST=py uv run parch press supernote-nomad
```

Or `uv tool install --with typst==0.15.0 parch`, then `PARCH_TYPST=py parch press supernote-nomad`. Default is still `cli`. There is no `auto`. The binding is 0.15.0; the CLI pin is v0.15.1.

`uv run pytest` skips the full-book comparison (`slow`). Run it with `uv run pytest -m slow -o addopts=`.

Regenerate the thumbs above with `parch proof 158x210-mos-left --samples`.

Ship steps live in [Releasing](docs/releasing.md).

## License

MIT. See `LICENSE`.
