hledger-1.12.1: Command-line interface for the hledger accounting tool

Safe Haskell | None
Language | Haskell2010

Hledger.Cli.Commands.Add

Description

A history-aware add command to help with data entry. |

Synopsis

- addmode :: Mode RawOpts
- add :: CliOpts -> Journal -> IO ()
- appendToJournalFileOrStdout :: FilePath -> String -> IO ()
- journalAddTransaction :: Journal -> CliOpts -> Transaction -> IO Journal
- transactionsSimilarTo :: Journal -> Query -> Text -> [(Double, Transaction)]

# Documentation

addmode :: Mode RawOpts Source #

add :: CliOpts -> Journal -> IO () Source #

Read multiple transactions from the console, prompting for each field, and append them to the journal file. If the journal came from stdin, this command has no effect.

appendToJournalFileOrStdout :: FilePath -> String -> IO () Source #

Append a string, typically one or more transactions, to a journal file, or if the file is "-", dump it to stdout. Tries to avoid excess whitespace.

journalAddTransaction :: Journal -> CliOpts -> Transaction -> IO Journal Source #

Append this transaction to the journal's file and transaction list.

transactionsSimilarTo :: Journal -> Query -> Text -> [(Double, Transaction)] Source #

Find the most similar and recent transactions matching the given transaction description and report query. Transactions are listed with their "relevancy" score, most relevant first.