calview 2.0.0 → 2.0.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 +4 -4
- data/bin/calview.rb +10 -5
- 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: c593e00e6e69942ca929719892ef94b5b391952fad5aa228443ca8419c774ea4
|
4
|
+
data.tar.gz: 0e5dedbbe3470498b69a7f40c0d32abe50056b75e42c0b4f26ee2df4fc5d0a0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69e3dc27dcfe6bf26700d6a4ac51fc11e49ea1e367758d0beaa2acbce4cdb4c2b5ee283d1d2ace278f7e1d140ef8f003420d0a8c11281c16b5f8955f28e9a5af
|
7
|
+
data.tar.gz: 224b275173003561e4dacb4f7ab325b4838bc9d134e2a07115d6c00bd624f1ea686615ef8793736c614b0175b5f2d6da03f8bd6b943322179aab3554946139b1
|
data/bin/calview.rb
CHANGED
@@ -15,12 +15,12 @@ class VcalParser
|
|
15
15
|
# Precompile all regex patterns for better performance
|
16
16
|
PATTERNS = {
|
17
17
|
multiline_attendee: /(^ATTENDEE.*)\n^ (.*)/,
|
18
|
-
dtstart_tzid: /^DTSTART;TZID=(.*?):(.*?)(?:T(\d{
|
19
|
-
dtend_tzid: /^DTEND;TZID=(.*?):(.*?)(?:T(\d{
|
18
|
+
dtstart_tzid: /^DTSTART;TZID=(.*?):(.*?)(?:T(\d{6}))?$/,
|
19
|
+
dtend_tzid: /^DTEND;TZID=(.*?):(.*?)(?:T(\d{6}))?$/,
|
20
20
|
dtstart_date: /^DTSTART;VALUE=DATE:(.*)$/,
|
21
21
|
dtend_date: /^DTEND;VALUE=DATE:(.*)$/,
|
22
|
-
dtstart_utc: /^DTSTART:(.*?)(?:T(\d{
|
23
|
-
dtend_utc: /^DTEND:(.*?)(?:T(\d{
|
22
|
+
dtstart_utc: /^DTSTART:(.*?)(?:T(\d{6}))?$/,
|
23
|
+
dtend_utc: /^DTEND:(.*?)(?:T(\d{6}))?$/,
|
24
24
|
organizer_cn: /^ORGANIZER;CN=(.*)$/,
|
25
25
|
organizer: /^ORGANIZER:(.*)$/,
|
26
26
|
attendee: /^ATTENDEE.*CN=([\s\S]*?@.*)\n/,
|
@@ -284,6 +284,7 @@ class VcalParser
|
|
284
284
|
def extract_time(time_str)
|
285
285
|
return nil unless time_str
|
286
286
|
# Direct string manipulation is faster than regex for fixed format
|
287
|
+
# Handle both 4-digit (HHMM) and 6-digit (HHMMSS) formats
|
287
288
|
"#{time_str[0,2]}:#{time_str[2,2]}"
|
288
289
|
end
|
289
290
|
|
@@ -388,7 +389,11 @@ class VcalParser
|
|
388
389
|
end
|
389
390
|
|
390
391
|
def parse_recurrence
|
391
|
-
|
392
|
+
# Only look for RRULE within the VEVENT section
|
393
|
+
vevent_section = @vcal[/BEGIN:VEVENT.*?END:VEVENT/m]
|
394
|
+
return unless vevent_section
|
395
|
+
|
396
|
+
match = vevent_section.match(PATTERNS[:rrule])
|
392
397
|
@event[:recurrence] = parse_rrule(match[1]) if match
|
393
398
|
end
|
394
399
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|