ical 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 52

ical #

Dart package to generate iCalendar files.

https://en.wikipedia.org/wiki/ICalendar

Example #

import 'package:ical/serializer.dart';
import 'dart:io';

main() async {
  ICalendar cal = ICalendar();
  cal.addElement(
    IEvent(
      uid: 'test@example.com',
      start: DateTime(2019, 3, 6),
      url: 'https://pub.dartlang.org/packages/srt_parser',
      status: IEventStatus.CONFIRMED,
      location: 'Heilbronn',
      description:
          'Arman and Adrian released their SRT-file parser library for Dart',
      summary: 'SRT-file Parser Release',
      rrule: IRecurrenceRule(frequency: IRecurrenceFrequency.YEARLY),
    ),
  );
  cal.addElement(
    IEvent(
      alarm: IAlarm.audio(
        duration: Duration(minutes: 3),
        repeat: 1,
        trigger: DateTime(2019, 4, 2, 11),
      ),
      description: 'Lukas releases his iCal-feed serializer',
      summary: 'ical Release',
      start: DateTime(2019, 4, 2, 11, 15),
      end: DateTime(2019, 4, 2, 11, 30),
      uid: 'lukas@himsel.me',
      organizer: IOrganizer(email: 'lukas@himsel.me', name: 'Lukas Himsel'),
      lat: 49.6782872,
      lng: 10.2425528,
    ),
  );

  await HttpServer.bind(InternetAddress.loopbackIPv4, 8080)
    ..listen((HttpRequest request) {
      request.response
        ..headers.contentType = ContentType('text', 'calendar')
        ..write(cal.serialize())
        ..close();
    });
  print('server running http://localhost:8080');
}

Full example in ./example

Implemented Features #

  • [x] Basic Calendar Object
  • [x] Event Element
  • [x] To-Do Element
  • [x] Journal Element
  • [x] Alarm Component
  • [ ] Free/Busy Times
  • [ ] Timezones
  • [ ] Attachements (for Emails, Sound-Alarms, etc.)
  • [x] Recurrence of Elements with RRULE
  • [ ] EXDATE
  • [x] STATUS
  • [ ] ATTENDEE, [ ] CONTACT, [x] ORGANIZER Link

0.1.1 #

  • fix local and utc time

0.1.2 #

  • escape strings and clean up

example/README.md

A web server built using Shelf.

Created from templates made available by Stagehand under a BSD-style license.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ical: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ical/serializer.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
10
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
87
Overall:
Weighted score of the above. [more]
52
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Health issues and suggestions

Document public APIs. (-1 points)

151 out of 151 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
intl ^0.16.0 0.16.1
nanoid ^0.1.0 0.1.0
Transitive dependencies
path 1.7.0
Dev dependencies
pedantic ^1.8.0
test ^1.5.1+1