Giter Site home page Giter Site logo

ledger's Introduction

Ledger

Simple implementation of the ledger cli in Ruby

Requirements

Usage

Make sure that you have all the requirements installed and clone the repository. In command line, navigate to the repository and run the next line with a specific command and it's options.

$ ruby ledger.rb [COMMAND] [OPTIONS]

Don't forget to add transactions to your ledger file, otherwise, Ledger will not be able to calculate the request. You can look at some examples in the folder /records.

Usage examples

Shows the current balance of records/Income.ledger:

$ ruby ledger.rb balance --file records/Income.ledger

Displays all the postings occurring in a single account, line by line, ordered by date.

$ ruby ledger.rb register --sort date

Prints out ledger transactions with the argument bank, ordered by description

$ ruby ledger.rb print bank --sort description

Commands

  • help [COMMAND] — Describe available commands or one specific command
  • bal, balance [ARGS] — Reports the current balance of all accounts. Optionally, can receive arguments to filter the transactions.
  • reg, register [ARGS] — Displays all the postings occurring in a single account, line by line. Optionally, can receive arguments to filter the postings.
  • print [ARGS] — Prints out ledger transactions in a textual format ruby that can be parsed by Ledger. Optionally, can receive arguments to filter the transactions.

Options

  • -f,[--file FILE] — Read FILE as a ledger file. Default: index.ledger
  • -s,[--sort SORT] — Sort a report. Available SORT options: [date, description]
  • [--price-db FILE] — Specify the location of the price entry data FILE.

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.