You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ledger-cli

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ledger-cli

API for the ledger command-line interface (ledger-cli.org).

0.0.3
Source
npmnpm
Version published
Weekly downloads
27
92.86%
Maintainers
1
Weekly downloads
 
Created
Source

ledger-cli

API for the Ledger command-line interface (ledger-cli.org).

Ledger is a powerful, double-entry accounting system that is accessed from the UNIX command-line.

Dependencies

Requires the Ledger to be installed, for Mac OS X using homebrew and latest 3.0 version.

brew install ledger --HEAD

Usage

Install dependencies with npm.

npm install ledger-cli

Use the Ledger class to execute reports (only balance is currently supported).

var Ledger = require('ledger-cli).Ledger;
ledger = new Ledger({ file: 'path/to/ledger/journal/file.dat' });

Balance

The balance command reports the current balance of all accounts.

ledger.balance()
  .on('data', function(entry) {
    // JSON object for each entry
  })
  .once('end', function(){
    // completed
  })
  .on('error', function(error) {
    // error
  });

Register

The register command displays all the postings occurring in a single account.

ledger.register()
  .on('data', function(entry) {
    // JSON object for each entry
  })
  .once('end', function(){
    // completed
  })
  .on('error', function(error) {
    // error
  });

Keywords

ledger

FAQs

Package last updated on 25 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts