Metadata-Version: 2.4
Name: peerfold-review
Version: 0.1.15
Summary: Local PDF review with browser UI and Acrobat-compatible highlights
Author: Vincenzo Malagola
License: MIT License
        
        Copyright (c) 2026 Vincenzo Malagola
        
        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.
        
Project-URL: Homepage, https://vincenzoml.github.io/PeerFold/
Project-URL: Repository, https://github.com/vincenzoml/PeerFold
Project-URL: Issues, https://github.com/vincenzoml/PeerFold/issues
Keywords: pdf,review,annotation,highlights,academic
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Editors :: Documentation
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pymupdf>=1.24.0
Requires-Dist: pywebview>=5.3
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: playwright>=1.44; extra == "dev"
Requires-Dist: pyinstaller>=6.6; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Dynamic: license-file

# PeerFold

Review PDFs in a native window — embedded WebKit/WebView2 via [pywebview](https://pywebview.flowrl.com/), no browser tabs or URL bar. Use `--web` for your system browser (recommended over SSH). Highlights are written as standard PDF `/Highlight` annotations — open the saved copy in Acrobat, Preview, or any PDF reader.

Saved reviews: `manuscript_VC-2026-06-09.pdf` next to the original.

## Install

**macOS & Linux**

```bash
curl -fsSL https://vincenzoml.github.io/PeerFold/install.sh | bash
```

Installs the latest release: macOS → `Applications/PeerFold.app`; Linux → `~/.local/bin/peerfold`.

**Windows** (PowerShell)

```powershell
irm https://vincenzoml.github.io/PeerFold/install.ps1 | iex
```

Installs to `%LOCALAPPDATA%\Programs\PeerFold` and adds `peerfold` to your user PATH.

**Python 3.10+** (no pipx required)

```bash
python3 -m pip install --user peerfold-review
peerfold manuscript.pdf --reviewer RB
```

Ensure `~/.local/bin` is on your PATH, or use a virtual environment:

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install peerfold-review
peerfold manuscript.pdf --reviewer RB
```

With [pipx](https://pipx.pypa.io/) (isolated CLI on PATH):

```bash
pipx install peerfold-review
peerfold manuscript.pdf --reviewer RB
```

### Sharing with co-authors (same paper repo)

Do **not** submodule PeerFold — it is a published package. Pick one:

1. **One-liner** — each co-author runs `python3 -m pip install --user peerfold-review` once.
2. **Repo launcher** (recommended for co-authors) — from your paper repo root:

```bash
mkdir -p scripts && curl -fsSL https://vincenzoml.github.io/PeerFold/peerfold.py -o scripts/peerfold.py
python3 scripts/peerfold.py review-builds/paper.pdf --reviewer AB
```

Add `.venv-peerfold/` to `.gitignore`. The launcher pins a PyPI version in `PEERFOLD_VERSION` so everyone on the repo uses the same build. Upgrade deliberately:

```bash
python3 scripts/peerfold.py --update   # bumps the pin — commit scripts/peerfold.py
```
3. **Standalone app** — `curl -fsSL …/install.sh | bash` (macOS/Linux) or the Windows PowerShell installer; no Python needed.

Manual downloads: [GitHub Releases](https://github.com/vincenzoml/PeerFold/releases/latest).

Install scripts: [install.sh](https://vincenzoml.github.io/PeerFold/install.sh) · [install.ps1](https://vincenzoml.github.io/PeerFold/install.ps1)

## Usage

```bash
peerfold paper.pdf                  # native window (default)
peerfold paper.pdf -r VC            # reviewer short name (filename + metadata)
peerfold paper.pdf --port 8765      # fixed port
peerfold paper.pdf --web            # system browser (use over SSH)
peerfold paper.pdf --no-browser     # server only
```

Environment: `PEERFOLD_REVIEWER` sets the default reviewer name.

## Features

- Span-accurate text highlights with comment threads
- Citation links open DOIs/URLs directly
- Multi-tab sync, autosave, reviewer switching
- Adobe-compatible annotation format

## Development

```bash
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
peerfold sample.pdf
pytest
```

## License

MIT — see [LICENSE](LICENSE). Uses [PyMuPDF](https://pymupdf.readthedocs.io/) (AGPL).
