alpha
Login
or
Join now
kwando.tngl.sh
/
gcal
Star
1
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
I calendar parsing
Star
1
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
dont filter extracted properties
author
Hannes Nevalainen
date
17 hours ago
(Jul 26, 2026, 10:41 PM +0200)
commit
2f077b6e
2f077b6e3a151c7d59a36fe88da1b8861ee1dd9a
parent
029a2950
029a29502be752445e202c096f4caae742b570f6
+8
-10
2 changed files
Expand all
Collapse all
Unified
Split
src
gcal.gleam
test
gcal_test.gleam
+1
-10
src/gcal.gleam
View file
Reviewed
···
172
172
let dtstart = extract_prop(props, "DTSTART")
173
173
let dtend = extract_prop(props, "DTEND")
174
174
175
175
-
let raw =
176
176
-
props
177
177
-
|> list.filter(fn(p) {
178
178
-
p.name != "UID"
179
179
-
&& p.name != "SUMMARY"
180
180
-
&& p.name != "DTSTART"
181
181
-
&& p.name != "DTEND"
182
182
-
})
183
183
-
184
184
-
Event(uid, summary, dtstart, dtend, raw)
175
175
+
Event(uid, summary, dtstart, dtend, props)
185
176
}
186
177
187
178
fn build_calendar(components: List(Component)) -> Result(Calendar, Error) {
+7
test/gcal_test.gleam
View file
Reviewed
···
45
45
46
46
assert event.dtstart == "20230101T100000"
47
47
assert event.dtend == "20230101T110000"
48
48
+
49
49
+
let assert Ok(dtstart_prop) =
50
50
+
list.find(event.raw, fn(p: gcal.Property) { p.name == "DTSTART" })
51
51
+
52
52
+
let assert [param] = dtstart_prop.params
53
53
+
assert param.name == "TZID"
54
54
+
assert param.value == "Europe/Stockholm"
48
55
}
49
56
50
57
pub fn parse_property_with_params_in_raw_test() {