icalPal 3.9.1 → 3.9.2
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 +4 -3
- data/bin/icalPal +1 -1
- data/bin/icalpal +1 -1
- data/lib/icalPal.rb +6 -3
- data/lib/options.rb +2 -0
- data/lib/reminder.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 726009d217b28c21e4a35339eef172f033429792b68d4c36157e6234f6221cab
|
4
|
+
data.tar.gz: cf2ee63838a89a8acf25719154d03654e1bbf1fe47459481ddcb5e09f19a31f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7120724aaa3be333484a6feca64cb1cf5b6f5ded5e93b5a4f6c99ec6e247ddd659bcc7c4f3af70b7b3e81dc28b1221bebac88d29c70bc497a89f242689ae088b
|
7
|
+
data.tar.gz: b452c105b9ea954aa9c68a9b7a4088599b32b0b1b29e3f783804ec692eef65e8c7a1d916d3b9061c475ed880b950f9eebf31d870c8eda7751f33e4fd79bc9ae9
|
data/README.md
CHANGED
@@ -280,11 +280,12 @@ to mimic icalBuddy as much as possible.
|
|
280
280
|
|
281
281
|
CSV, Hash, JSON, XML, and YAML print all fields for all items in their
|
282
282
|
respective formats. From that you can analyze the results any way you
|
283
|
-
like.
|
284
|
-
|
285
|
-
[Remind](https://dianne.skoll.ca/projects/remind/) format uses a
|
283
|
+
like. [Remind](https://dianne.skoll.ca/projects/remind/) format uses a
|
286
284
|
minimal implementation built into icalPal.
|
287
285
|
|
286
|
+
Control characters are escaped in these formats to ensure they remain
|
287
|
+
properly formatted.
|
288
|
+
|
288
289
|
Other formats such as ANSI, HTML, Markdown, RDoc, and TOC, use Ruby's
|
289
290
|
[RDoc::Markup](https://ruby-doc.org/stdlib-2.6.10/libdoc/rdoc/rdoc/RDoc/Markup.html)
|
290
291
|
framework to build and render the items.
|
data/bin/icalPal
CHANGED
@@ -290,7 +290,7 @@ unless mu
|
|
290
290
|
when 'remind' then items.map { |i|
|
291
291
|
"REM #{i['sdate'].strftime('%F AT %R')} " +
|
292
292
|
"DURATION #{((i['edate'] - i['sdate']).to_f * 1440).to_i} " +
|
293
|
-
"MSG #{i['title']}"
|
293
|
+
"MSG #{i['title'].gsub(/([[:cntrl:]])/) { |c| c.dump[1..-2] } }"
|
294
294
|
}.join("\n")
|
295
295
|
else abort "No formatter for #{$opts[:output]}"
|
296
296
|
end
|
data/bin/icalpal
CHANGED
@@ -290,7 +290,7 @@ unless mu
|
|
290
290
|
when 'remind' then items.map { |i|
|
291
291
|
"REM #{i['sdate'].strftime('%F AT %R')} " +
|
292
292
|
"DURATION #{((i['edate'] - i['sdate']).to_f * 1440).to_i} " +
|
293
|
-
"MSG #{i['title']}"
|
293
|
+
"MSG #{i['title'].gsub(/([[:cntrl:]])/) { |c| c.dump[1..-2] } }"
|
294
294
|
}.join("\n")
|
295
295
|
else abort "No formatter for #{$opts[:output]}"
|
296
296
|
end
|
data/lib/icalPal.rb
CHANGED
@@ -88,14 +88,17 @@ module ICalPal
|
|
88
88
|
obj['symbolic_color_name'] ||= type[:color]
|
89
89
|
end
|
90
90
|
|
91
|
-
# Create a new CSV::Row with values from +self+.
|
92
|
-
#
|
91
|
+
# Create a new CSV::Row with values from +self+. Control characters
|
92
|
+
# are escaped to ensure they are not interpreted by the terminal.
|
93
93
|
#
|
94
94
|
# @param headers [Array] Key names used as the header row in a CSV::Table
|
95
95
|
# @return [CSV::Row] The +Store+, +Calendar+, +CalendarItem+, or
|
96
96
|
# +Reminder+ as a CSV::Row
|
97
97
|
def to_csv(headers)
|
98
|
-
values = headers.map
|
98
|
+
values = headers.map do |h|
|
99
|
+
(@self[h].respond_to?(:gsub))?
|
100
|
+
@self[h].gsub(/([[:cntrl:]])/) { |c| c.dump[1..-2] } : @self[h]
|
101
|
+
end
|
99
102
|
|
100
103
|
CSV::Row.new(headers, values)
|
101
104
|
end
|
data/lib/options.rb
CHANGED
@@ -337,6 +337,8 @@ module ICalPal
|
|
337
337
|
raise(OptionParser::InvalidArgument, '--li cannot be negative') if opts[:li].negative?
|
338
338
|
raise(OptionParser::InvalidOption, 'Start date must be before end date') if opts[:from] && opts[:from] > opts[:to]
|
339
339
|
raise(OptionParser::MissingArgument, 'No properties to display') if opts[:props].empty?
|
340
|
+
raise(OptionParser::InvalidArgument, 'Cannot use remind output with tasks') if opts[:cmd] == 'tasks' &&
|
341
|
+
opts[:output] == 'remind'
|
340
342
|
|
341
343
|
rescue StandardError => e
|
342
344
|
@op.abort("#{e}\n\n#{@op.help}\n#{e}")
|
data/lib/reminder.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: icalPal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.9.
|
4
|
+
version: 3.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Rosen
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-08-
|
10
|
+
date: 2025-08-23 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: |
|
13
13
|
Inspired by icalBuddy and maintains close compatability. Includes
|