Linking a Rocketbook to GitHub via Mailgun
What if you could write down notes in a notebook with a pen, then have them magically appear in your GitHub issues list? How cool would that be?
I received a Rocketbook for Christmas 2021. Rocketbooks are great – you write in them using a Pilot FriXion pen and then when you are done with your notes you can wipe them clean and use them over again. What particularly interests me about the Rocketbook though is that they are setup to provide high quality handwriting-to-computer transcription (OCR) using the Rocketbook app. Despite (or perhaps because of) being a web developer I hate using laptops in meetings. I find it distances you from whoever you are talking to and puts everything onto a less friendly and productive footing.
Even with the handwriting transcription though I was finding that you might still have to do a lot of copy-pasting from the resulting document when back in the office. For example, we regularly use GitHub issues to keep track of where we are in projects. So, I thought to myself. What would be really good, would be if not only could I OCR my meeting notes, but also have them magically turn into GitHub issues with little or no manual intervention?
Making it happen
Although we cannot set up a direct link from Rocketbook to GitHub issues, it's very possible with the aid of a few APIs and some scripting. Here's the basic flow of how it works:
🖉 Write in Rocketbook
➥ Scan with app
➥ Rocketbook does its OCR magic and sends a text transcription to an email address managed by Mailgun
➥ Mailgun does its email parsing magic and sends a machine-readable version of the email to a webhook on our server in JSON format
➥ Our webhook script parses the JSON and uses the GitHub API to add issues to the appropriate issues list
The end result looks a little like this:
Do It Yourself
The code I used for this demonstration was put together over the course of an afternoon or two and isn't what you would call a finished product. That said, if anyone wants to use it as a basis for their own project they are more than welcome, you can find it below. I'd love to hear about what you build though, you can find me on Twitter @Meester_Paul.
For the webhook I used PHP along with a
.env file to manage API keys and a lookup of Rocketbook tag ➔ GitHub repository information. Here's a Gist with the script and some basic setup instructions:
Questions or comments?