Reportr used to be a thing. It has ceased to be. Don't use this code. This repo is archived.
A module to report your Mac's battery data to your instance of Reportr. It may work with Linux, frankly, I have no idea. It will not work with Windows.
Assuming you've got a running instance of Reportr,
- Clone this repo
mv config.example.json config.json
- Fill in config.json, it's pretty self-explanatory. Don't put a trailing
/
character on the host! crontab -e
- I find this doesn't work when your editor is not VIM, emacs, or nano. Not sure why, but it doesn't have anything to do with this project. Edit your crontab however you like, I'm not your boss.
- Enter
* * * * * node /Path/To/Your/Cloned/Directory/tracker.js
This will report your battery data once every minute, on the minute. You can run the command manually too if you like, but irregular data isn't fun.
- It may be nice to make this a global node executable, but I'm not sure how those work yet. The install script (if there's such a way to hook into that) could put your config file in
~/.config
which seems like as good a place as any. - As soon as there's a way to share report configurations for reportr, I will release my report configuration. For now, here's a picture:
- James Davenport, for this blog post, this script (which I used in this project, although extremely modified, i.e. cut down to two lines of code. Nevertheless, I retain his copyright notice which you will find in the license file), and the concept.
- Samy Pessé, for Reportr and the Reportr-SDK for NodeJS.