icalPal 3.4.0 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a74d33ac1b8d65466f6ef4820813ad983c7bb539438c11d12eb61daaa2af83f
4
- data.tar.gz: 3c2790143a7b5abde6304312099988de264cc767fde30c34dd8b7682a80bd782
3
+ metadata.gz: 1bb41e372eb79335bd81f3a97556bbad22b0542ee994419789f4cae5b577dff5
4
+ data.tar.gz: '080b8d6cab28abc20ec7cdbbd6fa1d028edbb6df4b8b427f23ba8cad0fcbab25'
5
5
  SHA512:
6
- metadata.gz: 031fae41c01699e5eb757dd0f838e702fccd0d65fb3ab1aca3a6dde20083ed5ec43c88a1bc2c43e11e0a77399aea21e860d3f13f7590d90a00f912d3d87bff1b
7
- data.tar.gz: 9e1cfa76f56f735406553d40d13e16ce786461ab331eea9cc0757ffe0858e92ef3c9bae843934f9a55098ec1a28d6e03852aed3ce3bc244a56de362b584de5bd
6
+ metadata.gz: 96c74266454fc2593c2b0a557593ba13736278ecf827c0646d4e3f897bb8db23bd037f0db90d871a4d2bcf661abbc956ccfe32b704a9e27d8fcf458478cc80d1
7
+ data.tar.gz: d4a541f5c44ade8f0a815ca49e6ad582dbd0d60fe2da7c2d5b1cd4f3b3bd0e7b098bec038c77f38d302ff69608d9848453f32fe057a1ec97e7c747117d96fe04
data/README.md CHANGED
@@ -43,9 +43,10 @@ gem install --user-install icalPal
43
43
 
44
44
  ### Compatability with icalBuddy
45
45
 
