@@ -106,6 +106,8 @@ dirplot map pod://my-pod:/app
106106
107107Monitors directories and regenerates the treemap on every change. With ` --animate ` , each debounced render becomes one frame; the complete APNG or MP4 is written on Ctrl-C.
108108
109+ > ** Requires** ` ffmpeg ` on ` PATH ` for MP4 output.
110+
109111``` bash
110112# Watch and regenerate on every change
111113dirplot watch . --output treemap.png
@@ -125,6 +127,11 @@ dirplot watch . --output treemap.png --animate
125127dirplot watch . --output treemap.mp4 --animate
126128dirplot watch . --output treemap.mp4 --animate --crf 18 # higher quality
127129dirplot watch . --output treemap.mp4 --animate --codec libx265 # smaller file
130+
131+ # Fade out to black at the end (default: 1 s, 4 fps)
132+ dirplot watch . --output treemap.png --animate --fade-out
133+ dirplot watch . --output treemap.mp4 --animate --fade-out --fade-out-duration 2.0
134+ dirplot watch . --output treemap.png --animate --fade-out --fade-out-color transparent # APNG only
128135```
129136
130137### Options
@@ -135,6 +142,10 @@ dirplot watch . --output treemap.mp4 --animate --codec libx265 # smaller file
135142| ` --debounce ` | ` 0.5 ` | Seconds of quiet before regenerating; ` 0 ` disables |
136143| ` --event-log ` | — | Write raw events as JSONL on Ctrl-C exit |
137144| ` --animate ` / ` --no-animate ` | off | Capture frames and write APNG or MP4 on Ctrl-C |
145+ | ` --fade-out ` / ` --no-fade-out ` | off | Append a fade-out sequence at the end (animate only) |
146+ | ` --fade-out-duration ` | ` 1.0 ` | Duration of the fade-out in seconds |
147+ | ` --fade-out-frames ` | 4 × duration | Number of fade frames; defaults to 4 per second |
148+ | ` --fade-out-color ` | ` auto ` | Fade target: ` auto ` (black/white per mode), ` transparent ` (PNG/APNG only), CSS name, or hex |
138149| ` --crf ` | ` 23 ` | MP4 quality: 0 = lossless, 51 = worst. Ignored for APNG |
139150| ` --codec ` | ` libx264 ` | MP4 codec: ` libx264 ` (H.264) or ` libx265 ` (H.265) |
140151| ` --log ` / ` --no-log ` | off | Log scale for file sizes |
@@ -151,6 +162,8 @@ dirplot watch . --output treemap.mp4 --animate --codec libx265 # smaller file
151162
152163Replays a JSONL event log produced by ` dirplot watch --event-log ` as an animated treemap. Events are grouped into time buckets (one frame per bucket).
153164
165+ > ** Requires** ` ffmpeg ` on ` PATH ` for MP4 output.
166+
154167``` bash
155168# Replay as APNG (60-second buckets, 30-second total)
156169dirplot replay events.jsonl --output replay.apng --total-duration 30
@@ -162,16 +175,24 @@ dirplot replay events.jsonl --output replay.mp4 --codec libx265 # smaller file
162175
163176# Fine-grained buckets with fixed frame duration
164177dirplot replay events.jsonl --output replay.apng --bucket 10 --frame-duration 200
178+
179+ # Fade out at the end
180+ dirplot replay events.jsonl --output replay.mp4 --total-duration 30 --fade-out
181+ dirplot replay events.jsonl --output replay.png --total-duration 30 --fade-out --fade-out-color white
165182```
166183
167184### Options
168185
169186| Flag | Default | Description |
170187| ---| ---| ---|
171- | ` --output ` / ` -o ` | required | Output ` .apng ` or ` .mp4 ` |
188+ | ` --output ` / ` -o ` | required | Output ` .png ` , ` . apng` , or ` .mp4 ` |
172189| ` --bucket ` | ` 60.0 ` | Time bucket size in seconds; one frame per bucket |
173190| ` --frame-duration ` | ` 500 ` | Frame display time in ms (when ` --total-duration ` is not set) |
174191| ` --total-duration ` | — | Target total animation length in seconds; frames scale proportionally to real time gaps |
192+ | ` --fade-out ` / ` --no-fade-out ` | off | Append a fade-out sequence at the end |
193+ | ` --fade-out-duration ` | ` 1.0 ` | Duration of the fade-out in seconds |
194+ | ` --fade-out-frames ` | 4 × duration | Number of fade frames; defaults to 4 per second |
195+ | ` --fade-out-color ` | ` auto ` | Fade target: ` auto ` (black/white per mode), ` transparent ` (PNG/APNG only), CSS name, or hex |
175196| ` --crf ` | ` 23 ` | MP4 quality: 0 = lossless, 51 = worst. Ignored for APNG |
176197| ` --codec ` | ` libx264 ` | MP4 codec: ` libx264 ` (H.264) or ` libx265 ` (H.265) |
177198| ` --workers ` / ` -w ` | all CPU cores | Parallel render workers |
@@ -189,6 +210,8 @@ dirplot replay events.jsonl --output replay.apng --bucket 10 --frame-duration 20
189210
190211Renders a git repository's commit history as an animated treemap. Each commit becomes one frame; changed tiles are highlighted.
191212
213+ > ** Requires** ` git ` on ` PATH ` . ` ffmpeg ` is also required for MP4 output.
214+
192215The ` repo ` argument accepts:
193216- Local path: ` . ` , ` /path/to/repo `
194217- Local path with ref: ` .@my-branch ` , ` .@v1.0 ` , ` .@abc1234 `
@@ -222,6 +245,12 @@ dirplot git github://owner/repo@main --output history.apng --animate --max-commi
222245dirplot git . --output history.mp4 --animate --last 30d
223246dirplot git . --output history.mp4 --animate --last 24h
224247dirplot git github://owner/repo --output history.mp4 --animate --last 2w --max-commits 10
248+
249+ # Fade out to black at the end (animate only)
250+ dirplot git . --output history.png --animate --fade-out
251+ dirplot git . --output history.mp4 --animate --fade-out --fade-out-duration 2.0
252+ dirplot git . --output history.png --animate --fade-out --fade-out-color transparent # APNG/PNG only
253+ dirplot git . --output history.mp4 --animate --fade-out --fade-out-color " #1a1a2e"
225254```
226255
227256### Options
@@ -235,6 +264,10 @@ dirplot git github://owner/repo --output history.mp4 --animate --last 2w --max-c
235264| ` --last ` | — | Time-period filter: ` 30d ` , ` 24h ` , ` 2w ` , ` 1mo ` , ` 30m ` . Uses ` --shallow-since ` for GitHub URLs |
236265| ` --frame-duration ` | ` 1000 ` | Frame display time in ms (when ` --total-duration ` is not set) |
237266| ` --total-duration ` | — | Target total animation length in seconds; frames scale proportionally to real time gaps between commits |
267+ | ` --fade-out ` / ` --no-fade-out ` | off | Append a fade-out sequence at the end (animate only) |
268+ | ` --fade-out-duration ` | ` 1.0 ` | Duration of the fade-out in seconds |
269+ | ` --fade-out-frames ` | 4 × duration | Number of fade frames; defaults to 4 per second |
270+ | ` --fade-out-color ` | ` auto ` | Fade target: ` auto ` (black/white per mode), ` transparent ` (PNG/APNG only), CSS name, or hex |
238271| ` --crf ` | ` 23 ` | MP4 quality: 0 = lossless, 51 = worst. Ignored for APNG |
239272| ` --codec ` | ` libx264 ` | MP4 codec: ` libx264 ` (H.264) or ` libx265 ` (~ 40% smaller at same quality) |
240273| ` --workers ` / ` -w ` | all CPU cores | Parallel render workers; 4–8 is typically optimal |
@@ -249,6 +282,21 @@ dirplot git github://owner/repo --output history.mp4 --animate --last 2w --max-c
249282
250283---
251284
285+ ## ` dirplot read-meta ` — read embedded metadata
286+
287+ Reads dirplot metadata (date, software version, OS, Python version, executed command) embedded in a PNG, SVG, or MP4/MOV output file.
288+
289+ > ** Requires** ` ffprobe ` on ` PATH ` (bundled with [ ffmpeg] ( https://ffmpeg.org/ ) ) to read metadata from ` .mp4 ` / ` .mov ` files.
290+
291+ ``` bash
292+ dirplot read-meta treemap.png
293+ dirplot read-meta treemap.svg
294+ dirplot read-meta history.mp4
295+ dirplot read-meta a.png b.png c.svg # multiple files
296+ ```
297+
298+ ---
299+
252300## ` dirplot demo ` — run example commands
253301
254302Runs a curated set of example commands covering each subcommand and saves outputs to a folder. Useful for a first-time walkthrough or to verify that everything works in your environment.
@@ -272,8 +320,9 @@ Examples produced:
272320| ` map-local.png ` | ` dirplot map . ` (dark mode, PNG) |
273321| ` map-github.png ` | ` dirplot map github://owner/repo ` (dark mode, PNG) |
274322| ` map-local.svg ` | ` dirplot map . ` (light mode, SVG) |
275- | ` git.png ` | ` dirplot git github://owner/repo --max-commits 5 ` (static PNG) |
323+ | ` git-static .png ` | ` dirplot git github://owner/repo --max-commits 5 ` (static PNG) |
276324| ` git.mp4 ` | ` dirplot git github://owner/repo --max-commits 10 --animate --total-duration 20 ` |
325+ | ` git-animated.png ` | ` dirplot git github://owner/repo --max-commits 10 --animate --total-duration 20 --fade-out ` |
277326| * (stdout)* | ` dirplot read-meta map-local.png ` |
278327
279328` dirplot watch ` and ` dirplot replay ` are listed but skipped with an explanatory note — both require interactive or pre-recorded input.
0 commit comments