← All procedures
ics.parse
Read the events of an iCalendar text
CLI- Package
- @procedures/ics · README
- Path
["ics","parse"]- CLI
mark ics parse --text <string>- As data
{"$proc":["ics","parse"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/ics/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["ics","parse"], { text: "<text>" });
console.log(JSON.stringify(result));From the command line
$ mark ics parse --text <string>
As data, in a program
{ "$proc": ["ics", "parse"], "input": { "text": "<text>" } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The iCalendar text (BEGIN:VCALENDAR ... END:VCALENDAR)"
}
},
"required": [
"text"
]
},
"output": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uid": {
"type": "string"
},
"summary": {
"type": "string"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"allDay": {
"type": "boolean"
},
"rrule": {
"type": "string"
},
"location": {
"type": "string"
},
"exdates": {
"type": "array",
"items": {
"type": "string"
}
},
"tzid": {
"type": "string"
},
"recurrenceId": {
"type": "string"
},
"sequence": {
"type": "number"
},
"lastModified": {
"type": "string"
}
},
"required": [
"uid",
"summary",
"start",
"end",
"allDay"
],
"additionalProperties": false
}
}
},
"required": [
"events"
],
"additionalProperties": false
}
}