flycal-cli 0.7.0 → 0.7.1
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
- data/README.md +14 -12
- data/lib/flycal_cli/cli.rb +1 -1
- data/lib/flycal_cli/slot_formatter.rb +10 -6
- data/lib/flycal_cli/version.rb +1 -1
- data/locales/en.json +1 -2
- data/locales/it.json +1 -2
- data/mcp/tools.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91347372adf44296db16d6e06a90a327a2b1dd3709137dc207dc4eadaab3a472
|
|
4
|
+
data.tar.gz: 0ec160527a68a2dee05f466626c28ee8bedd750a05928978a1f77991ae3be779
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b8eaa8bdc8e56fbb6f865d77811e017ab239bd800b8e507bbe3477a4513663335dc74ca9f28b3111eeff38fe37cc5aa010dea81d4339074bd38e9ec2c7cf7f0
|
|
7
|
+
data.tar.gz: faf3a5c3bad9ebf2b966b9ca66f1b924d619496cde86b4c8d1b3246a8af2488a12dc6a5b23cbf2f7be147e1cc09e96ed99b6aa23d7d74ab6e5ce9f2e97ed69b3
|
data/README.md
CHANGED
|
@@ -174,18 +174,20 @@ flycal slots --from 2026-08-01 --in "2 weeks" --duration 1h
|
|
|
174
174
|
**Output:**
|
|
175
175
|
|
|
176
176
|
```
|
|
177
|
-
found
|
|
178
|
-
from
|
|
179
|
-
with duration 45min
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
https://calendar.google.com/calendar/r/day/2026/
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
177
|
+
found 6 slots
|
|
178
|
+
from sat 1 August 2026 to sat 8 August 2026
|
|
179
|
+
with duration 45min, template dinner
|
|
180
|
+
considering calendars
|
|
181
|
+
- incode - antonio
|
|
182
|
+
- Polimi 10110009
|
|
183
|
+
- antoniomolinari1977@gmail.com
|
|
184
|
+
link: https://calendar.google.com/calendar/r/day/2026/8/1
|
|
185
|
+
|
|
186
|
+
saturday 1/8
|
|
187
|
+
19 - 23
|
|
188
|
+
|
|
189
|
+
monday 3/8
|
|
190
|
+
19 - 23
|
|
189
191
|
```
|
|
190
192
|
|
|
191
193
|
If `pbcopy` is available (macOS), the slot list without the header is also copied to the clipboard.
|
data/lib/flycal_cli/cli.rb
CHANGED
|
@@ -507,7 +507,7 @@ module FlycalCli
|
|
|
507
507
|
def copy_slots_to_clipboard(text)
|
|
508
508
|
return unless pbcopy_available?
|
|
509
509
|
|
|
510
|
-
IO.popen("pbcopy", "w") { |io| io.write(text) }
|
|
510
|
+
IO.popen("pbcopy", "w") { |io| io.write(SlotFormatter.strip_ansi(text)) }
|
|
511
511
|
puts ""
|
|
512
512
|
puts Locale.t("slots.copied_to_clipboard")
|
|
513
513
|
rescue StandardError
|
|
@@ -7,16 +7,16 @@ module FlycalCli
|
|
|
7
7
|
lines = []
|
|
8
8
|
lines << Locale.t(
|
|
9
9
|
"slots.header",
|
|
10
|
-
count: count,
|
|
10
|
+
count: underline(count),
|
|
11
11
|
from: underline(Locale.format_long_date(from)),
|
|
12
12
|
to: underline(Locale.format_long_date(to)),
|
|
13
|
-
duration: underline(duration)
|
|
13
|
+
duration: underline(duration),
|
|
14
|
+
template: underline(template.to_s)
|
|
14
15
|
)
|
|
15
|
-
lines << Locale.t("slots.template", name: template) if template && !template.to_s.empty?
|
|
16
16
|
calendars.each do |cal|
|
|
17
|
-
lines << cal[:name]
|
|
17
|
+
lines << "- #{cal[:name]}"
|
|
18
18
|
end
|
|
19
|
-
lines << google_calendar_day_url(from)
|
|
19
|
+
lines << "link: #{google_calendar_day_url(from)}"
|
|
20
20
|
lines.join("\n")
|
|
21
21
|
end
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ module FlycalCli
|
|
|
25
25
|
|
|
26
26
|
slots_by_day.sort_by(&:first).each do |date, slots|
|
|
27
27
|
lines << "" unless lines.empty?
|
|
28
|
-
lines << day_header(date)
|
|
28
|
+
lines << underline(day_header(date))
|
|
29
29
|
slots.each do |start_at, end_at|
|
|
30
30
|
lines << slot_range(start_at, end_at)
|
|
31
31
|
end
|
|
@@ -34,6 +34,10 @@ module FlycalCli
|
|
|
34
34
|
lines.join("\n")
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
def strip_ansi(text)
|
|
38
|
+
text.to_s.gsub(/\e\[[0-9;]*m/, "")
|
|
39
|
+
end
|
|
40
|
+
|
|
37
41
|
private
|
|
38
42
|
|
|
39
43
|
def underline(str)
|
data/lib/flycal_cli/version.rb
CHANGED
data/locales/en.json
CHANGED
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"slots": {
|
|
32
32
|
"no_available": "No available slots found.",
|
|
33
33
|
"no_calendar": "No calendar found. Run 'flycal config' to set a default.",
|
|
34
|
-
"header": "found %{count} slots\nfrom %{from} to %{to}\nwith duration %{duration}\
|
|
35
|
-
"template": "template %{name}",
|
|
34
|
+
"header": "found %{count} slots\nfrom %{from} to %{to}\nwith duration %{duration}, template %{template}\nconsidering calendars",
|
|
36
35
|
"copied_to_clipboard": "✓ Slot list copied to clipboard (pbcopy)"
|
|
37
36
|
},
|
|
38
37
|
"errors": {
|
data/locales/it.json
CHANGED
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"slots": {
|
|
32
32
|
"no_available": "Nessuno slot disponibile.",
|
|
33
33
|
"no_calendar": "Nessun calendario trovato. Esegui 'flycal config' per impostare il predefinito.",
|
|
34
|
-
"header": "trovati %{count} slot\nda %{from} a %{to}\ncon durata %{duration}\
|
|
35
|
-
"template": "template %{name}",
|
|
34
|
+
"header": "trovati %{count} slot\nda %{from} a %{to}\ncon durata %{duration}, template %{template}\nconsiderando i calendari",
|
|
36
35
|
"copied_to_clipboard": "✓ Lista slot copiata negli appunti (pbcopy)"
|
|
37
36
|
},
|
|
38
37
|
"errors": {
|
data/mcp/tools.json
CHANGED
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
},
|
|
275
275
|
"output": {
|
|
276
276
|
"format": "text/plain",
|
|
277
|
-
"example": "found
|
|
277
|
+
"example": "found 6 slots\nfrom sat 1 August 2026 to sat 8 August 2026\nwith duration 45min, template dinner\nconsidering calendars\n- Work\nlink: https://calendar.google.com/calendar/r/day/2026/8/1\n\nsaturday 1/8\n19 - 23"
|
|
278
278
|
},
|
|
279
279
|
"inputSchema": {
|
|
280
280
|
"type": "object",
|