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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0ee7fffad246d3a457d03eea4af9ace9bb6dfe59a067cc62bf2da08987a72a3
4
- data.tar.gz: c9a5ae5776356185d80f6e87b368b6027122b27daeeb03378f01b6000486b16a
3
+ metadata.gz: 91347372adf44296db16d6e06a90a327a2b1dd3709137dc207dc4eadaab3a472
4
+ data.tar.gz: 0ec160527a68a2dee05f466626c28ee8bedd750a05928978a1f77991ae3be779
5
5
  SHA512:
6
- metadata.gz: dd15a9fc4be4bb6da73354dc17e600fdbcc19701c9e13668cbf504cdc99bd568a4f10a8d429a39e6ca41d9d4cb77a84501843e2c5820c959f1680a64384d1368
7
- data.tar.gz: 708402193736049bc5b1ba476d765326ebf5d92d53eef48d12cb81f62b3d93b2a98db6913de535c8b9fdb26922b03f9b487f8e2192f18beb4037ad6c8cc423b3
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 3 slots
178
- from wed 29 July 2026 to wed 5 August 2026
179
- with duration 45min
180
- for calendars
181
- template work
182
- Incode - Antonio
183
- Personal
184
- https://calendar.google.com/calendar/r/day/2026/7/29
185
-
186
- friday 15/7
187
- 10 - 12
188
- 13 - 15.30
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.
@@ -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].to_s
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlycalCli
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
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}\nfor calendars",
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}\nper i calendari",
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 3 slots\nfrom wed 29 July 2026 to wed 5 August 2026\nwith duration 45min\nfor calendars\ntemplate work\nWork\nhttps://calendar.google.com/calendar/r/day/2026/7/29\n\nfriday 15/7\n10 - 12\n13 - 15.30"
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",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flycal-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - flycal-cli