Giter VIP home page Giter VIP logo

balance's Introduction

balance

CICD

CLI tool to balance your budget

balance

Features

  • Cross-platform
  • Arbitrary shell commands are supported.

Usage

balance --help will provide a menu of all available commands and optional arguments.

Transaction

$ balance tx -a 300 -A "expense:grocery"
transaction = {
    date: None,
    amount: 300,
    account: "expense:grocery",
    offset_account: None,
    description: None,
}
$ balance tx -a 300 -A "expense:grocery" -d 20221231 -O "asset:cash_checking" -D "Weekly grocery"
transaction = {
    date: Some(20221231),
    amount: 300,
    account: "expense:grocery",
    offset_account: Some("asset:cash_checking"),
    description: Some("Weekly grocery"),
}

Database

$ balance add balance.yml
&path = [ "balance.yml", ]

Demo with Docker

Run a docker container to demo the CLI without installing it:

docker run lloydlobo/balance

Setup

API

Add SECRET to the .env file as <your SECRET key> without </>.

BALANCE_API_KEY=<your SECRET key>

Install

From Cargo

TODO:

cargo install balance

Build from Source

Alternatively, clone this repo and do the following:

  • If Rust is not installed on your machine, follow the instructions on how to do that here: https://www.rust-lang.org/tools/install
  • run cargo build --release to compile the binary
  • copy the /target/release/balance binary to /usr/bin or wherever your system maintains application binaries
git clone https://github.com/lloydlobo/balance.git
cd balance
cargo build --release
cargo install --path .

Dev

Build

Docker

docker_image := "balance"
docker_container_name := 'balance1'
username := 'lloydlobo'

docker build -t {{docker_image}} .
docker run -dp 8080:3030 --rm --name {{docker_container_name}} {{docker_image}}
docker run -it --rm --name {{docker_container_name}} --entrypoint bin/bash {{docker_image}}
docker stop {{docker_container_name}}
docker logs -f {{docker_container_name}}
Publish with Docker
docker tag {{docker_image}} {{username}}/{{docker_image}}
docker push {{username}}/{{docker_image}}

Test

CARGO_LOG=error cargo test

License

balance is dual-licensed under the terms of the MIT License and the Apache License 2.0.

See the LICENSE-APACHE and LICENSE-MIT files for details.

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.