Skip to content

Commit 2eb803b

Browse files
committed
Use a square-root scale for the duration sparkline
Linear bars were dominated by the single longest cue, leaving the short cues indistinguishable. A square-root scale spreads them out while the longest cue still reads as the longest.
1 parent 5470632 commit 2eb803b

4 files changed

Lines changed: 19 additions & 16 deletions

File tree

cmd/plt_cuesheet.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package cmd
1717
import (
1818
"encoding/json"
1919
"fmt"
20+
"math"
2021
"os"
2122
"os/exec"
2223
"path/filepath"
@@ -332,9 +333,11 @@ func cueSheetRow(c cue, elapsed, maxDur float64) string {
332333
}
333334
number := fmt.Sprintf("[#text(fill: %s, weight: \"bold\", size: 12pt)[%d]]", cueNumberColor, c.Index)
334335

336+
// Square-root scale so short cues stay distinguishable while the longest
337+
// still reads as the longest.
335338
pace := 0.0
336339
if maxDur > 0 {
337-
pace = c.DurationSec / maxDur * 100
340+
pace = math.Sqrt(c.DurationSec/maxDur) * 100
338341
}
339342
duration := fmt.Sprintf("[#stack(spacing: 3.5pt, [%s], sparkbar(%.1f), "+
340343
"text(size: 7pt, fill: luma(62%%))[elapsed %s])]",

meeting-dec-2nd/cuesheet.pdf

15 Bytes
Binary file not shown.

meeting-dec-2nd/cuesheet.typ

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,34 @@
2727
text(size: 7.5pt, fill: luma(45%), tracking: 0.5pt)[CUE], text(size: 7.5pt, fill: luma(45%), tracking: 0.5pt)[DURATION], text(size: 7.5pt, fill: luma(45%), tracking: 0.5pt)[AFTER],
2828
),
2929
table.hline(stroke: 0.6pt + luma(55%)),
30-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[1]], [#image("thumbs/01.jpg", width: 2cm)], [#text(weight: 500)[135. Jehovah’s Warm Appeal: “Be Wise, My Son”] \ #raw("clips/01-135-jehovahs-warm-appeal-be-wise-my-son.mp4")], [#stack(spacing: 3.5pt, [2:19.0], sparkbar(17.5), text(size: 7pt, fill: luma(62%))[elapsed 2:19.0])], [#text(fill: luma(50%))[freeze]],
30+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[1]], [#image("thumbs/01.jpg", width: 2cm)], [#text(weight: 500)[135. Jehovah’s Warm Appeal: “Be Wise, My Son”] \ #raw("clips/01-135-jehovahs-warm-appeal-be-wise-my-son.mp4")], [#stack(spacing: 3.5pt, [2:19.0], sparkbar(41.9), text(size: 7pt, fill: luma(62%))[elapsed 2:19.0])], [#text(fill: luma(50%))[freeze]],
3131
table.hline(stroke: 0.3pt + luma(88%)),
32-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[2]], [#image("thumbs/02.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:1, 2] \ #raw("clips/02-talk-1-elliot-isaiah-5-1-2.mp4")], [#stack(spacing: 3.5pt, [0:54.3], sparkbar(6.8), text(size: 7pt, fill: luma(62%))[elapsed 3:13.3])], [#text(fill: luma(50%))[freeze]],
32+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[2]], [#image("thumbs/02.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:1, 2] \ #raw("clips/02-talk-1-elliot-isaiah-5-1-2.mp4")], [#stack(spacing: 3.5pt, [0:54.3], sparkbar(26.1), text(size: 7pt, fill: luma(62%))[elapsed 3:13.3])], [#text(fill: luma(50%))[freeze]],
3333
table.hline(stroke: 0.3pt + luma(88%)),
34-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[3]], [#image("thumbs/03.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:7] \ #raw("clips/03-talk-1-elliot-isaiah-5-7.mp4")], [#stack(spacing: 3.5pt, [0:38.5], sparkbar(4.8), text(size: 7pt, fill: luma(62%))[elapsed 3:51.7])], [#text(fill: luma(50%))[freeze]],
34+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[3]], [#image("thumbs/03.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:7] \ #raw("clips/03-talk-1-elliot-isaiah-5-7.mp4")], [#stack(spacing: 3.5pt, [0:38.5], sparkbar(22.0), text(size: 7pt, fill: luma(62%))[elapsed 3:51.7])], [#text(fill: luma(50%))[freeze]],
3535
table.hline(stroke: 0.3pt + luma(88%)),
36-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[4]], [#image("thumbs/04.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:4] \ #raw("clips/04-talk-1-elliot-isaiah-5-4.mp4")], [#stack(spacing: 3.5pt, [0:13.1], sparkbar(1.7), text(size: 7pt, fill: luma(62%))[elapsed 4:04.8])], [#text(fill: luma(50%))[continue]],
36+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[4]], [#image("thumbs/04.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:4] \ #raw("clips/04-talk-1-elliot-isaiah-5-4.mp4")], [#stack(spacing: 3.5pt, [0:13.1], sparkbar(12.9), text(size: 7pt, fill: luma(62%))[elapsed 4:04.8])], [#text(fill: luma(50%))[continue]],
3737
table.hline(stroke: 0.3pt + luma(88%)),
38-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[5]], [#image("thumbs/05.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot grapes.jpg] \ #raw("clips/05-talk-1-elliot-grapes-jpg.jpg")], [#stack(spacing: 3.5pt, [0:04.0], sparkbar(0.5), text(size: 7pt, fill: luma(62%))[elapsed 4:08.8])], [#text(fill: luma(50%))[freeze]],
38+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[5]], [#image("thumbs/05.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot grapes.jpg] \ #raw("clips/05-talk-1-elliot-grapes-jpg.jpg")], [#stack(spacing: 3.5pt, [0:04.0], sparkbar(7.1), text(size: 7pt, fill: luma(62%))[elapsed 4:08.8])], [#text(fill: luma(50%))[freeze]],
3939
table.hline(stroke: 0.3pt + luma(88%)),
40-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[6]], [#image("thumbs/06.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:5, 6] \ #raw("clips/06-talk-1-elliot-isaiah-5-5-6.mp4")], [#stack(spacing: 3.5pt, [0:41.5], sparkbar(5.2), text(size: 7pt, fill: luma(62%))[elapsed 4:50.4])], [#text(fill: luma(50%))[freeze]],
40+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[6]], [#image("thumbs/06.jpeg", width: 2cm)], [#text(weight: 500)[Talk 1 Elliot Isaiah 5:5, 6] \ #raw("clips/06-talk-1-elliot-isaiah-5-5-6.mp4")], [#stack(spacing: 3.5pt, [0:41.5], sparkbar(22.9), text(size: 7pt, fill: luma(62%))[elapsed 4:50.4])], [#text(fill: luma(50%))[freeze]],
4141
table.hline(stroke: 0.3pt + luma(88%)),
42-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[7]], [#image("thumbs/07.jpeg", width: 2cm)], [#text(weight: 500)[Talk 2 Hawkins Isaiah 5:20] \ #raw("clips/07-talk-2-hawkins-isaiah-5-20.mp4")], [#stack(spacing: 3.5pt, [0:22.5], sparkbar(2.8), text(size: 7pt, fill: luma(62%))[elapsed 5:12.8])], [#text(fill: luma(50%))[freeze]],
42+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[7]], [#image("thumbs/07.jpeg", width: 2cm)], [#text(weight: 500)[Talk 2 Hawkins Isaiah 5:20] \ #raw("clips/07-talk-2-hawkins-isaiah-5-20.mp4")], [#stack(spacing: 3.5pt, [0:22.5], sparkbar(16.8), text(size: 7pt, fill: luma(62%))[elapsed 5:12.8])], [#text(fill: luma(50%))[freeze]],
4343
table.hline(stroke: 0.3pt + luma(88%)),
44-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[8]], [#image("thumbs/08.jpeg", width: 2cm)], [#text(weight: 500)[Talk 6 Rhonda Isaiah 41:10] \ #raw("clips/08-talk-6-rhonda-isaiah-41-10.mp4")], [#stack(spacing: 3.5pt, [0:20.4], sparkbar(2.6), text(size: 7pt, fill: luma(62%))[elapsed 5:33.3])], [#text(fill: luma(50%))[freeze]],
44+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[8]], [#image("thumbs/08.jpeg", width: 2cm)], [#text(weight: 500)[Talk 6 Rhonda Isaiah 41:10] \ #raw("clips/08-talk-6-rhonda-isaiah-41-10.mp4")], [#stack(spacing: 3.5pt, [0:20.4], sparkbar(16.0), text(size: 7pt, fill: luma(62%))[elapsed 5:33.3])], [#text(fill: luma(50%))[freeze]],
4545
table.hline(stroke: 0.3pt + luma(88%)),
46-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[9]], [#image("thumbs/09.jpeg", width: 2cm)], [#text(weight: 500)[Talk 6 Rhonda 1 Peter 5:7] \ #raw("clips/09-talk-6-rhonda-1-peter-5-7.mp4")], [#stack(spacing: 3.5pt, [0:13.9], sparkbar(1.8), text(size: 7pt, fill: luma(62%))[elapsed 5:47.2])], [#text(fill: luma(50%))[freeze]],
46+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[9]], [#image("thumbs/09.jpeg", width: 2cm)], [#text(weight: 500)[Talk 6 Rhonda 1 Peter 5:7] \ #raw("clips/09-talk-6-rhonda-1-peter-5-7.mp4")], [#stack(spacing: 3.5pt, [0:13.9], sparkbar(13.2), text(size: 7pt, fill: luma(62%))[elapsed 5:47.2])], [#text(fill: luma(50%))[freeze]],
4747
table.hline(stroke: 0.3pt + luma(88%)),
48-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[10]], [#image("thumbs/10.jpeg", width: 2cm)], [#text(weight: 500)[Talk 6 Rhonda 2 Timothy 3:12] \ #raw("clips/10-talk-6-rhonda-2-timothy-3-12.mp4")], [#stack(spacing: 3.5pt, [0:13.4], sparkbar(1.7), text(size: 7pt, fill: luma(62%))[elapsed 6:00.6])], [#text(fill: luma(50%))[freeze]],
48+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[10]], [#image("thumbs/10.jpeg", width: 2cm)], [#text(weight: 500)[Talk 6 Rhonda 2 Timothy 3:12] \ #raw("clips/10-talk-6-rhonda-2-timothy-3-12.mp4")], [#stack(spacing: 3.5pt, [0:13.4], sparkbar(13.0), text(size: 7pt, fill: luma(62%))[elapsed 6:00.6])], [#text(fill: luma(50%))[freeze]],
4949
table.hline(stroke: 0.3pt + luma(88%)),
50-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[11]], [#image("thumbs/11.jpg", width: 2cm)], [#text(weight: 500)[65. Move Ahead!] \ #raw("clips/11-65-move-ahead.mp4")], [#stack(spacing: 3.5pt, [2:15.1], sparkbar(17.0), text(size: 7pt, fill: luma(62%))[elapsed 8:15.7])], [#text(fill: luma(50%))[freeze]],
50+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[11]], [#image("thumbs/11.jpg", width: 2cm)], [#text(weight: 500)[65. Move Ahead!] \ #raw("clips/11-65-move-ahead.mp4")], [#stack(spacing: 3.5pt, [2:15.1], sparkbar(41.3), text(size: 7pt, fill: luma(62%))[elapsed 8:15.7])], [#text(fill: luma(50%))[freeze]],
5151
table.hline(stroke: 0.3pt + luma(88%)),
5252
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[12]], [#image("thumbs/12.jpeg", width: 2cm)], [#text(weight: 500)[2025 Governing Body Update \#7] \ #raw("clips/12-2025-governing-body-update-7.mp4")], [#stack(spacing: 3.5pt, [13:13.5], sparkbar(100.0), text(size: 7pt, fill: luma(62%))[elapsed 21:29.3])], [#text(fill: luma(50%))[freeze]],
5353
table.hline(stroke: 0.3pt + luma(88%)),
54-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[13]], [#image("thumbs/13.jpg", width: 2cm)], [#text(weight: 500)[40—David and Goliath] \ #raw("clips/13-40-david-and-goliath.mp4")], [#stack(spacing: 3.5pt, [7:57.5], sparkbar(60.2), text(size: 7pt, fill: luma(62%))[elapsed 29:26.8])], [#text(fill: luma(50%))[freeze]],
54+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[13]], [#image("thumbs/13.jpg", width: 2cm)], [#text(weight: 500)[40—David and Goliath] \ #raw("clips/13-40-david-and-goliath.mp4")], [#stack(spacing: 3.5pt, [7:57.5], sparkbar(77.6), text(size: 7pt, fill: luma(62%))[elapsed 29:26.8])], [#text(fill: luma(50%))[freeze]],
5555
table.hline(stroke: 0.3pt + luma(88%)),
56-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[14]], [#image("thumbs/14.jpg", width: 2cm)], [#text(weight: 500)[41—David and Saul] \ #raw("clips/14-41-david-and-saul.mp4")], [#stack(spacing: 3.5pt, [7:10.7], sparkbar(54.3), text(size: 7pt, fill: luma(62%))[elapsed 36:37.5])], [#text(fill: luma(50%))[freeze]],
56+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[14]], [#image("thumbs/14.jpg", width: 2cm)], [#text(weight: 500)[41—David and Saul] \ #raw("clips/14-41-david-and-saul.mp4")], [#stack(spacing: 3.5pt, [7:10.7], sparkbar(73.7), text(size: 7pt, fill: luma(62%))[elapsed 36:37.5])], [#text(fill: luma(50%))[freeze]],
5757
table.hline(stroke: 0.3pt + luma(88%)),
58-
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[15]], [#image("thumbs/15.jpg", width: 2cm)], [#text(weight: 500)[4. “Jehovah Is My Shepherd”] \ #raw("clips/15-4-jehovah-is-my-shepherd.mp4")], [#stack(spacing: 3.5pt, [3:37.7], sparkbar(27.4), text(size: 7pt, fill: luma(62%))[elapsed 40:15.2])], [#text(fill: luma(50%))[freeze]],
58+
[#text(fill: rgb("#235a68"), weight: "bold", size: 12pt)[15]], [#image("thumbs/15.jpg", width: 2cm)], [#text(weight: 500)[4. “Jehovah Is My Shepherd”] \ #raw("clips/15-4-jehovah-is-my-shepherd.mp4")], [#stack(spacing: 3.5pt, [3:37.7], sparkbar(52.4), text(size: 7pt, fill: luma(62%))[elapsed 40:15.2])], [#text(fill: luma(50%))[freeze]],
5959
table.hline(stroke: 0.3pt + luma(88%)),
6060
)

meeting-dec-2nd/playlist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"code": "ASL"
77
},
88
"resolution": "720p",
9-
"builtAt": "2026-06-12T19:30:24Z",
9+
"builtAt": "2026-06-12T19:34:12Z",
1010
"cues": [
1111
{
1212
"index": 1,

0 commit comments

Comments
 (0)