No description
Find a file
2021-04-02 17:37:43 +02:00
src Add suport for UID, SEQUENCE and RSVP 2021-04-02 17:37:30 +02:00
tests Init 2020-11-22 09:34:37 +01:00
.gitignore Init 2020-11-22 09:34:37 +01:00
LICENSE Initial commit 2020-11-22 07:22:31 +01:00
nimics.nimble bump version 2021-04-02 17:37:43 +02:00
README.md Add suport for UID, SEQUENCE and RSVP 2021-04-02 17:37:30 +02:00

nimics

ICS-file generator. Create an invite.ics file and specify the content.

How to

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:

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.