Simple ledger-cli renderer for Haskell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Text/Ledger
test
.gitignore
ChangeLog.md
LICENSE
README.md
Setup.hs
default.nix
ledger-simple.cabal

README.md

ledger-simple

Simple ledger-cli renderer for Haskell

Installation

Install with cabal

cabal install ledger-simple

It's one file, you could simply copy it into your tree ¯\_(ツ)_/¯

Example

import Data.List.NonEmpty (NonEmpty(..))
import Text.Ledger.Simple
import System.IO (stdout)

transaction = Transaction day "Pizza!" (posting1 :| [posting2])
  where
    posting1 = Posting "-25 CAD" "assets:bank" Nothing
    posting2 = Posting "25 CAD" "expenses:pizza" Nothing
    day      = fromGregorian 2017 9 14

main :: IO ()
main = printTransaction stdout transaction