Giter Site home page Giter Site logo

bobheadxi / calories Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 3.0 2.26 MB

:poultry_leg: a Facebook Messenger bot in Golang for all your calorie-tracking needs

License: MIT License

Go 92.88% Makefile 1.13% Shell 6.00%
facebook-messenger-bot go heroku

calories's Introduction

calories's People

Contributors

ayamakh avatar bobheadxi avatar bwdmonkey avatar zhulia96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

calories's Issues

Update documentation wording

change:

// function : Does this, this, that

to:

// function does this, this, that

in accordance with standard godoc practices (oops)

Rest API for database?

So we can see the contents of our database tables without doing that janky command line stuff

Can use heroku pg:psql, don't really need this endpoint (yet)

Add new fields in Users table, model, and insertion

  • timezone : signed integer value relative to GMT, e.g. "-7"
  • name: some string, e.g. "Robert"

Todo:

  • Add new fields to database
  • Add new fields to models.go
  • Add new fields to User insertion
  • Add new fields to User retrieval

Questions and Responses ("conversations")

QuickReply is one option, but need a way to track more complicated responses, ie:

user: I ate cookies today
calories: How many cookies?
user: 3
// make use of response "3" within the context of "I ate cookies today"

And update our API and Handlers to allow for this.

Likely have to implement some sort of "state management", possibly in memory but maybe in database would be better - should ideally take into account:

  • state build-up (e.g. calories asking a lot of questions and getting few responses could bog down responses and memory)
  • effective context tracking (e.g. in above example), possibly with the context struct already available in package bot (expand on functionality of that struct if needed)

Daily archive

Reset daily calorie count based on user timezone (possibly at same time the summaries are sent out) and pipe data into a new activity_archive table

Possibly also include functions for pulling from archive and making this data upon request from the user

Migrate to Dep

dep is on track to replace Glide as the de-facto dependency manager for Go

Better command recognition

e.g. when I say:

Hey Calories! I ate a cookie today.

should recognize that this is a command for eat which is passed to a handler that adds a positive-calory-value entry

Look into POS recognition APIs:

Add food handler in Bot

A handler in bot/commands.go that determines what part of a message's content refers to a food, estimate its caloric value and insert it as an entry into database

ask for feedback and train bot???

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.