Metadata-Version: 2.4
Name: qttl
Version: 0.1.0
Summary: Interactive timeline viewer for CSV data, built on PyQt6 QGraphics
License-Expression: GPL-3.0-or-later
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: COPYING
Requires-Dist: PyQt6>=6.2
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# qttl

An interactive timeline viewer for CSV data, built on PyQt6 `QGraphicsView`.

```sh
pip install .
qttl examples/build.csv
```

## Warning: LLM generated code

100% of the code in this repository is LLM generated.

## Input

Each CSV row is one timeline item:

| column     | meaning                                            |
|------------|----------------------------------------------------|
| name       | drawn inside the rectangle (clipped if too long)   |
| row-tag    | items with the same tag share one horizontal stripe |
| start-time | left edge of the rectangle                         |
| stop-time  | right edge of the rectangle                        |
| text       | optional; shown in the hover tooltip               |

The columns are positional unless the first row is a header naming them
(`name,row-tag,start-time,stop-time,text`, or the short forms `tag`, `start`, `stop`/`end`).
A header lets the columns come in any order. Times are integers counting
microseconds since the Unix epoch,
and they are shown in UTC. If stop-time equals start-time, the item is
drawn as a vertical dashed line over its row instead of a rectangle. Rows
starting with `#` are ignored. Multiple files are combined.

Overlapping items in a stripe are stacked into lanes. The lanes are assigned
greedily in start order, which uses the fewest possible lanes: one per
item that overlaps at the busiest moment.

## Controls

Press `?` in the window for help.

- Drag to pan.
- Wheel zooms the time axis.
- Shift + wheel pans horizontally, and Ctrl + wheel pans vertically.
- Ctrl + Shift + wheel zooms vertically.
- `W`/`S` zoom in and out, and `A`/`D` pan left and right (Perfetto style).
- The arrow keys pan.
- Shift + `W`/`S` zooms vertically.
- `0`/Home fits everything.
- `Q` quits.

`--no-tooltip-name` leaves the item name out of the tooltip.

## Development

```sh
pip install -e '.[test]'
pytest
```
