rikai / Showbot

🤖 An omnipresent multi-platform bot who's goal in life is become Skynet 🤖
MIT License
40 stars 18 forks source link

Fix schedule.rb #11

Closed cbojar closed 9 years ago

cbojar commented 9 years ago

Replace iCal feed with Google Calendar API.

cbojar commented 9 years ago

This should resolve #4.

cbojar commented 9 years ago

Fixed some stuff in the first commit, and then changed the whole thing to use an API key rather than a service account.

rikai commented 9 years ago

So. I've run across another bug with schedule.rb.

Example: Currently Tech Talk Today is listed as Tech Talk Today in the shows.json. It is however listed as Tech Talk on the google calendar. If you do !next Tech Talk Today, !next Tech Talk or !next TTT, none of them return a result, saying instead that there is no Tech Talk scheduled on the calendar. I'm not sure if it's also related since it DOES seem to be matching, but !next TechSNAP also returns no results. So it seems the matching isn't fuzzy enough, and if there isn't a perfect match, it assumes nothing is scheduled, which is definitely not desired functionality.

cbojar commented 9 years ago

The reason for it not finding a TechSNAP is that the calendar only pulls in data for the next seven days, and right now there is not a live TechSNAP scheduled in the next seven days because of the holiday. Added a PR #13 to note this and to fix a few other problems.

The problem with TTT seems to be that the matches are indeed not fuzzy enough, which is probably a problem in lib/models/shows.rb.