/OpenBeerApp

Action code for the OpenBeer application on Snips

Primary LanguagePython

OpenBeer App

OpenBeer App is a skill for the vocal assistant Snips about zythology ("beer culture"). It is based on the old data of OpenBeerDB.

You can now ask to your favourite assistant some information about a specific beer (the style, its description, abv, ibu or srm) and then add it to your favourite ! More over, you can ask what type of food will be the best with a beer or, on the other side, ask which style of beer would be perfect with your tonight's meal. It will suggest you in priority the beers that you added into your favourites.

How does this work ?

All the information are provided by OpenBeerData. As the API is currently unavailable, it is based only on the old information (a lot of data are missing). The data are stored in beers.db which is handled with Sqlite. Data are divided in six different tables :

  • beers : id, brewery_id, name, cat_id, style_id, abv, ibu, srm, upc, filepath, descript, last_mod
  • cat : id, cat_name, last_mod
  • styles : id, cat_id, style_name, last_mod
  • food_types : id, type_name, style_id
  • dishes : id, dish_name, food_type_id
  • favourites : beer_id, added_date

All the food suggestions are based on the Beer & Food pairing guide from CraftBeer for now (all styles are not handled yet and there is just a small amount of food types).

Installation

Create an english Snips assistant, and add the OpenBeer App to it (among every other apps that you need).

In order to be able to run it on your assistant, you have to install Sqlite on your device (on a raspPi : sudo apt-get install sqlite).

Sqlite must have the right to write on beers.db and on the directory of the Snips skills (usually located in /var/lib/snips/skills/OpenBeerApp on the Pi).

For any troubles with installation or other platforms, please visit the official Snips documentation.

Usage

Ask for information about a specific beer:
  • "I want information about the Amber beer."
  • "I would like to know some information about the Guinness."
  • "I would like some info about the Mad Bitch, please."
  • "Get info on the Yakima Glory."
Ask your assistant to suggest you a beer:
  • "What beer would be perfect with a risotto?"
  • "I am eating lentils tonight, what do you suggest?"
  • "Could you suggest me something with Rice?"
  • "What can I drink with Artichoke?"
  • "Could you suggest me something to drink with a Raclette?"
Ask for food suggestion:
  • "What can I eat with a Guinness?"
  • "What can I cook with a Belgian Abbey?"
  • "Tell me what to eat with a Coffee-Flavored Beer, please."
  • "Knowing that I have a English-style IPA, what should I eat?"
Ask for the listing of your favourite beers:
  • "Which beers do I have into my favourites ?"
  • "How much beers fo I have into my favourites"
  • "Give me my favourites"
  • "List all my favs"
Remove a beer from your favourites:
  • "Remove the Benchwarmer Porter please"
  • "Delete from my favorites the Moosehead Lager"
  • "Remove the Hocus Pocus from my favourites"
  • "Would you please delete the Big Easy Beer."

Limitations

This app is made for english-speaking assistants. Due to that, Snips is really bad for recognising beer names that are in french or belgian (I still didn't figured out how to ask for information about the Chouffe...).

Otherwise, the database contains other 5800 different beers, even if all of them have been added, a lot of famous ones are still missing. Some beers containing strange characters in their names or some with really similar names might not be understood correctly.

Also, there're just a sample of dishes, feel free to suggest any me that could be add !