Hey everyone, wrote this skill for managing a Nextcloud calendar. I’ve been using it for managing my family calendars. It’s doing pretty well, though I wouldn’t say it’s really been put through it’s paces. Other’s input/experience would be great to help it apply more generally for other people! One biggest issue is that the current installation process requires a few sections of code to be modified and run before it will work with your Nextcloud account. I haven’t found a good way to make use of the home.mycroft.ai/skills configuration parameters for these specific settings.
To be more specific, your Nextcloud server URL, username, and password are all able to be setup from your homepage. But there are two dictionaries defined in
__init__.py that map colloquial names to calendar names and vice versa. This allows you to say things like “add an event to my calendar”, and the event will be added to the
personal calendar in Nextcloud. Similarly, when Mycroft if confirming an addition to the
personal calendar, it knows to say “adding ____ to your calendar.”
Additionally, because of the issue with .optionally() and regex, I had to write my own parser to extract calendar names and starting/ending datetimes, so Mycroft knows which calendar you want to manage, and can convert “how busy am I this weekend?” into upcoming saturday morning, through sunday night. But users will need to change a few lines in
peg/calendarGrammar.ebnf and will need to run
./generateModel.sh so that
calendarGrammar.py is regenerated according to their desired grammar. Any tips on how to make this configuration much easier for users would be super appriciated!
How to install SKILL NAME
Install Nextcloud Calendar by …
- Fork my repo: https://github.com/markditsworth/mycroft-nextcloud-calendar
- clone your fork locally.
- Edit the two dictionaries in
- Edit the
tatsulocally (venv recommeded):
pip install tatsu
- While in
- In your mycroft environment ( I run a Picroft), install the skill with
mycroft-msm install https://github.com/your_account/your_forked_repo.git
- installation of
caldavhas been known to fail/timeout, but was has always been successful manually:
mycroft-pip install caldav; mycroft-pip install tatsuand then rerun the skill install.
- Go to your skills in home.mycroft.ai, and enter your Nextcloud server URL, username, and password.
Nextcloud Calendar connects to the Nextcloud server you provide each time you ask Mycroft to add/list events.
How to test SKILL NAME
- Install the skill per the above instructions.
- Configure the Skill Settings in home.mycroft.ai
Add an event to my calendar tomorrow at 2pm
- Mycroft should ask for the duration of the event, the name of the event, confirmation of event details, and assert that your calendar has been updated.
- Check your calendar for the created event.
Tell me my events tomorrow.
- Mycroft should respond with “<event name> <tomorrow’s weekday> <month> <day> from <start time> to <end time>” for every event on you calendar tomorrow.
Skill passes if it correctly adds an event to your specified calendar at the specified time. Passes if it correctly lists all events on your calendar that occur within your specified time range (out to 2 weeks — if it is sunday and you say “how busy am I next week”, Mycroft will list your events starting on next sunday through next saturday).
Feedback is welcome here, on Mycroft Chat, or through the Issues on my github repo (github is preferred).