Giter Club home page Giter Club logo

tracker-machine-battery's Introduction

Reportr used to be a thing. It has ceased to be. Don't use this code. This repo is archived.

Battery Reportr

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.

Usage

Assuming you've got a running instance of Reportr,

  1. Clone this repo
  2. mv config.example.json config.json
  3. Fill in config.json, it's pretty self-explanatory. Don't put a trailing / character on the host!
  4. 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.
  1. 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.

Todo

  1. 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.
  2. 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:

Report View

Thanks

  • 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.

tracker-machine-battery's People

Contributors

hughrawlinson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

phenixh

tracker-machine-battery's Issues

Global executable

Like this one https://github.com/Reportr/tracker-machine

Change the binary name at this line (https://github.com/hughrawlinson/tracker-machine-battery/blob/master/package.json#L16) to something like tracker-machine-battery.
Then you can change the installation instruction to just do npm install -g ..., and use directly tracker-machine-battery.

It could be also cool if the configuration could come from the arguments given to the executable instead of a config file in the node module. You can use something like commander fro this.

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.