https://github.com/thomastjdev/nimics
ICS-file generator. Create an invite.ics file and attach it to a mail.
https://github.com/thomastjdev/nimics
Last synced: 12 months ago
JSON representation
ICS-file generator. Create an invite.ics file and attach it to a mail.
- Host: GitHub
- URL: https://github.com/thomastjdev/nimics
- Owner: ThomasTJdev
- License: mit
- Created: 2020-11-22T06:22:30.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-02T15:38:43.000Z (almost 5 years ago)
- Last Synced: 2025-01-26T14:48:38.563Z (about 1 year ago)
- Language: Nim
- Size: 6.84 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nimics
ICS-file generator. Create an invite.ics file and specify the content.
## How to
```nim
import nimics
# Create the ICS container
var ics = newIcsFile()
# Specify the details
ics.uid = "IAMUNIQUE"
ics.orgName = "Thomas"
ics.orgMail = "thomas@example.com"
ics.attendees = @["t1:t1@t1.com", "t2:t2@t2.com"]
ics.description = "Let's talk about how awesome Nim is"
ics.summary = "Nim talk"
ics.mstart = initDateTime(01, mDec, 2020, 12, 00, 00).icsDateTimeConvert()
ics.mend = "20201201T133000"
ics.location = "Nim HQ"
# Generate the file
icsGenerate(ics, "myfolder", "invite.ics")
```
## Options
When creating a new invite, you can specify the following options:
```nim
type
IcsFile* = ref object of RootObj
uid*: string # Unique identifier. Used to update event.
prodid*: string # Default=Nim ICS creator
tzid*: string # W. Europe Standard Time, Greenwich Standard Time,
# Default=Greenwich Standard Time
dtstart*: string # Default=16010101T000000
tzoffsetfrom*: string # Default=+0000
tzoffsetto*: string # Default=+0000
orgName*: string # Organizers name
orgMail*: string # Organizers mail
attendees*: seq[string] # Attendees, ["NAME:MAIL", "NAME:MAIL"]
requireResponse*: bool # Require/ask the user to respond with an answer
lang*: string # Default=en-GB
description*: string # Meeting description
summary*: string # Meeting summary
sequence*: int # The meeting number. Used to update event.
mstart*: string # Meeting start
mend*: string # Meeting end
class*: string # Default=PUBLIC
priority*: string # Default=5
dtstamp*: string # Meeting created, Default=Current time
location*: string # Meeting location
trigger*: string # Alarm trigger, default=15M
```
## Update event
To update an event remember to use the same `ics.uid` and inc the `isc.sequence`.