summaryrefslogtreecommitdiff
path: root/README.md
blob: b6a5f4db2e5211ab0d4a43cc479687b16def4c07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Yoga

Yoga is a TUI for browsing local yoga videos with quick filtering, duration probing, and one-key playback via VLC. It has ben vibe-coded.

![Yoga](yoga.png)

## Usage

```bash
yoga [--root PATH] [--crop WxH] [--version]
```

- `--root` sets the directory to scan for videos. When omitted, Yoga uses `~/Yoga` and creates it on first launch.
- `--crop` supplies an optional VLC crop string (for example `5:4`). Toggle the crop at runtime with the `c` key.
- `--version` prints the current version and exits.

Yoga recognises common video extensions (`.mp4`, `.mkv`, `.mov`, `.avi`, `.wmv`, `.m4v`) and follows symlinks when scanning. Duration metadata is cached per directory in `.video_duration_cache.json`.

### Keyboard Shortcuts

- `↑/↓` – Navigate the table
- `enter` – Play the selected video in VLC
- `/` or `f` – Open the filter dialog
- `tab` / `shift+tab` – Move between fields in filter/tag dialogs
- `r` – Reset filters
- `n`, `l`, `a` – Sort by name, length, or age
- `c` – Toggle VLC crop
- `t` – Edit tags for the selected video
- `H` / `h` – Hide or re-show the help footer
- `q` – Quit

### Filter Dialog

- Focus starts on the name filter when you press `/`.
- Use `tab` and `shift+tab` to move to **Min minutes**, **Max minutes**, or **Tags contain**.
- Type numeric values for the minute bounds; leave them blank to disable that side of the range.
- Press `enter` to apply the filters or `esc` to cancel.
- Status text reflects how many videos remain after filtering.

## Development

The project uses [Mage](https://magefile.org/) for common tasks. Targets live in `magefile.go`.

```bash
mage build     # go build ./cmd/yoga
mage test      # go test ./...
mage install   # go install ./cmd/yoga
mage coverage  # go test with coverage (fails if <85%)
```

Before sending changes:

1. Format Go code with `gofumpt`.
2. Run `mage test` and `mage coverage` to ensure the suite passes and coverage stays above 85%.
3. Update documentation when flags or behaviour change.

## Licensing

This repository is released under the terms specified in the accompanying license file (if present).