Git Product home page Git Product logo

boyd_bot_messenger's People

Contributors

dependabot[bot] avatar ineshbose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

boyd_bot_messenger's Issues

Database Modularity

The class Database implemented in services.py isn't as modular as it's intended to be.
As of release 1.10.0, this project uses pymongo which is a NoSQL DB that easily stores dictionary / key-values in the database.
However, there may be difficulties to alter the class for say, redis. Therefore, the class needs refactoring.

Each tuple has 3 attributes - _id (primary key), uni_id and uni_pw. However, in-registration users will rather have _id and reg_id.

Provide Locations for Classes

The bot should be able to provide a map, directions or link when a user asks for a specific location on campus. For example,

"Where is my next Psychology lecture?"
"Where is the Boyd Orr building?"

The locations can be found using event["location"] in timetable.py (that is if "location" in event else return "No Location Found"). A raw link would be a little shabby, so an embedded map in the chat-bubble is preferred but this is not supported by all platforms.

Google Maps is the preferred service for locations. Some universities also use a custom map (by Google Maps) for their campus (eg https://www.gla.ac.uk/explore/maps/).

Limit User Login Per Day

While developing the scheduler for v1.12.0, I discovered that cal_url (atleast Glasgow) limits requests to approx 250 a day (I hit 288) and therefore I was blocked for a 24 hour period.

The app has been ignoring the limit and needs to consider this using _config.py.
Timetable.login() is the only bit that deals with GET requests with cal_url.

Implement as Django app

Going to an initial idea of implementing the application in Django.
This would also change data to an SQL database.
_config.py can be adjusted using settings.py, and the app can then be distributed as an independent Django app (may also require setup.py).

Uni-Truths Integration

Universities often have confession pages which makes university life much more interesting and fun. Uni-Truths is a platform many universities use for this system. Having a bot submit a confession when told something like

"I wanna confess that I once took a piss and threw up at the same time in the GUU toilets. That takes skill"
"Post on GlasKnow / confession page - I miss my library crush"

However, due to chatlogs, etc, these confessions won't be TRULY anonymous.

If a university doesn't use this, they can toggle this off.

(Examples above may or may not be true.)

Read Next Intent Improvements

Currently, reading the next class is pretty limited.

In an earlier version, read_next was a separate intent, but now is integrated with read_timetable. It is called when there is no time found when parsing text.

However, the bot just reads the next class from the same day.
A user may require their next class, be it next week.
Another example could be "my next Java Programming class".

One Time Use Support

Enable users to use the bot and not have their University ID & Password stored in the database, but to fetch the calendar once.

This will require a BooleanField in RegisterForm with label "Remember me" (default=True) and just store their sender ID in the database for getting to the gateway.

However, this feature may be unstable since the once-fetched calendar may get lost (a small chance).

Documentation & README.md

The documentation for this project is done through MkDocs.
The content in docs/app.md needs to be same as README.md (be the same file basically).
Possible solution: symlink

Build Tests (and possibly Demo)

Create tests for the app that should pass before deployment / commit using test user/data, parsing sample phrases and returning desired output (like timetable).

Installation Error for rapidfuzz

This issue is for Release 1.10.0 where fuzzywuzzy is replaced by rapidfuzz for its MIT License and better performance.
The package, however, may have installation problems for users (mostly Windows). While there's no proper solution for this yet, rapidfuzz recommends to install as listed in their documentation.

Implement Discord Bot

Create a version that works on Discord instead of Facebook Messenger.
This would be a branch on the same repo and the goal would be to produce minimum diff.

Book Rooms through the Bot

Universities offer rooms around the campus for students that need one for say, a meeting. The bot should be able to book or provide information about rooms when told

"Book a room in the library for 24 November 2pm"
"Which rooms are available?"

This feature may be really difficult to implement since most universities have different room-booking systems. Webscraping (using selenium) is an option (a bad one).

Background Scheduler

The bot should message all users (that have the preference) every morning, or possibly before every class with information about the day. For example,

At 8AM:
"""
Good morning {{ name }}! Today you have..
``{{ classes }}`
"""

or before a class:
"""
Hey {{ name }}, I hope you're headed for your {{ class_name }} at {{ class_time }} in {{ class_location }}.
"""

Feature will possibly require threading.

Contexts / Cross Questions

When a single class is presented to a user, that should also become the context of a conversation. For example,

User: What do I have next?
Bot: You have Psychology from 9AM to 10AM at Boyd Orr Building.
User: Where is it?
Bot: {{ location of class }}

Contexts, however, are not supported by all services (like wit).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.