Skip to content

Commit 20e0551

Browse files
committed
docs: update README for multi-format output
- Fix 'SVG visualizations' to 'visualizations' (now supports multiple formats) - Remove repo_maintainers from --popups (maintainer count removed from popups) - Update 'How It Works' step 6 to mention all output formats - Add librsvg requirement note for PDF/PNG export
1 parent 45b4b78 commit 20e0551

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ stacktower parse python fastapi --enrich=false -o fastapi.json
138138

139139
### Rendering
140140

141-
The `render` command generates SVG visualizations from parsed JSON graphs:
141+
The `render` command generates visualizations from parsed JSON graphs:
142142

143143
```bash
144144
stacktower render <file> [flags]
@@ -169,10 +169,10 @@ stacktower render examples/real/flask.json -o flask.svg
169169
# JSON layout export (for external tools or re-rendering)
170170
stacktower render examples/real/flask.json -f json -o flask.json
171171

172-
# PDF output (requires librsvg: brew install librsvg)
172+
# PDF output
173173
stacktower render examples/real/flask.json -f pdf -o flask.pdf
174174

175-
# PNG output with 2x scale (requires librsvg)
175+
# PNG output (2x scale by default)
176176
stacktower render examples/real/flask.json -f png -o flask.png
177177

178178
# Multiple formats at once (outputs flask.svg, flask.json, flask.pdf)
@@ -188,6 +188,10 @@ Output path behavior:
188188
- **Multiple formats**: Strips extension, adds format (`-o out.svg -f svg,json``out.svg`, `out.json`)
189189
- **Multiple types**: Adds type suffix (`-t tower,nodelink``out_tower.svg`, `out_nodelink.svg`)
190190

191+
> **Note:** PDF and PNG output requires [librsvg](https://wiki.gnome.org/Projects/LibRsvg):
192+
> - macOS: `brew install librsvg`
193+
> - Linux: `apt install librsvg2-bin`
194+
191195
### Included Examples
192196

193197
The repository ships with pre-parsed graphs so you can experiment immediately:
@@ -300,7 +304,7 @@ These keys are read by specific render flags. All are optional—missing keys si
300304
| `repo_url` | string | Clickable blocks, `--popups`, `--nebraska` |
301305
| `repo_stars` | int | `--popups` |
302306
| `repo_owner` | string | `--nebraska` |
303-
| `repo_maintainers` | []string | `--nebraska`, `--popups` |
307+
| `repo_maintainers` | []string | `--nebraska` |
304308
| `repo_last_commit` | string (date) | `--popups`, brittle detection |
305309
| `repo_last_release` | string (date) | `--popups` |
306310
| `repo_archived` | bool | `--popups`, brittle detection |
@@ -315,7 +319,7 @@ The `--detailed` flag (node-link only) displays **all** meta keys in the node la
315319
3. **Layer** — Assign each package to a row based on its depth
316320
4. **Order** — Minimize edge crossings using branch-and-bound with PQ-tree pruning
317321
5. **Layout** — Compute block widths proportional to downstream dependents
318-
6. **Render** — Generate clean SVG output
322+
6. **Render** — Generate output in SVG, JSON, PDF, or PNG format
319323

320324
The ordering step is where the magic happens. Stacktower uses an optimal search algorithm that guarantees minimum crossings for small-to-medium graphs. For larger graphs, it gracefully falls back after a configurable timeout.
321325

0 commit comments

Comments
 (0)