Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
naimo84 committed Feb 5, 2021
2 parents 17c449a + f94adad commit f42731c
Show file tree
Hide file tree
Showing 20 changed files with 10,154 additions and 2,678 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ko_fi: naimo84
custom: ['https://brave.com/nai412','https://paypal.me/NeumannBenjamin','https://blockchain.info/payment_request?address=3KDjCmXsGFYawmycXRsVwfFbphog117N8P']
custom: ['https://paypal.me/NeumannBenjamin','https://blockchain.info/payment_request?address=3KDjCmXsGFYawmycXRsVwfFbphog117N8P']
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ test/*
*.js.map
src/*
gulpfile.js
examples/*
examples/*.png
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ All notable changes to this project will be documented in this file. See [standa

* issue [#72](https://github.com/naimo84/node-red-contrib-ical-events/issues/72), set calenderName = config.name if not set ([a7ba7b5](https://github.com/naimo84/node-red-contrib-ical-events/commit/a7ba7b535feab034503e8cfecc180e7681048ea7))
* issue [#76](https://github.com/naimo84/node-red-contrib-ical-events/issues/76), trigger cronjob event in past ([bd381cf](https://github.com/naimo84/node-red-contrib-ical-events/commit/bd381cf35799cb083b2aae7d61b6adcce9b62e6d))
## [1.0.0-beta.1](https://github.com/naimo84/node-red-contrib-ical-events/compare/v0.22.0...v1.0.0-beta.1) (2021-01-17)


### Features

* display v1 hint, only when credentials were entered ([ff73c38](https://github.com/naimo84/node-red-contrib-ical-events/commit/ff73c3813a126ca47d389ea740cab61adc764c9f))
* outsourced the whole fetching logic into an external library ([4fed9db](https://github.com/naimo84/node-red-contrib-ical-events/commit/4fed9db0a16c507b4d9bdf9151dd3fd7be78b89d))

### Bug Fixes

* date in past for cronjob ([29c1196](https://github.com/naimo84/node-red-contrib-ical-events/commit/29c1196204b90d277dc1d4135ca05de4a806c56c))

## [0.22.0](https://github.com/naimo84/node-red-contrib-ical-events/compare/v0.21.0...v0.22.0) (2021-01-03)

Expand Down
117 changes: 93 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Node RED ical events

This Node RED module gets the events from an ical-URL or from a caldav-server.
This Node RED module gets the events from an ical-URL, a caldav-server or from iCloud.

> Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways.
**Please Note** that:

* v1+ requires Node.js v10+ and recommends Node-RED v1+

## :question: Get Help

Expand Down Expand Up @@ -58,10 +60,38 @@ npm install /path/to/node-red-contrib-ical-events

### node explanation

#### events
#### trigger

The calendar is checked for new events on input or cronjob. For events in the future within the preview timespan, a separated cronjob is generated. It's fired on the start datetime of the ical event. So, on input or check-cronjob, no output is generated. Only when an event starts.

##### Configuration

- "Check every": how often the calendar is checked for new events
- "Trigger": possible values:

- Always (Filter expression is ignored)
- Match (only events that match the Filter expression are processed)
- No Match (only events that don't match the Filter expression are processed)

- "Filter property": possible values:
- summary
- description
- attendee
- category
- start date
- end date

if filterProperty is set to "start date" or "end date", additonally a filter operator is shown:
filter format for dates is **YYYY-MM-DD_hh:mm:sss**

"Filter operator": possible values:
- between
- before
- after
- "Filter": filter property of the events from above is filtered against this regular expression
- "Offset": offset, when the start/end cronjob will be triggered (seconds, minutes, hours)
- "Name": Displayname

---

#### sensor
Expand All @@ -77,28 +107,47 @@ The calendar is checked for running events on input or configurable timeout.
- Match (only events that match the Filter expression are processed)
- No Match (only events that don't match the Filter expression are processed)

- "Filter": events are filterd against this regular expression
- "Filter property": possible values:
- summary
- description
- attendee
- category
- start date
- end date

if filterProperty is set to "start date" or "end date", additonally a filter operator is shown:
filter format for dates is **YYYY-MM-DD_hh:mm:sss**

"Filter operator": possible values:
- between
- before
- after
- "Filter": filter property of the events from above is filtered against this regular expression
- "Name": Displayname

If an event is running at time of checking, **msg.on** is true, otherwise false.

The message additionaly contains the following values of the calendar entry

- summary
- id
- location
- eventStart
- eventEnd
- description
- summary
- id
- location
- eventStart
- eventEnd
- description
- allDay
- attendee
- isRecurring
- calendarName
- organizer
- categories
- duration

---

#### upcoming

As of the events node, its checked on input or cronjob. The msg.payload contains a list of upcoming events.

---

##### Configuration

- "Check every": how often the calendar is checked for new events
Expand All @@ -108,13 +157,30 @@ As of the events node, its checked on input or cronjob. The msg.payload contains
- Match (only events that match the Filter expression are processed)
- No Match (only events that don't match the Filter expression are processed)

- "Filter": events are filterd against this regular expression
- "Filter property": possible values:
- summary
- description
- attendee
- category
- start date
- end date

if filterProperty is set to "start date" or "end date", additonally a filter operator is shown:
filter format for dates is **YYYY-MM-DD_hh:mm:sss**

"Filter operator": possible values:
- between
- before
- after
- "Filter": filter property of the events from above is filtered against this regular expression
- "Name": Displayname
- "Preview": Only Events within now and this **future** value are checked.
- "Past view": Only Events within now and this **past** value are checked.

### INPUT

The configuration of the nodes baove can be overwritten with the following input message properties:

msg.url
msg.language
msg.replacedates
Expand Down Expand Up @@ -143,15 +209,21 @@ Additional msg properties are:
- msg.htmlTable - a html formated table of upcoming events
- msg.payload - arraylist of upcoming events
- date
- summary
- event
- eventStart
- eventEnd
- description
- id
- allDay
- rule
- location
- summary
- id
- location
- eventStart
- eventEnd
- description
- allDay
- attendee
- isRecurring
- calendarName
- organizer
- categories
- duration

---

Expand All @@ -164,14 +236,11 @@ Additional msg properties are:
- **_Password_** HTTP Basic authentication user
- **_Type_** Type can be ical or caldav

instead of cron-expression, an input node can be used.

![example.png](https://github.com/naimo84/node-red-contrib-ical-events/raw/master/examples/example.png)

## :scroll: Credits

- Thanks to https://github.com/kelektiv/node-cron
- Thanks to https://github.com/jens-maus/node-ical
- The whole module is inspired by ioBroker's adapter https://github.com/iobroker-community-adapters/ioBroker.ical. Many many thanks folks ;)

## :scroll: The MIT License
Expand Down
21 changes: 21 additions & 0 deletions examples/test.ics
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//company.com//node-red-contrib-ical-events//DE
NAME:testcalendar
X-WR-CALNAME:testcalendar
X-WR-CALDESC:desc
TIMEZONE-ID:Europe/Berlin
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
UID:000-o8lmos@domain
SEQUENCE:0
DTSTAMP:20210115T145255Z
DTSTART:20210115T080337Z
DTEND:20210115T090337Z
RRULE:FREQ=DAILY
SUMMARY:My Event
TRANSP:OPAQUE
ORGANIZER;CN="Organizer Name";EMAIL=Organizer Email:mailto:mailto:[email protected]
X-MICROSOFT-CDO-BUSYSTATUS:FREE
END:VEVENT
END:VCALENDAR
36 changes: 25 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,51 @@ var watch = require('gulp-watch');

var paths = {
pages: ['src/*.html'],
assets: ['src/icons/*.png'],
src: 'src',
dist: 'dist'
};

function copyHtml() {
return gulp.src(paths.pages, { base: paths.src })
return gulp.src(paths.pages, { base: paths.src })
.pipe(gulp.dest(paths.dist));
}

gulp.task("copy-html", copyHtml);

gulp.task("copy-assets", function () {
return gulp.src(paths.assets)
.pipe(gulp.dest(paths.dist + "/icons"));
});

gulp.task('develop', function (done) {
var stream = nodemon({
legacyWatch:true,
legacyWatch: true,
exec: 'node --inspect=9229 --preserve-symlinks --experimental-modules --trace-warnings /usr/lib/node_modules/node-red/red.js',
ext: '*.js',
watch: [paths.dist],
ignore: ["*.map"],
done: done,
verbose: true
done: done,
verbose: true,
delay: 2000,
env: { "NO_UPDATE_NOTIFIER": "1" }
});

copyHtml();
tsProject.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.dist));

watch(paths.pages).on('change', () => {
copyHtml();
stream.emit('restart', 10)
});

watch('src/*.ts').on('change', () => {
tsProject.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.dist));

stream.emit('restart', 10)
});

Expand All @@ -52,7 +67,6 @@ gulp.task('develop', function (done) {

gulp.task("default", gulp.series(
gulp.parallel('copy-html'),
gulp.parallel('copy-assets'),
() => {
return tsProject.src()
.pipe(sourcemaps.init())
Expand Down
Loading

0 comments on commit f42731c

Please sign in to comment.