hledger-iadd: A terminal UI as drop-in replacement for hledger add

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

This is a terminal UI as drop-in replacement for hledger add.

It improves in the following ways on hledger's add command:


[Skip to Readme]

Properties

Versions 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.6, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.3.15, 1.3.16, 1.3.17, 1.3.18, 1.3.19, 1.3.20
Change log ChangeLog.md
Dependencies base (>=4.8 && <5), brick (>=0.17 && <0.25), containers, directory, free (>=4.12.4), hledger-iadd, hledger-lib (>=1.0 && <1.4), megaparsec (>=5.0 && <6.2), microlens, microlens-th, optparse-applicative, semigroups (>=0.5.0), text, text-format, text-zipper (>=0.10), time (>=1.5), transformers (>=0.3), unordered-containers, vector, vty (>=5.4), xdg-basedir [details]
License BSD-3-Clause
Copyright 2017 Hans-Peter Deifel
Author Hans-Peter Deifel <hpd@hpdeifel.de>
Maintainer Hans-Peter Deifel <hpd@hpdeifel.de>
Category Finance, Console
Home page https://github.com/hpdeifel/hledger-iadd#readme
Bug tracker https://github.com/hpdeifel/hledger-iadd/issues
Source repo head: git clone https://github.com/hpdeifel/hledger-iadd.git
Uploaded by hpdeifel at 2017-09-19T10:31:26Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for hledger-iadd-1.2.6

[back to package description]

hledger-iadd

An interactive terminal UI as drop-in replacement for hledger add.

Screencast

Features

This project improves in the following ways on hledger's add command:

Also see the user guide under Usage.

Installation

Latest release

stack

The easiest method would be stack: Install the stack program and type:

stack install --resolver=nightly hledger-iadd

This downloads and builds hledger-iadd and all it's Haskell dependencies. After that, it copys the resulting binary to ~/.local/bin. See stack --help for more options. You may get asked to install the GHC Haskell compiler locally. To do that, type stack setup.

cabal

First, install the GHC Haskell compiler and the cabal install, alex and happy build tools, possibly from your distribution or the haskell platform. Type

cabal install --bindir ~/bin hledger-iadd

to install the binary in ~/bin.

Development version

To install the development version, clone the git repository first:

git clone https://github.com/hpdeifel/hledger-iadd.git
cd hledger-iadd

stack

The easiest method would be stack: Install the stack program and type:

stack install

To build and install all Haskell dependencies locally and install hledger-iadd to ~/.local/bin. See stack --help for more options. You may get asked to install the GHC Haskell compiler locally. To do that, type stack setup.

Cabal

First, install the GHC Haskell compiler and the cabal install, alex and happy build tools, possibly from your distribution or the haskell platform.

Since cabal builds regularly break in non-isolated environments, the recommended next step is to create a cabal sandbox where all dependencies will be installed in:

cd hledger-iadd
cabal sandbox init

You can now download and install all dependencies locally with

cabal install --only-dependencies

And finally you're ready to build and install hledger-iadd:

cabal configure --bindir ~/bin
cabal build
cabal copy

Usage

You can start the program either with

hledger iadd

or simply hledger-iadd.

The following command line options are available:

The UI is partitioned in 4 regions:

Current Transaction (view of your work in progress)
---------------------------------------------------
Question: [ text area                             ]
---------------------------------------------------
Context information (e.g. list of accounts)




---------------------------------------------------
Message area

For each transaction, you will get asked the following questions in order:

  1. Date?
  2. Description?
  3. Account name?
  4. Amount?
  5. The last two questions are repeated until you enter the empty account
  6. Do you want to add this transaction to the journal?

To accept the default answer, immediately press Return at a promt.

While you type, the context area shows possible completions. Pressing Return answers the question with the currently selected completion. You can select differnt completions with C-n and C-p.

The following keyboard shortcuts are available:

Key Function
C-c, C-d Quit the program without saving the current transaction
Esc Abort the current transaction or exit when at toplevel
Ret Accept the currently selected answer
Alt-Ret Accept the current answer verbatim from the text area, ignoring the selection
C-z Undo the last action
Tab Insert the currently selected answer into the text area
C-n, Select the next context item
C-p, Select the previous context item
; Edit comment for current prompt
Alt-; Edit transaction comment
F1,Alt-? Show help dialog

Default Currency

To make entry easier it is recommended that you set a default commodity in your ledger file if you haven't already done so. That way when entering amounts, hledger-iadd will add the symbols for you. You can do this by adding a line like below to the top of your ledger file:

; sets the default commodity symbol and placement, thousands separator, and decimal symbol
D $1,000.00

Configuration File

hledger-iadd is optionally configurable through a configuration file in ${XDG_CONFIG_HOME}/hledger-iadd/config.conf. This file consists of simple

key = value

assignments on individual lines with whitespace or comments starting with # between them. The default config can be obtained by passing --dump-default-config to hledger-iadd.

The following options are currently available:

License

The code of hledger-iadd is released under the BSD3 license, but since hledger-lib -- the library that hledger-iadd uses -- is licensed under the GPLv3, the terms of the GPL apply to the compiled and linked binary.