Metadata-Version: 2.4
Name: douwe
Version: 0.1.3
Summary: Run douwe.com projects locally from their standalone repositories.
Author: Douwe Osinga
Project-URL: Homepage, https://douwe.com/projects/douwe_runner
Project-URL: Repository, https://github.com/DOsinga/douwe_runner
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: Jinja2>=3.1
Requires-Dist: PyYAML>=6.0
Requires-Dist: tornado>=6.4

# Douwe Runner

Run one douwe.com project locally:

```bash
uvx douwe cambrium
```

or:

```bash
pipx run douwe cambrium
```

A bare name like `cambrium` resolves to `github.com/DOsinga/cambrium` and caches
the clone under `~/.cache/douwe/projects/`.

From the main douwe.com checkout, you can also run the development copy directly:

```bash
python projects/douwe_runner/douwe.py cambrium
```

Project references can be local or GitHub-backed:

```bash
python projects/douwe_runner/douwe.py cambrium
python projects/douwe_runner/douwe.py ./projects/cambrium
python projects/douwe_runner/douwe.py DOsinga/cambrium
python projects/douwe_runner/douwe.py https://github.com/DOsinga/cambrium
```

Inside the douwe.com checkout, a bare name like `cambrium` prefers
`./projects/cambrium`. Outside that checkout, it resolves to
`github.com/DOsinga/<name>`.

Useful options:

```bash
python projects/douwe_runner/douwe.py --list
python projects/douwe_runner/douwe.py list
python projects/douwe_runner/douwe.py cambrium --embed
python projects/douwe_runner/douwe.py cambrium --no-browser
python projects/douwe_runner/douwe.py cambrium --port 9000
python projects/douwe_runner/douwe.py cambrium --refresh
```

Installed-package equivalents work the same way:

```bash
douwe --list
douwe cambrium --port 9000
douwe cambrium --refresh
```

Douwe Runner is a small local server for standalone douwe.com projects. It
accepts a project directory, a `DOsinga/<repo>` reference, or a GitHub URL; when
needed it caches a shallow clone under `~/.cache/douwe/projects/`.

Use `douwe --list` or `douwe list` to see projects published on douwe.com. The
list comes from `https://douwe.com/projects/index.json`. Some older projects may
still need the full site checkout until their standalone repo is ready.

Project templates are rendered with Jinja2 and served with Tornado. Existing
douwe.com project templates can keep using `{{ static }}` and `{% static "..."
%}` asset references, which the runner maps to local project and shared static
directories.

GitHub-backed projects use the `git` command-line tool for cloning and
refreshing. The GitHub CLI (`gh`) is not required, and the runner does not call
the GitHub API. Local project paths do not require git.

Projects that require WebSockets still need the full Django/Channels site for
now.
