Giter VIP home page Giter VIP logo

finbudg's Introduction

finbudg

Quick cli tool to calculate your expenses and balance for a set period of time.

TO-DO

  • Make error messages more useful
  • Show what is being spent most money on
  • (Maybe) a way to interactively edit an input file

How to install

You need to install the Rust toolchain (rustup, cargo, etc) to build this program. You will also need scdoc to generate the manual pages, and make if you want to automatically build and install the program.

You can build it yourself using cargo:

cargo build --release

Or build it and install it using make:

make
sudo make install

You can remove it by executing:

sudo make uninstall

For more information about the usage of this program, see man 1 finbudg and man 5 finbudg after building and installing with make.

Example

finbudg input.toml

Input:

start_date = 2020-10-01
end_date = 2020-10-31
budget = 420.0
essential_categories = [
  "produce",
  "transport",
  "utilities",
]

[[days]]
date = 2020-10-01

  [[days.expenses]]
  name = "Potato masher"
  price = 3.81
  category = "supplies"

  [[days.expenses]]
  name = "Bacon"
  price = 3.33
  category = "produce"
  shared = ["Fox", "Falco"]

  [[days.expenses]]
  name = "Yoghurt"
  price = 1.24
  category = "produce"
  owed = true
  shared = ["Falco"]

  [[days.expenses]]
  name = "Onion"
  price = 0.15
  category = "produce"

  [[days.expenses]]
  name = "Chicken"
  price = 2.28
  category = "produce"
  shared = ["Fox"]

[[days]]
date = 2020-10-04

[[days]]
date = 2020-10-02

  [[days.expenses]]
  name = "VPS"
  price = 5.0
  category = "utilities"

  [[days.expenses]]
  name = "Transport card"
  price = 6.9
  category = "transport"

Output:

Your expenses for the period of 2020-10-01 - 2020-10-31
Last day on entry: 2020-10-04
Days until period end: 27
Budget: 420.00

Average per day in produce: 0.60
Average per day in supplies: 0.95
Average per day in utilities: 1.25
Average per day in transport: 1.73
Average per day in essential expenses: 3.58
Average per day: 4.53

Total in produce: 2.40
Total in utilities: 5.00
Total in supplies: 3.81
Total in transport: 6.90
Total in essential expenses: 14.30
Total: 18.11

Left on balance: 401.89

Fox owes you in shared expenses: 2.25
Falco owes you in shared expenses: 2.35
In total you're owed: 4.60
Assuming you haven't been repaid, you're left with: 397.29

Days until balance runs out:
...taking into account all expenses: 88.77
...taking into account only essential expenses: 112.42

Your expenses are healthy, they should last you from your last day on entry through your last day of the period.

finbudg's People

Contributors

yaroslav-95 avatar

Watchers

 avatar  avatar

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.