grec_minimal 0.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new50

grec_minimal Build Status

A minimal parser/generator of Google Calendar recurrence rule for dart.

Synopsis

Parse recurrence rule text(s)

import 'package:grec_minimal/grec_minimal.dart';

void main() {
  final List<String> recurrenceRuleTexts = [
    'RRULE:FREQ=DAILY',
    // put recurrence rule texts
  ];

  List<RecurrenceRule> rules;
  try {
    rules = GrecMinimal.fromTexts(recurrenceRuleTexts);
  } catch (ex) {
    // There is possibility to occur InvalidSyntaxException and/or ConditionalException
    // do something
    rethrow;
  }

  rules.forEach((rule) {
    // do something
    print(rule.asRuleText());
  });
}

Dump recurrence rule text(s) from rule object(s)

import 'package:grec_minimal/grec_minimal.dart';

void main() {
  final List<String> ruleTexts = GrecMinimal.toTexts([
    new RecurrenceRule(Frequency.DAILY, 123, null, 2, null),
    // put recurrence rule object as you like
  ]);

  ruleTexts.forEach((ruleText) {
    // do something
    print(ruleText);
  });
}

See also: example/

Description

grec_minimal is a simple parser/generator of recurrence rule for Google Calendar.

This library provides two funnctions:

  • A parsing function of recurrence rule text(s) that is generated by Google Calendar. It outputs recurrence rule object(s) according to give text(s).
  • A generating function of recurrence rule text(s) from give rule object(s).

i.e. This library is an implementation of a subset of RFC 5545.

Disclaimer

This is not a full implementation of RFC 5545. This library is focused on using Google Calendar. It means some features are not supported (e.g. SECONDLY, MINUTELY).

So if you need full implementation of RFC 5545, please consider other libraries.

License

The MIT License (MIT)
Copyright © 2018 moznion, http://moznion.net/ <moznion@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0.0.2

  • Improve performance

0.0.1

  • Initial version

Use this package as a library

1. Depend on it

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


dependencies:
  grec_minimal: "^0.0.2"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


      import 'package:grec_minimal/grec_minimal.dart';
  
Version Uploaded Documentation Archive
0.0.2 Jun 11, 2018 Go to the documentation of grec_minimal 0.0.2 Download grec_minimal 0.0.2 archive
0.0.1 Jun 10, 2018 Go to the documentation of grec_minimal 0.0.1 Download grec_minimal 0.0.1 archive

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:grec_minimal/grec_minimal.dart.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use grec_minimal.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.52.0 <2.0.0
Dev dependencies
test ^0.12.30