Overview
The goal of this project is to make a simple hardware button that would open a website that it thinks you would want to visit, using a Markov Chain, which is also used by touch screen keyboards to guess your next word. The trainer and listener, are written in Python, and the prototype button is an Arduino.
Data
The URLs I used to train the Markov Chain, I manually entered from my browser history, with the time I visited them. I am planning to make an extension that does it automatically.
Parsing
Next, the data is split into parts based on the break between consecutive times. If the break is more then a preset interval, it is considered two separate sessions, and the list is split at that point.
Training
At last, the data is fed in for training, I used a preexisting library called Markovify (https://github.com/jsvine/markovify). It then outputs a typical session.
Template
Finally, the code places the list into an Arduino sketch, which can then be uploaded to the Arduino.
Listener
Now, the listener could be run in the background, with a specific serial port, there it listens for preset URLs sent from the Arduino, at button taps, and opens up the requested website in the default browser.
Plans
I plan to add the capability to also open up applications, and an option for double tap, where both, single and double tap, could be either website list, or application list.