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

Hledger.Cli.Utils

Description

Synopsis

# Documentation

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

Parse the user's specified journal file, maybe apply some transformations (aliases, pivot) and run a hledger command on it, or throw an error.

Write some output to stdout or to a file selected by --output-file. If the file exists it will be overwritten.

Re-read the journal file(s) specified by options and maybe apply some transformations (aliases, pivot), or return an error string. Reads the full journal, without filtering.

Re-read the option-specified journal file(s), but only if any of them has changed since last read. (If the file is standard input, this will either do nothing or give an error, not tested yet). Returns a journal or error message, and a flag indicating whether it was re-read or not. Like withJournalDo and journalReload, reads the full journal, without filtering.

Has the journal's main data file changed since the journal was last read ?

Has the specified file (presumably one of journal's data files) changed since journal was last read ?

Get the last modified time of the specified file, or if it does not exist or there is some other error, the current time.

Attempt to open a web browser on the given url, all platforms.

Back up this file with a (incrementing) numbered suffix, then overwrite it with this new text, or give an error.

Back up this file with a (incrementing) numbered suffix then overwrite it with this new text, or give an error, but only if the text is different from the current file contents, and return a flag indicating whether we did anything.

Apply the pivot transformation on a journal, if option is present.

Apply the anonymisation transformation on a journal, if option is present

data Test :: * #

The basic structure used to create an annotated tree of test cases.

Constructors

 TestList [Test] A set of Tests sharing the same level in the hierarchy.

Instances

 MethodsshowsPrec :: Int -> Test -> ShowS #show :: Test -> String #showList :: [Test] -> ShowS # Methodstest :: Test -> Test #