koenvervloesem / snips-app-what-is-happening

A Snips app that tells you what is happening today or another day

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is happening app for Snips

Build status Maintainability Test coverage Code quality Python versions GitHub license Languages Snips App Store

Important information: Following the acquisition of Snips by Sonos, the Snips Console is not available anymore after January 31, 2020. As such, I have exported all Snips Console data of this app and made these available in the directory console with the same MIT license as the rest of this project. This project has been archived. If you're searching for an alternative to Snips, I believe that Rhasspy is currently the best choice for an offline open source voice assistant.

With this Snips app, you can ask your voice assistant about today's or any other day's events. This app knows about births and deaths of famous people, holidays, historical events, and so on. The app gets its information from the Linux program calendar, hence it's able to work offline.

Installation

The easiest way to install this app is by adding the Snips app What is happening on this day to your assistant in the Snips Console.

The calendar program is installed by default on Raspbian and many other Linux distributions. If not, you can find it in the package bsdmainutils. Install it with sudo apt install bsdmainutils on a Debian- or Ubuntu-based system.

Configuration

If you want to change the default calendar, you can specify this in the user parameter default_calendar, in Snips Console, by editing the config.ini file of the app manually or by a voice command.

If you want to use a combination of calendars by default, leave the default_calendar parameter in this app empty, and then execute this command:

sudo cp /usr/share/calendar/calendar.all /etc/calendar/

After this, edit the file /etc/calendar/calendar.all to your taste.

I have included an example calendar file with only English-language calendars. To use this file by default, copy it into /etc/calendar/calendar.all:

sudo cp /var/lib/snips/skills/snips-app-what-is-happening/calendar.english-speaking /etc/calendar/calendar.all

The location of the calendar files is specified in the parameter calendar_location, with the default value /usr/share/calendar.

Usage

This app recognizes the following intents:

  • koan:Event - The user asks about today's or any other day's event. The app responds with a random event for this day in the specified calendar or the default calendar.
  • koan:WhatIsDefaultCalendar - The user asks what the default calendar is. The app responds with the name of the default calendar.
  • koan:ChangeDefaultCalendar - The user asks to change the default calendar. The app changes its default calendar to the specified calendar.
  • koan:ResetDefaultCalendar - The user asks to reset the default calendar. The app changes its default calendar to the calendar program's default calendar.
  • koan:ListOfCalendars - The user asks for the list of available calendars. The app responds with the list of calendars it recognizes.

Copyright

This app is provided by Koen Vervloesem as open source software. See LICENSE for more information.

About

A Snips app that tells you what is happening today or another day

License:MIT License


Languages

Language:Python 96.1%Language:Shell 3.9%