init
This commit is contained in:
commit
f1a7e0dd42
3 changed files with 25 additions and 0 deletions
10
jcal-unfuck.jq
Executable file
10
jcal-unfuck.jq
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/jq -rfc
|
||||
[
|
||||
(
|
||||
.[2][] # skipping calender header and accessing events
|
||||
| [["_type", {}, "text", .[0]], .[1][]] # adding ical type like 'vevent' as ._type property
|
||||
| [.[] | {"key": .[0], "value": .[3]}] | from_entries # transforming event array structure into object structure
|
||||
| pick(._type, .dtstart, .dtend, .summary, .location, .description, .sequence, .["related-to"]) # allow list of properties
|
||||
)
|
||||
]
|
||||
| sort_by(.dtstart|fromdate) # sorting by event start time
|
Loading…
Add table
Add a link
Reference in a new issue