46
- icalPal tries to be compatible with [icalBuddy](https://github.com/ali-rantakari/icalBuddy) for command-line options
47
- and for output. There are a some important differences to be aware
48
- of.
46
+ icalPal tries to be compatible with
47
+ [icalBuddy](https://github.com/ali-rantakari/icalBuddy) for
48
+ command-line options and for output. There are a some important
49
+ differences to be aware of.
49
50
 
50
51
  * Options require two hyphens, except for single-letter options that require one hyphen
51
52
  * *eventsFrom* is not supported. Instead there is *--from*, *--to*, and *--days*
@@ -59,7 +60,8 @@ of.
59
60
 
60
61
  ```icalPal accounts```
61
62
 
62
- Shows a list of enabled Calendar accounts. Internally they are known as *Stores*; you can run ```icalPal stores``` instead.
63
+ Shows a list of enabled Calendar accounts. Internally they are known
64
+ as *Stores*; you can run ```icalPal stores``` instead.
63
65
 
64
66
  ```icalPal datedTasks```
65
67
 
@@ -79,7 +81,9 @@ Shows only reminders that have a due date.
79
81
  * ```--color``` uses a wider color palette. Calendar colors are what you have chosen in the Calendar app. Not supported in all terminals, but looks great in [iTerm2](https://iterm2.com/).
80
82
  * ```--match``` lets you filter the results of any command to items where a *FIELD* matches a regular expression. Eg., ```--match notes=zoom.us``` to show only Zoom meeetings
81
83
 
82
- Because icalPal is written in Ruby, and not a native Mac application, you can run it just about anywhere. It's been tested with the version of Ruby (2.6.10) included with macOS.
84
+ Because icalPal is written in Ruby, and not a native Mac application,
85
+ you can run it just about anywhere. It's been tested with the version
86
+ of Ruby (2.6.10) included with macOS.
83
87
 
84
88
  ## Usage
85
89
 
@@ -95,6 +99,7 @@ COMMAND must be one of the following:
95
99
  eventsToday Print events occurring today
96
100
  eventsToday+NUM Print events occurring between today and NUM days into the future
97
101
  eventsNow Print events occurring at present time
102
+ eventsRemaining Print events occurring between present time and midnight
98
103
  datedTasks Print tasks with a due date
99
104
  undatedTasks Print tasks with no due date
100
105
  ```
@@ -102,10 +107,12 @@ COMMAND must be one of the following:
102
107
  Global options:
103
108
  ```
104
109
  -c, --cmd=COMMAND Command to run
105
- --db=DB Use DB file instead of Calendar (default: /Users/ajr/Library/Calendars/Calendar.sqlitedb)
110
+ --db=DB Use DB file instead of Calendar
111
+ (default: ["/Users/user/Library/Group Containers/group.com.apple.calendar/Calendar.sqlitedb", "/Users/user/Library/Calendars/Calendar.sqlitedb"]
106
112
  For the tasks commands this should be a directory containing .sqlite files
107
- (default: /Users/ajr/Library/Group Containers/group.com.apple.reminders/Container_v1/Stores)
108
- --cf=FILE Set config file path (default: /Users/ajr/.icalpal)
113
+ (default: /Users/user/Library/Group Containers/group.com.apple.reminders/Container_v1/Stores)
114
+ --cf=FILE Set config file path (default: /Users/user/.icalpal)
115
+ --norc Ignore ICALPAL and ICALPAL_CONFIG environment variables
109
116
  -o, --output=FORMAT Print as FORMAT (default: default)
110
117
  [ansi, csv, default, hash, html, json, md, rdoc, remind, toc, xml, yaml]
111
118
  ```
@@ -209,7 +216,7 @@ Environment variables:
209
216
  ```
210
217
  ICALPAL Additional arguments
211
218
  ICALPAL_CONFIG Additional arguments from a file
212
- (default: /Users/ajr/.icalpal)
219
+ (default: /Users/user/.icalpal)
213
220
 
214
221
  Do not quote or escape values. Options set in ICALPAL override ICALPAL_CONFIG. Options on the command line override ICALPAL.
215
222
  ```
@@ -223,7 +230,8 @@ CSV, Hash, JSON, XML, and YAML print all fields for all items in their
223
230
  respective formats. From that you can analyze the results any way you
224
231
  like.
225
232
 
226
- [Remind](https://dianne.skoll.ca/projects/remind/) format uses a minimal implementation built into icalPal.
233
+ [Remind](https://dianne.skoll.ca/projects/remind/) format uses a
234
+ minimal implementation built into icalPal.
227
235
 
228
236
  Other formats such as ANSI, HTML, Markdown, RDoc, and TOC, use Ruby's
229
237
  [RDoc::Markup](https://ruby-doc.org/stdlib-2.6.10/libdoc/rdoc/rdoc/RDoc/Markup.html)
@@ -232,7 +240,8 @@ framework to build and render the items.
232
240
  Each item to be printed is a new
233
241
  [RDoc::Markup::Document](https://ruby-doc.org/stdlib-2.6.10/libdoc/rdoc/rdoc/RDoc/Markup/Document.html).
234
242
 
235
- When using one of the <em>separate by</em> options, a section header is added first. The section contains:
243
+ When using one of the <em>separate by</em> options, a section header
244
+ is added first. The section contains:
236
245
 
237
246
  * [RDoc::Markup::BlankLine](https://ruby-doc.org/stdlib-2.6.10/libdoc/rdoc/rdoc/RDoc/Markup/BlankLine.html)
238
247
  (unless this is the first section)
@@ -259,9 +268,10 @@ information about the item and property to the default formatter.
259
268
  ## History
260
269
 
261
270
  I used icalBuddy for many years. It's great for scripting,
262
- automation, and as a desktop widget for apps like
263
- [GeekTool](https://www.tynsoe.org/geektool/) and
264
- [Übersicht](https://tracesof.net/uebersicht/).
271
+ automation, and as a widget for apps like
272
+ [Übersicht](https://tracesof.net/uebersicht/),
273
+ [GeekTool](https://www.tynsoe.org/geektool/), and
274
+ [SketchyBar](https://felixkratz.github.io/SketchyBar/).
265
275
 
266
276
  As with many applications, I started to run into some limitations in
267
277
  icalBuddy. The biggest being that active development ended in 2014.
@@ -270,7 +280,7 @@ Lawton](https://github.com/jimlawton) that it even compiles anymore.
270
280
 
271
281
  Instead of trying to understand and extend the existing code, I chose
272
282
  to start anew using my language of choice: Ruby. Using Ruby meant
273
- there is *much* less code; about 1,800 lines vs. 7,000. It also means
283
+ there is *much* less code; less than 2,000 lines vs. 7,000. It also means
274
284
  icalPal is multi-platform.
275
285
 
276
286
  I won't pretend to understand **why** you would want to run this on
data/bin/icalPal CHANGED
@@ -1,27 +1,37 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- begin
4
- require 'logger'
5
-
6
- require 'csv'
7
- require 'json'
8
- require 'rdoc'
9
- require 'sqlite3'
10
- require 'yaml'
11
-
12
- require_relative '../lib/icalpal'
13
- require_relative '../lib/options'
14
- require_relative '../lib/utils'
15
- rescue LoadError => e
16
- dep = e.message[/-- (.*)/, 1]
17
-
18
- $stderr.puts "FATAL: icalpal is missing a dependency: #{dep}"
19
- $stderr.puts
20
- $stderr.puts "Install with 'gem install --user-install #{dep}'"
3
+ # require a gem
4
+ #
5
+ # @param gem [String] The gem
6
+ def r(gem)
7
+ begin
8
+ # puts "require \"#{gem}\""
9
+ require gem
10
+ rescue LoadError => e
11
+ $stderr.puts "FATAL: icalPal is missing a dependency: #{gem}"
12
+ $stderr.puts e
13
+ $stderr.puts
14
+ abort "Try installing with 'gem install --user-install #{gem}'"
15
+ end
16
+ end
21
17
 
22
- exit
18
+ # require_relative a library
19
+ #
20
+ # @param library [String] The library
21
+ def rr(library)
22
+ begin
23
+ # puts "require_relative \"../lib/#{library}\""
24
+ require_relative "../lib/#{library}"
25
+ rescue LoadError => e
26
+ $stderr.puts "FATAL: Could not load library: #{library}"
27
+ $stderr.puts
28
+ abort e.message
29
+ end
23
30
  end
24
31
 
32
+ %w[ logger csv json rdoc sqlite3 yaml ].each { |g| r g }
33
+ %w[ icalPal defaults options utils ].each { |l| rr l }
34
+
25
35
 
26
36
  ##################################################
27
37
  # Load options
data/bin/icalpal CHANGED
@@ -1,27 +1,37 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- begin
4
- require 'logger'
5
-
6
- require 'csv'
7
- require 'json'
8
- require 'rdoc'
9
- require 'sqlite3'
10
- require 'yaml'
11
-
12
- require_relative '../lib/icalpal'
13
- require_relative '../lib/options'
14
- require_relative '../lib/utils'
15
- rescue LoadError => e
16
- dep = e.message[/-- (.*)/, 1]
17
-
18
- $stderr.puts "FATAL: icalpal is missing a dependency: #{dep}"
19
- $stderr.puts
20
- $stderr.puts "Install with 'gem install --user-install #{dep}'"
3
+ # require a gem
4
+ #
5
+ # @param gem [String] The gem
6
+ def r(gem)
7
+ begin
8
+ # puts "require \"#{gem}\""
9
+ require gem
10
+ rescue LoadError => e
11
+ $stderr.puts "FATAL: icalPal is missing a dependency: #{gem}"
12
+ $stderr.puts e
13
+ $stderr.puts
14
+ abort "Try installing with 'gem install --user-install #{gem}'"
15
+ end
16
+ end
21
17
 
22
- exit
18
+ # require_relative a library
19
+ #
20
+ # @param library [String] The library
21
+ def rr(library)
22
+ begin
23
+ # puts "require_relative \"../lib/#{library}\""
24
+ require_relative "../lib/#{library}"
25
+ rescue LoadError => e
26
+ $stderr.puts "FATAL: Could not load library: #{library}"
27
+ $stderr.puts
28
+ abort e.message
29
+ end
23
30
  end
24
31
 
32
+ %w[ logger csv json rdoc sqlite3 yaml ].each { |g| r g }
33
+ %w[ icalPal defaults options utils ].each { |l| rr l }
34
+
25
35
 
26
36
  ##################################################
27
37
  # Load options
data/ext/extconf.rb ADDED
@@ -0,0 +1,47 @@
1
+ begin
2
+ require 'mkmf'
3
+ require 'rubygems/dependency_installer'
4
+
5
+ # Search Gem paths for one that is writable.
6
+ gemdir = nil
7
+ Gem.path.each { |p| gemdir = p if File.writable? p }
8
+
9
+ # Dependencies common to all environments
10
+ dependencies = %w[ plist timezone ]
11
+
12
+ if RUBY_VERSION >= '3.4'
13
+ # bigdecimal is not part of the default gems starting from Ruby 3.4.0.
14
+ # csv is not part of the default gems starting from Ruby 3.4.0.
15
+ dependencies.push('bigdecimal')
16
+ dependencies.push('csv')
17
+
18
+ # The macOS and Homebrew versions of rubygems have incompatible
19
+ # requirements for sqlite3.
20
+ #
21
+ # macOS 15.5 (Sequoia) comes with version 1.3.13, so it does not
22
+ # need to be added as a dependency, and it cannot install anything
23
+ # newer:
24
+ #
25
+ # requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.6.10.
26
+ #
27
+ # Homebrew's Ruby formula does not come with sqlite3, so it does
28
+ # need to be added as a dependency, but it cannot install version
29
+ # 1.3.13:
30
+ #
31
+ # error: call to undeclared function
32
+ #
33
+ # So neither environment can install the other's sqlite3 gem. We
34
+ # must install sqlite3, but iff we are not building with macOS'
35
+ # Ruby installation.
36
+ dependencies.push('sqlite3')
37
+ end
38
+
39
+ di = Gem::DependencyInstaller.new(install_dir: gemdir)
40
+ dependencies.each { |d| di.install(d) }
41
+ rescue Exception => e
42
+ exit(1)
43
+ end
44
+
45
+ File.write("Makefile", "clean:\n\ttrue\ninstall:\n\ttrue")
46
+
47
+ exit(0)
data/icalPal.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = ICalPal::NAME
5
5
  s.version = ICalPal::VERSION
6
6
 
7
- s.summary = 'Command-line tool to query the macOS Calendar'
7
+ s.summary = 'Command-line tool to query the macOS Calendar and Reminders'
8
8
  s.description = <<-EOF
9
9
  Inspired by icalBuddy and maintains close compatability. Includes
10
10
  many additional features for querying, filtering, and formatting.
@@ -20,30 +20,13 @@ EOF
20
20
  'rubygems_mfa_required' => 'true'
21
21
  }
22
22
 
23
- s.files = Dir["#{s.name}.gemspec", 'bin/*', 'lib/*.rb']
23
+ s.files = Dir["#{s.name}.gemspec", 'bin/*', 'ext/*.rb', 'lib/*.rb']
24
24
  s.executables = [ "#{s.name}" ]
25
25
  s.extra_rdoc_files = [ 'README.md' ]
26
26
 
27
- # The macOS and Homebrew versions of rubygems have incompatible
28
- # requirements for sqlite3.
29
- #
30
- # macOS comes with version 1.3.13, so it does not need to be added
31
- # as a dependency, but it cannot install anything newer:
32
- #
33
- # requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.6.10.
34
- #
35
- # Homebrew's Ruby formula does not come with sqlite3, so it does
36
- # need to be added as a dependency, but it cannot install version
37
- # 1.3.13:
38
- #
39
- # error: call to undeclared function
40
- #
41
- # So we must call add_dependency, but iff we are not building with
42
- # macOS' Ruby installation.
43
-
44
- s.add_dependency 'nokogiri-plist', '~> 0.5.0'
45
- s.add_dependency 'sqlite3', '~> 2.6.0' unless s.rubygems_version == `/usr/bin/gem --version`.strip
46
- s.add_dependency 'timezone', '>= 0.99', '~> 1.3.0'
27
+ # Some installation settings cannot be handled at build time.
28
+ # Handle everything at installation time.
29
+ s.extensions << 'ext/extconf.rb'
47
30
 
48
31
  s.bindir = 'bin'
49
32
  s.required_ruby_version = '>= 2.6.0'
data/lib/defaults.rb CHANGED
@@ -27,6 +27,7 @@ $defaults = {
27
27
  is: [],
28
28
  it: [],
29
29
  li: 0,
30
+ norc: false,
30
31
  output: 'default',
31
32
  ps: [ "\n " ],
32
33
  r: false,
@@ -38,32 +39,38 @@ $defaults = {
38
39
  sp: false,
39
40
  tf: '%-I:%M %p',
40
41
  },
42
+
41
43
  tasks: {
42
44
  dated: 0,
43
45
  db: [ ICalPal::Reminder::DB_PATH ],
44
46
  iep: %w[ title notes due priority ],
45
47
  sort: 'prio',
46
48
  },
49
+
47
50
  undatedTasks: {
48
51
  dated: 1,
49
52
  db: [ ICalPal::Reminder::DB_PATH ],
50
53
  iep: %w[ title notes due priority ],
51
54
  sort: 'prio',
52
55
  },
56
+
53
57
  datedTasks: {
54
58
  dated: 2,
55
59
  db: [ ICalPal::Reminder::DB_PATH ],
56
60
  iep: %w[ title notes due priority ],
57
61
  sort: 'prio',
58
62
  },
63
+
59
64
  stores: {
60
65
  iep: %w[ account type ],
61
66
  sort: 'account',
62
67
  },
68
+
63
69
  calendars: {
64
70
  iep: %w[ calendar type UUID ],
65
71
  sort: 'calendar',
66
72
  },
73
+
67
74
  events: {
68
75
  days: nil,
69
76
  ea: false,
data/lib/event.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'timezone'
1
+ r 'timezone'
2
2
 
3
3
  module ICalPal
4
4
  # Class representing items from the <tt>CalendarItem</tt> table
@@ -13,8 +13,8 @@ module ICalPal
13
13
  def []=(k, v)
14
14
  @self[k] = v
15
15
 
16
- @self['sctime'] = Time.at(@self['sdate'].to_i, in: 'UTC') if k == 'sdate'
17
- @self['ectime'] = Time.at(@self['edate'].to_i, in: 'UTC') if k == 'edate'
16
+ @self['sctime'] = Time.at(@self['sdate'].to_i, in: '+00:00') if k == 'sdate'
17
+ @self['ectime'] = Time.at(@self['edate'].to_i, in: '+00:00') if k == 'edate'
18
18
  end
19
19
 
20
20
  # Standard accessor with special handling for +age+,
@@ -96,7 +96,7 @@ module ICalPal
96
96
  begin
97
97
  zone = Timezone.fetch(obj['start_tz'])
98
98
  rescue Timezone::Error::InvalidZone
99
- zone = 'UTC'
99
+ zone = '+00:00'
100
100
  end
101
101
 
102
102
  ctime = obj[k] + ITIME
@@ -177,10 +177,10 @@ module ICalPal
177
177
  skip = false
178
178
 
179
179
  changes[1..].each do |change|
180
- cdate = Time.at(change['start_date'] + ITIME).to_a[3..5].reverse
180
+ codate = Time.at(change['orig_date'] + ITIME).to_a[3..5].reverse
181
181
  odate = occurrence['sdate'].ymd
182
182
 
183
- skip = true if cdate == odate
183
+ skip = true if codate == odate
184
184
  end
185
185
 
186
186
  events.push(clone(occurrence)) if in_window?(occurrence['sdate'], occurrence['edate']) && !skip
data/lib/icalPal.rb CHANGED
@@ -1,10 +1,4 @@
1
- require_relative 'EventKit'
2
- require_relative 'ToICalPal'
3
- require_relative 'calendar'
4
- require_relative 'event'
5
- require_relative 'rdt'
6
- require_relative 'reminder'
7
- require_relative 'store'
1
+ %w[ EventKit ToICalPal calendar event rdt reminder store ].each { |l| rr l }
8
2
 
9
3
  # Encapsulate the _Store_ (accounts), _Calendar_ and _CalendarItem_
10
4
  # tables of a Calendar database, and the _Reminder_ table of a
data/lib/options.rb CHANGED
@@ -1,8 +1,7 @@
1
1
  # rubocop: disable Style/FormatString, Style/FormatStringToken
2
2
 
3
- require 'optparse'
3
+ autoload(:OptionParser, 'optparse')
4
4
 
5
- require_relative 'defaults'
6
5
  require_relative 'version'
7
6
 
8
7
  module ICalPal
@@ -43,6 +42,7 @@ module ICalPal
43
42
  @op.on('%s%s %sPrint events occurring today' % pad('eventsToday'))
44
43
  @op.on('%s%s %sPrint events occurring between today and NUM days into the future' % pad('eventsToday+NUM'))
45
44
  @op.on('%s%s %sPrint events occurring at present time' % pad('eventsNow'))
45
+ @op.on('%s%s %sPrint events occurring between present time and midnight' % pad('eventsRemaining'))
46
46
  @op.on('%s%s %sPrint tasks with a due date' % pad('datedTasks'))
47
47
  @op.on('%s%s %sPrint tasks with no due date' % pad('undatedTasks'))
48
48
 
@@ -55,6 +55,7 @@ module ICalPal
55
55
  'For the tasks commands this should be a directory containing .sqlite files',
56
56
  "(default: #{$defaults[:tasks][:db]})")
57
57
  @op.on('--cf=FILE', "Set config file path (default: #{$defaults[:common][:cf]})")
58
+ @op.on('--norc', 'Ignore ICALPAL and ICALPAL_CONFIG environment variables')
58
59
  @op.on('-o', '--output=FORMAT', OUTFORMATS,
59
60
  "Print as FORMAT (default: #{$defaults[:common][:output]})", "[#{OUTFORMATS.join(', ')}]")
60
61
 
@@ -211,7 +212,7 @@ module ICalPal
211
212
  end
212
213
 
213
214
  @op.parse!(o, into: env)
214
- end if ENV['ICALPAL']
215
+ end if ENV['ICALPAL'] && !cli[:norc]
215
216
 
216
217
  # Configuration file needs special parsing for the same reason
217
218
  begin
@@ -230,7 +231,7 @@ module ICalPal
230
231
 
231
232
  @op.parse!(o, into: cf)
232
233
  rescue StandardError
233
- end
234
+ end unless cli[:norc]
234
235
 
235
236
  cli[:cmd] ||= @op.default_argv[0]
236
237
  cli[:cmd] ||= env[:cmd] if env[:cmd]
@@ -238,12 +239,17 @@ module ICalPal
238
239
  cli[:cmd] = 'stores' if cli[:cmd] == 'accounts'
239
240
 
240
241
  # Parse eventsNow and eventsToday commands
241
- cli[:cmd].match('events(Now|Today)(\+[0-9]+)?') do |m|
242
+ cli[:cmd].match('events(Now|Today|Remaining)(\+[0-9]+)?') do |m|
242
243
  cli[:now] = true if m[1] == 'Now'
243
- cli[:days] = (m[1] == 'Today')? m[2].to_i + 1 : 1
244
+ cli[:days] = (m[1] == 'Today')? m[2].to_i : 1
245
+
246
+ if m[1] == 'Remaining'
247
+ cli[:n] = true
248
+ cli[:days] = 0
249
+ end
244
250
 
245
251
  cli[:from] = $today
246
- cli[:to] = $today + cli[:days]
252
+ cli[:to] = $today + cli[:days] if cli[:days]
247
253
  cli[:days] = Integer(cli[:to] - cli[:from])
248
254
 
249
255
  cli[:cmd] = 'events'
@@ -320,7 +326,7 @@ module ICalPal
320
326
  end
321
327
 
322
328
  # Commands that can be run
323
- COMMANDS = %w[events eventsToday eventsNow tasks datedTasks undatedTasks calendars accounts stores].freeze
329
+ COMMANDS = %w[events eventsToday eventsNow eventsRemaining tasks datedTasks undatedTasks calendars accounts stores].freeze
324
330
 
325
331
  # Supported output formats
326
332
  OUTFORMATS = %w[ansi csv default hash html json md rdoc remind toc xml yaml].freeze
@@ -330,7 +336,9 @@ module ICalPal
330
336
  # Pad non-options to align with options
331
337
  #
332
338
  # @param t [String] Text on the left side
333
- # @return [String] Text indented by summary_indent, and padded according to summary_width
339
+ #
340
+ # @return [Array<String>] Array containing +summary_indent+, +t+,
341
+ # a number of spaces equal to (+summary_width+ - +t.length+)
334
342
  def pad(t)
335
343
  [ @op.summary_indent, t, ' ' * (@op.summary_width - t.length) ]
336
344
  end
data/lib/reminder.rb CHANGED
@@ -1,5 +1,5 @@
1
- require 'open3'
2
- require 'nokogiri-plist'
1
+ r 'open3'
2
+ r 'plist'
3
3
 
4
4
  module ICalPal
5
5
  # Class representing items from the <tt>Reminders</tt> database
@@ -57,7 +57,7 @@ module ICalPal
57
57
  stdin.close
58
58
 
59
59
  # Read output
60
- plist = Nokogiri::PList(stdout.read)['$objects']
60
+ plist = Plist.parse_xml(stdout.read)['$objects']
61
61
 
62
62
  @self['color'] = plist[3]
63
63
  @self['symbolic_color_name'] = (plist[2] == 'custom')? plist[4] : plist[2]
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module ICalPal
2
2
  NAME = 'icalPal'.freeze
3
- VERSION = '3.4.0'.freeze
3
+ VERSION = '3.6.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,75 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icalPal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Rosen
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-08 00:00:00.000000000 Z
11
- dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: nokogiri-plist
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: 0.5.0
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: 0.5.0
26
- - !ruby/object:Gem::Dependency
27
- name: sqlite3
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: 2.6.0
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: 2.6.0
40
- - !ruby/object:Gem::Dependency
41
- name: timezone
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '0.99'
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: 1.3.0
50
- type: :runtime
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: '0.99'
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: 1.3.0
10
+ date: 2025-05-18 00:00:00.000000000 Z
11
+ dependencies: []
60
12
  description: |
61
13
  Inspired by icalBuddy and maintains close compatability. Includes
62
14
  many additional features for querying, filtering, and formatting.
63
15
  email: ajr@corp.mlfs.org
64
16
  executables:
65
17
  - icalPal
66
- extensions: []
18
+ extensions:
19
+ - ext/extconf.rb
67
20
  extra_rdoc_files:
68
21
  - README.md
69
22
  files:
70
23
  - README.md
71
24
  - bin/icalPal
72
25
  - bin/icalpal
26
+ - ext/extconf.rb
73
27
  - icalPal.gemspec
74
28
  - lib/EventKit.rb
75
29
  - lib/ToICalPal.rb
@@ -110,6 +64,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
64
  requirements: []
111
65
  rubygems_version: 3.6.6
112
66
  specification_version: 4
113
- summary: Command-line tool to query the macOS Calendar
67
+ summary: Command-line tool to query the macOS Calendar and Reminders
114
68
  test_files: []
115
69
  ...