This commit is contained in:
Mariano Gabriel
2026-07-06 02:41:50 -03:00
parent 31ad8e5928
commit ef72d06bfe
6 changed files with 379 additions and 272 deletions

View File

@@ -100,18 +100,38 @@ uv sync --group doocus --group ocr # + pytesseract (needs system `tesseract`
(`--render`) additionally needs the `pdf-render` group (`pdf2image`) + system
`poppler`.
## Collections (multiple sources)
doocus-app discovers collections from **managed roots** (gitignored),
`<root>/<source>/` per source:
- `doocus-data/<source>/` — document collections
- `meetus-data/<source>/` — meeting collections (`.meetus` + a `--only meetings` index)
Override the roots with `DOOCUS_DATA` (comma-separated; `DOOCUS_OUTPUT` still works
for a single dir). **Collections whose `index.json.root` match are the same source**
— the UI merges their docs + meetings into one interleaved tree, toggled together
from the `` sources menu. When the same file exists in two collections, the copy
whose sidecar resolves wins (a `meetus-data` meeting with its `.meetus` overrides a
bare `doocus` copy).
## Browser UI
`ui/doocus-app/` (sibling of `ui/meetus-app/`, shares `ui/framework/`) reads
`index.json` and shows the **full tree** (folders preserved). Select a file →
detail view: for extracted docs, a split of the markdown-rendered **extracted
text** (clearly labelled "search index, not the document") beside the **native
view of the original** (pdf inline; docx/xlsx → download); for linked files the
original renders directly (image / html / text / markdown). A package builder
zips selected **originals** (+ the `content.md` for extracted ones) for a target
(Gemini web / NotebookLM), and will emit Drive **links** once nodes carry a `url`.
`ui/doocus-app/` (sibling of `ui/meetus-app/`, shares `ui/framework/`):
- **Tree** (folders preserved, source-grouped) with a **search bar** — server-side
search over the cached text (transcripts, extracted `content.md`, raw files);
matches **prune the tree** and show a file count + size.
- **Detail**: for extracted docs, markdown-rendered **extracted text** (labelled
"search index, not the document") beside the **native original** (pdf inline;
docx/xlsx rendered via mammoth/SheetJS); linked files render directly; **meetings
embed the meetus review** (video + transcript + frames, from `@review`).
- **Scan** a folder from the UI (`` menu → Scan) — runs `process_tree` via `uv`
into `doocus-data/`; **⟳** re-discovers newly-scanned sources.
- **Package** builder zips selected **originals** (+ `content.md` for extracted) for
a target (Gemini web / NotebookLM); Drive **links** once nodes carry a `url`.
```bash
cd ui/doocus-app && npm install
DOOCUS_OUTPUT=/abs/path/to/docs-output npm run dev
DOOCUS_DATA="/abs/doocus-data,/abs/meetus-data" npm run dev
```