icalPal 1.1.4 → 1.1.6
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 +5 -5
- data/bin/icalPal +3 -3
- data/icalPal.gemspec +1 -1
- data/lib/ToICalPal.rb +1 -1
- data/lib/options.rb +3 -2
- data/lib/rdt.rb +2 -4
- 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: 6703471968f72fe70d6335b8c2a374ecb3416d9b38c267087ac94d1b984a341c
|
4
|
+
data.tar.gz: 5ddc51e615381d6088da72b88cc2b5845c5311923617301cbfa8c76f423eb0c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e587235744a2ebff78e4f539f5db283b1caf2bb087054a49a76de05e5c569c480ceabe4b0f92abf8de84d2162063e7edcceda21212201a3f563d654d0e11e888
|
7
|
+
data.tar.gz: 173dbfb9c76e4fa35553430433458cd994ae004d1f99ab474b21e82f1ceb977033cdcf0c7b4d9c4064bc6e18bf851195af56d00a2d59a6c7148b4f758782b229
|
data/README.md
CHANGED
@@ -69,7 +69,7 @@ Global options:
|
|
69
69
|
--db=DB Use DB file instead of Calendar
|
70
70
|
--cf=FILE Set config file path (default: $HOME/.icalPal)
|
71
71
|
-o, --output=FORMAT Print as FORMAT (default: default)
|
72
|
-
[ansi, csv, default, hash, html, json, md, rdoc, toc, yaml]
|
72
|
+
[ansi, csv, default, hash, html, json, md, rdoc, toc, yaml, remind]
|
73
73
|
|
74
74
|
Including/excluding calendars:
|
75
75
|
|
@@ -132,7 +132,7 @@ Formatting the output:
|
|
132
132
|
--tf=FORMAT Set time format
|
133
133
|
See https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html#method-i-strftime for details
|
134
134
|
|
135
|
-
-b, --
|
135
|
+
-b, --bullet=STRING Use STRING for bullets
|
136
136
|
--nnr=SEPARATOR Set replacement for newlines within notes
|
137
137
|
|
138
138
|
-f Format output using standard ANSI colors
|
@@ -160,8 +160,8 @@ automation, and as a desktop widget for apps like
|
|
160
160
|
[Übersicht](https://tracesof.net/uebersicht/).
|
161
161
|
|
162
162
|
As with many applications, I started to run into some limitations in
|
163
|
-
icalBuddy. The biggest being that active development ended
|
164
|
-
|
163
|
+
icalBuddy. The biggest being that active development ended in 2014.
|
164
|
+
It's only thanks to the efforts of [Jim
|
165
165
|
Lawton](https://github.com/jimlawton) that it even compiles anymore.
|
166
166
|
|
167
167
|
Instead of trying to understand and extend the existing code, I chose
|
@@ -181,7 +181,7 @@ to mimic icalBuddy as much as possible.
|
|
181
181
|
CSV, Hash, JSON, and YAML print all fields for all items in their
|
182
182
|
respective formats. From that you can analyze the results any way you like.
|
183
183
|
|
184
|
-
Remind format uses a minimal implementation built in icalPal.
|
184
|
+
[Remind](https://dianne.skoll.ca/projects/remind/) format uses a minimal implementation built in icalPal.
|
185
185
|
|
186
186
|
Other formats such as ANSI, HTML, Markdown, RDoc, and TOC, use Ruby's
|
187
187
|
[RDoc::Markup](https://ruby-doc.org/stdlib-2.6.10/libdoc/rdoc/rdoc/RDoc/Markup.html)
|
data/bin/icalPal
CHANGED
@@ -17,11 +17,11 @@ require_relative '../lib/options'
|
|
17
17
|
# Load options
|
18
18
|
|
19
19
|
# All kids love log!
|
20
|
-
$log = Logger.new(STDERR, {
|
20
|
+
$log = Logger.new(STDERR, { level: $defaults[:common][:debug] })
|
21
21
|
$log.formatter = proc do |s, t, p, m| # Severity, time, progname, msg
|
22
22
|
($log.level.positive?)? "#{s}: #{m}\n" :
|
23
23
|
"[%-5s] %s [%s] - %s\n" %
|
24
|
-
[ s, t.strftime(
|
24
|
+
[ s, t.strftime('%H:%M:%S.%L'), caller(4, 1)[0].split('/')[-1], m ]
|
25
25
|
end
|
26
26
|
|
27
27
|
$opts = ICalPal::Options.new.parse_options
|
@@ -153,7 +153,7 @@ unless mu
|
|
153
153
|
write_headers: true,
|
154
154
|
}
|
155
155
|
|
156
|
-
CSV.generate(o) { |k| items.each { |i| k << i.values.map { |v| v.to_s } } }
|
156
|
+
CSV.generate(**o) { |k| items.each { |i| k << i.values.map { |v| v.to_s } } }
|
157
157
|
when 'hash' then items.map { |i| i.self }
|
158
158
|
when 'json' then items.map { |i| i.self }.to_json
|
159
159
|
when 'yaml' then items.map { |i| i.self }.to_yaml
|
data/icalPal.gemspec
CHANGED
data/lib/ToICalPal.rb
CHANGED
data/lib/options.rb
CHANGED
@@ -23,7 +23,7 @@ module ICalPal
|
|
23
23
|
@op = OptionParser.new
|
24
24
|
@op.summary_width = 23
|
25
25
|
@op.banner += " [-c] COMMAND"
|
26
|
-
@op.version = '1.1.
|
26
|
+
@op.version = '1.1.6'
|
27
27
|
|
28
28
|
@op.accept(ICalPal::RDT) { |s| ICalPal::RDT.conv(s) }
|
29
29
|
|
@@ -133,7 +133,8 @@ module ICalPal
|
|
133
133
|
'See https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html#method-i-strftime for details')
|
134
134
|
|
135
135
|
@op.separator('')
|
136
|
-
@op.on('-b', '--
|
136
|
+
@op.on('-b', '--bullet=STRING', String, 'Use STRING for bullets')
|
137
|
+
@op.on('--nb', 'Do not use bullets')
|
137
138
|
@op.on('--nnr=SEPARATOR', String, 'Set replacement for newlines within notes')
|
138
139
|
|
139
140
|
@op.separator('')
|
data/lib/rdt.rb
CHANGED
@@ -29,9 +29,7 @@ module ICalPal
|
|
29
29
|
def to_s
|
30
30
|
return strftime($opts[:df]) if $opts[:nrd] && $opts[:df]
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
case Integer(d1 - $today)
|
32
|
+
case Integer(RDT.new(year, month, day) - $today)
|
35
33
|
when -2 then 'day before yesterday'
|
36
34
|
when -1 then 'yesterday'
|
37
35
|
when 0 then 'today'
|
@@ -42,7 +40,7 @@ module ICalPal
|
|
42
40
|
end
|
43
41
|
|
44
42
|
alias inspect to_s
|
45
|
-
|
43
|
+
|
46
44
|
# @see Time.to_a
|
47
45
|
#
|
48
46
|
# @return [Array] Self as an array
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: icalPal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Rosen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|