mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-03 07:33:31 +08:00
docs: align videodb event directory handling
This commit is contained in:
@@ -303,10 +303,11 @@ Use `ws_listener.py` to capture WebSocket events during recording sessions. Desk
|
|||||||
|
|
||||||
#### Quick Start
|
#### Quick Start
|
||||||
|
|
||||||
1. **Start listener**: `python scripts/ws_listener.py --clear &`
|
1. **Choose state dir**: `STATE_DIR="${VIDEODB_EVENTS_DIR:-$HOME/.local/state/videodb}"`
|
||||||
2. **Get WebSocket ID**: `cat "${VIDEODB_EVENTS_DIR:-$HOME/.local/state/videodb}/videodb_ws_id"`
|
2. **Start listener**: `VIDEODB_EVENTS_DIR="$STATE_DIR" python scripts/ws_listener.py --clear "$STATE_DIR" &`
|
||||||
3. **Run capture code** (see reference/capture.md for the full workflow)
|
3. **Get WebSocket ID**: `cat "$STATE_DIR/videodb_ws_id"`
|
||||||
4. **Events written to**: `${VIDEODB_EVENTS_DIR:-$HOME/.local/state/videodb}/videodb_events.jsonl`
|
4. **Run capture code** (see reference/capture.md for the full workflow)
|
||||||
|
5. **Events written to**: `$STATE_DIR/videodb_events.jsonl`
|
||||||
|
|
||||||
Use `--clear` whenever you start a fresh capture run so stale transcript and visual events do not leak into the new session.
|
Use `--clear` whenever you start a fresh capture run so stale transcript and visual events do not leak into the new session.
|
||||||
|
|
||||||
@@ -314,10 +315,12 @@ Use `--clear` whenever you start a fresh capture run so stale transcript and vis
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
events_file = Path.home() / ".local" / "state" / "videodb" / "videodb_events.jsonl"
|
events_dir = Path(os.environ.get("VIDEODB_EVENTS_DIR", Path.home() / ".local" / "state" / "videodb"))
|
||||||
|
events_file = events_dir / "videodb_events.jsonl"
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
if events_file.exists():
|
if events_file.exists():
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ def parse_args() -> tuple[bool, Path]:
|
|||||||
output_dir = arg
|
output_dir = arg
|
||||||
|
|
||||||
if output_dir is None:
|
if output_dir is None:
|
||||||
|
events_dir = os.environ.get("VIDEODB_EVENTS_DIR")
|
||||||
|
if events_dir:
|
||||||
|
return clear, ensure_private_dir(Path(events_dir))
|
||||||
return clear, ensure_private_dir(default_output_dir())
|
return clear, ensure_private_dir(default_output_dir())
|
||||||
|
|
||||||
return clear, ensure_private_dir(Path(output_dir))
|
return clear, ensure_private_dir(Path(output_dir))
|
||||||
|
|||||||
Reference in New Issue
Block a user