I don't have enough time and interest to continue developing this project, and, to be honest, I don't need it anymore :)
This idea came to me while I was working remotely, hence I wasn't moving much, which was super bad for my health. But now I have an office job, and I overdo my step-goal every day, so disciplinator
is kinda useless for me now.
Stay fit and healthy, y'all!
Disciplinator is a motivatory tool that utilizes Fitbit personal API. It is designed to help in breaking the sedentary lifestyle through motivating the user to keep being active each hour (except for sleeping hours and some evening Pizza Time).
Disciplinator
has 3 main parts:
Headmaster
: web-service that connects to the Fitbit API, calculates theactivity debt
and returns current status upon request: either Normal or DebtCollection(N), where N is number of minutes to work out to change state back to normal.Priestess
is an intermediate helper library to provide common Data Types among different Fitness Apps (currently only Fitbit API is supported).Driver
is a client-side part that would motivate user through making his life harder if they fail to keep active through the day. It uses data provided by theheadmaster
to perform the callback-defined actions.
Principles and unresolved questions are described in the Rule Book.
As the driver
library is in principle indiscriminate in what one would do with the received events, and can trigger any
external callbacks as long as they fall into the Box<Fn(headmaster::State) -> Result<(), failure::Error>
interface, it's possible to
define any actions to be triggered as events.
This repository ships the executor
binary in driver/drivers/executor which is a handy mediator between the driver
lib and user-defined actions.
Actions are represented as Plugins
, which are just executable files with a manifest file attached to them. Plugins may be
implemented in any language, be it bash
, python
, ruby
, or even PowerShell
is one feels like it. Plugin may as well be
a binary file produced by Rust
, C
or any other language compiler. Anything as long as it's executable.
The plugin Manifest defines on which events plugin should be ran, and if it's enabled.
For a plugin sample please refer to the osx_send_notification.sh bash script, and it's manifest file osx_send_notification.sh.toml;
Currently only Fitbit API is supported as an author is a proud owner of the Charge 2. Support of the other APIs is not planned until author decides to switch to another fitness wearables manufacturer.
There's an Android Application for receiving push-notifications from the respective Executor plugin and Disciplinarian data rendering. Implemented mostly for convenience of debugging and to play with Android (who can live without a pinch of mobile development these days), but turned out to be pretty useful.
Huge thanks to @bradfordboyle for his fitbit-grabber-rs crate, which I'm continuing to develop for the needs of this project.
Mike Lubinets: [email protected]