icalPal 1.1.4 → 1.1.5
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 +3 -3
- data/bin/icalPal +2 -2
- 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: d82c766cc60d3f3948fe128bfb0649085da7e3f69c555f9b887ca06147dcba3b
|
4
|
+
data.tar.gz: b812180b65bffd342393a94553b076e51aa9a04a2359004c56e8e7d62db61d7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475339980a6262307c89e9ef4f086a642cd80508644533b25c94146e001eaffb3819d6fc2f919355b7347ed2eb267dad9a91b0352bdf298f9e94c1560247d824
|
7
|
+
data.tar.gz: da57c32c4a1377cb85d62bfec2bba0d517ae6203badecc37408d1172d6b301ac9cf37b7f82e839e824a01a57c032d21299bda9be8ee383ceefef7e68613c670f
|
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
|
@@ -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
|
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.5'
|
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.5
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|