presently 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/presently/slides.rb +44 -0
- data/lib/presently/version.rb +1 -1
- data/readme.md +4 -0
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 806fa6100505250fcb875b1d751bd96df78108d835bb60ad65c0484e0850e296
|
|
4
|
+
data.tar.gz: 723cdf3db680519971054969cff462752b85b7df67cab51c0bc50f8585c00890
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12e369d511548176c671fbd42718cd136d3d628f173d0c6901f36c805fa87612067765ca1a29d808ec806b223c11ce2f2ea0c59d879b6eb97fa13e27828fd935
|
|
7
|
+
data.tar.gz: 10b3df45c9ed1e72e2dd01bae21daef286cea851e2f5630f7684b0de32771295bbce64a05ee81a028d20992ccb5235151277d2c3515df8cb469253d78d5b2a30
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/bake/presently/slides.rb
CHANGED
|
@@ -33,6 +33,40 @@ def notes(slides_root: "slides")
|
|
|
33
33
|
return nil
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Print a timing breakdown grouped by speaker.
|
|
37
|
+
#
|
|
38
|
+
# Loads every slide in the slides directory and groups them by the `speaker`
|
|
39
|
+
# front matter key. For each speaker, prints each of their slides with its
|
|
40
|
+
# individual duration, followed by a total. Slides with no `speaker` key are
|
|
41
|
+
# grouped under `(no speaker)`. Slides are listed in presentation order.
|
|
42
|
+
#
|
|
43
|
+
# @parameter slides_root [String] The slides directory. Default: `slides`.
|
|
44
|
+
def speakers(slides_root: "slides")
|
|
45
|
+
require "presently"
|
|
46
|
+
|
|
47
|
+
presentation = Presently::Presentation.load(slides_root)
|
|
48
|
+
|
|
49
|
+
# Group slides by speaker, preserving presentation order within each group.
|
|
50
|
+
groups = {}
|
|
51
|
+
presentation.slides.each do |slide|
|
|
52
|
+
key = slide.speaker || "(no speaker)"
|
|
53
|
+
(groups[key] ||= []) << slide
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
groups.each do |speaker, slides|
|
|
57
|
+
total_seconds = slides.sum(&:duration)
|
|
58
|
+
puts "#{speaker} — #{format_duration(total_seconds)}"
|
|
59
|
+
|
|
60
|
+
slides.each do |slide|
|
|
61
|
+
puts " #{format_duration(slide.duration)} #{slide.title} (#{File.basename(slide.path)})"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
puts
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
return nil
|
|
68
|
+
end
|
|
69
|
+
|
|
36
70
|
# Renumber slide files sequentially with a consistent step size.
|
|
37
71
|
#
|
|
38
72
|
# Renames all `.md` files in the slides directory to have sequential
|
|
@@ -89,3 +123,13 @@ def renumber(slides_root: "slides", step: 10)
|
|
|
89
123
|
|
|
90
124
|
puts "Renumbered #{renames.length} slides."
|
|
91
125
|
end
|
|
126
|
+
|
|
127
|
+
private
|
|
128
|
+
|
|
129
|
+
# Format a number of seconds as `M:SS`.
|
|
130
|
+
# @parameter seconds [Integer]
|
|
131
|
+
# @returns [String]
|
|
132
|
+
def format_duration(seconds)
|
|
133
|
+
seconds = seconds.to_i
|
|
134
|
+
"%d:%02d" % [seconds / 60, seconds % 60]
|
|
135
|
+
end
|
data/lib/presently/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -29,6 +29,10 @@ Please see the [project documentation](https://socketry.github.io/presently/) fo
|
|
|
29
29
|
|
|
30
30
|
Please see the [project releases](https://socketry.github.io/presently/releases/index) for all releases.
|
|
31
31
|
|
|
32
|
+
### v0.6.0
|
|
33
|
+
|
|
34
|
+
- Add `bake presently:slides:speakers` task to print a timing breakdown grouped by speaker. Each speaker's slides are listed in presentation order with individual and total durations, making it easy to balance talk time in multi-speaker presentations. Slides without a `speaker` key are grouped under `(no speaker)`.
|
|
35
|
+
|
|
32
36
|
### v0.5.0
|
|
33
37
|
|
|
34
38
|
- Add optional `speaker` front matter key to slides. When present, the current speaker's name is shown in the timing bar. If the next slide has a different speaker, a handoff indicator (e.g. `→ Next Speaker`) is shown alongside, giving presenters an at-a-glance cue for tag-team talks.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.6.0
|
|
4
|
+
|
|
5
|
+
- Add `bake presently:slides:speakers` task to print a timing breakdown grouped by speaker. Each speaker's slides are listed in presentation order with individual and total durations, making it easy to balance talk time in multi-speaker presentations. Slides without a `speaker` key are grouped under `(no speaker)`.
|
|
6
|
+
|
|
3
7
|
## v0.5.0
|
|
4
8
|
|
|
5
9
|
- Add optional `speaker` front matter key to slides. When present, the current speaker's name is shown in the timing bar. If the next slide has a different speaker, a handoff indicator (e.g. `→ Next Speaker`) is shown alongside, giving presenters an at-a-glance cue for tag-team talks.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|