Giter VIP home page Giter VIP logo

10bisbar's Introduction

10bisbar

A bitbar plugin that helps you quit your 10Bis guesswork and never get stuck with an empty (or overly full) account.

The menu in the picture means: you have 19 more days of ordering to do (working days). Then:

  • For a meal costing 30NIS, you can buy 20 meals for the current balance (603NIS)
  • For a meal costing 42NIS, you can buy 14 meals for the current balance (603NIS), and 5 more meals for additional 195NIS which will probably be charged on your credit card.
  • You get the point... Of course, all of that is configurable.

Quick Start

Install bitbar and configure a plugin directory if you never did. Download a 10bisbar binary from the releases section and extract it to your bitbar plugins folder, then continue to the configuration section.

Or, if you prefer to build on your own and produce a binary. You'll need Go and UPX (brew install upx). Then, run:

$ make dist

After that's done, point bitbar to this folder, or simply copy the resulting 10bisbar binary to your plugins folder. There are no dependencies so you should be good to go immediately.

Configuration

Place a file called .10bis.json at your home folder, so that it will be found in ~/.10bis.json.

For the file's content, start with this sample:

{
  "username":"your-10bis-user",
  "password":"your-10bis-password",
  "prices":[30, 42, 69, 80],
  "no_food_days_per_week": 2
}

Put your username and password in, and then put your favorite meal price options in prices. Finally, indicate how many days per week you don't use 10bis at all (typically weekends).

Refresh your bitbar, and you're good to go.

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Copyright

Copyright (c) 2016 Dotan Nahum @jondot. See MIT-LICENSE for further details.

10bisbar's People

Contributors

jondot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

10bisbar's Issues

ParseFloat error - plugin fails to load

When enabling the plugin I get:

2016/11/02 13:54:17 strconv.ParseFloat: parsing "": invalid syntax

My configuration:

{
  "username":"itamar.ben-zaken",
  "password":"******",
  "prices":[40, 70, 90],
  "no_food_days_per_week": 2
}

wrong calculations

today is the 21.7.16
my current budget is 342.74 Shakels and there will be only 5 working days(by the default config of no_food_days_per_week": 2)
the numbers don't make sense:
screen shot 2016-07-21 at 11 42 24 am

Days Remaining, off-by-one?

10bisbar 2016-11-30

Should the "You have to eat for X more days" count include today or not?
I hadn't been paying close enough attention to the exact count for it to matter, but today is the last day of the month, and the message "you have to eat for 0 more days" is a bit strange.

Dothan Nahum responded to me:

it's just not smart enough. it doesn't detect if there's an invoice for today.
but that might be interesting to implement.

Thoughts about what the correct behaviour would be?

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.