packages feed

hledger 1.13 → 1.13.1

raw patch · 27 files changed

+110/−111 lines, 27 filesdep −heredep ~hledger-libPVP ok

version bump matches the API change (PVP)

Dependencies removed: here

Dependency ranges changed: hledger-lib

API changes (from Hackage documentation)

Files

CHANGES.md view
@@ -1,6 +1,10 @@ User-visible changes in the hledger command line tool and library.  +# 1.13.1 (2019/02/02)++- stop depending on here to avoid haskell-src-meta/stackage blockage.+ # 1.13 (2019/02/01)  - cli: reorganised commands list. Addons now have a + prefix.
Hledger/Cli/Commands.hs view
@@ -47,7 +47,6 @@ #if !(MIN_VERSION_base(4,11,0)) import Data.Monoid ((<>)) #endif-import Data.String.Here import Data.Text (Text) import qualified Data.Text as T import Data.Time.Calendar@@ -132,63 +131,63 @@ -- TODO: generate more of this automatically. --  commandsList :: String-commandsList = [here|---------------------------------------------------------------------------------PROGVERSION-Usage: hledger COMMAND [OPTIONS] [-- ADDONCMDOPTIONS]-Commands (+ addons found in $PATH):--Data entry (these commands modify the journal file):- add                      add transactions using guided prompts-+iadd                     add transactions using curses ui- import                   add any new transactions from other files (eg csv)--Data management:-+autosync                 download/deduplicate/convert OFX data-+check                    check more powerful balance assertions- check-dates              check transactions are ordered by date- check-dupes              check for accounts with the same leaf name- close (equity)           generate balance-resetting transactions-+diff                     compare account transactions in two journal files-+interest                 generate interest transactions- rewrite                  generate automated postings/diffs (old, use --auto)--Financial reports:- balancesheet (bs)        show assets, liabilities and net worth- balancesheetequity (bse) show assets, liabilities and equity- cashflow (cf)            show changes in liquid assets- incomestatement (is)     show revenues and expenses-+irr                      calculate internal rate of return (old, use roi)- roi                      show return on investments--Low-level reports:- accounts (a)             show account names- activity                 show postings-per-interval bar charts- balance (b, bal)         show balance changes/end balances/budgets in accounts- files                    show input file paths- prices                   show market price records- print (p, txns)          show transactions (journal entries)- print-unique             show only transactions with unique descriptions- register (r, reg)        show postings in one or more accounts & running total- register-match           show a recent posting that best matches a description- stats                    show journal statistics- tags                     show tag names- test                     run self tests--Alternate user interfaces:-+ui                       run curses ui-+web                      run web ui-+api                      run http api server--Other:-OTHER-Help:- (no arguments)           show this commands list- -h                       show general flags- COMMAND -h               show flags & docs for COMMAND- help [MANUAL]            show hledger manuals in various formats--|]+commandsList = unlines [+   "-------------------------------------------------------------------------------"+  ,"PROGVERSION"+  ,"Usage: hledger COMMAND [OPTIONS] [-- ADDONCMDOPTIONS]"+  ,"Commands (+ addons found in $PATH):"+  ,""+  ,"Data entry (these commands modify the journal file):"+  ," add                      add transactions using guided prompts"+  ,"+iadd                     add transactions using curses ui"+  ," import                   add any new transactions from other files (eg csv)"+  ,""+  ,"Data management:"+  ,"+autosync                 download/deduplicate/convert OFX data"+  ,"+check                    check more powerful balance assertions"+  ," check-dates              check transactions are ordered by date"+  ," check-dupes              check for accounts with the same leaf name"+  ," close (equity)           generate balance-resetting transactions"+  ,"+diff                     compare account transactions in two journal files"+  ,"+interest                 generate interest transactions"+  ," rewrite                  generate automated postings/diffs (old, use --auto)"+  ,""+  ,"Financial reports:"+  ," balancesheet (bs)        show assets, liabilities and net worth"+  ," balancesheetequity (bse) show assets, liabilities and equity"+  ," cashflow (cf)            show changes in liquid assets"+  ," incomestatement (is)     show revenues and expenses"+  ,"+irr                      calculate internal rate of return (old, use roi)"+  ," roi                      show return on investments"+  ,""+  ,"Low-level reports:"+  ," accounts (a)             show account names"+  ," activity                 show postings-per-interval bar charts"+  ," balance (b, bal)         show balance changes/end balances/budgets in accounts"+  ," files                    show input file paths"+  ," prices                   show market price records"+  ," print (p, txns)          show transactions (journal entries)"+  ," print-unique             show only transactions with unique descriptions"+  ," register (r, reg)        show postings in one or more accounts & running total"+  ," register-match           show a recent posting that best matches a description"+  ," stats                    show journal statistics"+  ," tags                     show tag names"+  ," test                     run self tests"+  ,""+  ,"Alternate user interfaces:"+  ,"+ui                       run curses ui"+  ,"+web                      run web ui"+  ,"+api                      run http api server"+  ,""+  ,"Other:"+  ,"OTHER"+  ,"Help:"+  ," (no arguments)           show this commands list"+  ," -h                       show general flags"+  ," COMMAND -h               show flags & docs for COMMAND"+  ," help [MANUAL]            show hledger manuals in various formats"+  ,""+  ] -- commands                 show brief commands list -- edit                     open a text editor on some part of the journal -- aregister (ar, areg)     show transactions in a single account@@ -236,7 +235,7 @@ -- The test command is defined here for easy access to other modules' tests.  testmode = hledgerCommandMode-  $(hereFileRelative "Hledger/Cli/Commands/Test.txt")+  $(embedFileRelative "Hledger/Cli/Commands/Test.txt")   []   [generalflagsgroup3]   []
Hledger/Cli/Commands/Accounts.hs view
@@ -35,7 +35,7 @@  -- | Command line options for this command. accountsmode = hledgerCommandMode-  $(hereFileRelative "Hledger/Cli/Commands/Accounts.txt")+  $(embedFileRelative "Hledger/Cli/Commands/Accounts.txt")   [flagNone ["declared"] (\opts -> setboolopt "declared" opts) "show account names declared with account directives"   ,flagNone ["used"] (\opts -> setboolopt "used" opts) "show account names referenced by transactions"   ,flagNone ["tree"] (\opts -> setboolopt "tree" opts) "show short account names, as a tree"
Hledger/Cli/Commands/Activity.hs view
@@ -20,7 +20,7 @@ import Hledger.Utils.UTF8IOCompat (putStr)  activitymode = hledgerCommandMode-  $(hereFileRelative "Hledger/Cli/Commands/Activity.txt")+  $(embedFileRelative "Hledger/Cli/Commands/Activity.txt")   []   [generalflagsgroup1]   []
Hledger/Cli/Commands/Add.hs view
@@ -48,7 +48,7 @@   addmode = hledgerCommandMode-  $(hereFileRelative "Hledger/Cli/Commands/Add.txt")+  $(embedFileRelative "Hledger/Cli/Commands/Add.txt")   [flagNone ["no-new-accounts"]  (\opts -> setboolopt "no-new-accounts" opts) "don't allow creating new accounts"]   [generalflagsgroup2]   []
Hledger/Cli/Commands/Balance.hs view
@@ -270,7 +270,7 @@  -- | Command line options for this command. balancemode = hledgerCommandMode-  $(hereFileRelative "Hledger/Cli/Commands/Balance.txt")+  $(embedFileRelative "Hledger/Cli/Commands/Balance.txt")   ([flagNone ["change"] (\opts -> setboolopt "change" opts)       "show balance change in each period (default)"    ,flagNone ["cumulative"] (\opts -> setboolopt "cumulative" opts)
Hledger/Cli/Commands/Balancesheet.hs view
@@ -18,7 +18,7 @@ import Hledger.Cli.CompoundBalanceCommand  balancesheetSpec = CompoundBalanceCommandSpec {-  cbcdoc      = ($(hereFileRelative "Hledger/Cli/Commands/Balancesheet.txt")),+  cbcdoc      = ($(embedFileRelative "Hledger/Cli/Commands/Balancesheet.txt")),   cbctitle    = "Balance Sheet",   cbcqueries  = [      CBCSubreportSpec{
Hledger/Cli/Commands/Balancesheetequity.hs view
@@ -18,7 +18,7 @@ import Hledger.Cli.CompoundBalanceCommand  balancesheetequitySpec = CompoundBalanceCommandSpec {-  cbcdoc      = ($(hereFileRelative "Hledger/Cli/Commands/Balancesheetequity.txt")),+  cbcdoc      = ($(embedFileRelative "Hledger/Cli/Commands/Balancesheetequity.txt")),   cbctitle    = "Balance Sheet With Equity",   cbcqueries  = [      CBCSubreportSpec{
Hledger/Cli/Commands/Cashflow.hs view
@@ -21,7 +21,7 @@ import Hledger.Cli.CompoundBalanceCommand  cashflowSpec = CompoundBalanceCommandSpec {-  cbcdoc      = ($(hereFileRelative "Hledger/Cli/Commands/Cashflow.txt")),+  cbcdoc      = ($(embedFileRelative "Hledger/Cli/Commands/Cashflow.txt")),   cbctitle    = "Cashflow Statement",   cbcqueries  = [      CBCSubreportSpec{
Hledger/Cli/Commands/Checkdates.hs view
@@ -13,7 +13,7 @@  checkdatesmode :: Mode RawOpts checkdatesmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Checkdates.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Checkdates.txt"))   [flagNone ["strict"] (\opts -> setboolopt "strict" opts) "makes date comparing strict"]   [generalflagsgroup1]   []
Hledger/Cli/Commands/Checkdupes.hs view
@@ -16,7 +16,7 @@  checkdupesmode :: Mode RawOpts checkdupesmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Checkdupes.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Checkdupes.txt"))   []   [generalflagsgroup1]   []
Hledger/Cli/Commands/Close.hs view
@@ -16,7 +16,7 @@ import Hledger.Cli.CliOptions  closemode = hledgerCommandMode-  $(hereFileRelative "Hledger/Cli/Commands/Close.txt")+  $(embedFileRelative "Hledger/Cli/Commands/Close.txt")   [flagNone ["opening"] (\opts -> setboolopt "opening" opts) "show just opening transaction"   ,flagNone ["closing"] (\opts -> setboolopt "closing" opts) "show just closing transaction"   ]
Hledger/Cli/Commands/Files.hs view
@@ -23,7 +23,7 @@  -- | Command line options for this command. filesmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Files.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Files.txt"))   []   [generalflagsgroup2]   []
Hledger/Cli/Commands/Help.hs view
@@ -20,7 +20,6 @@ import Prelude () import "base-compat-batteries" Prelude.Compat import Data.Char-import Data.String.Here import Data.List import Data.Maybe import Safe@@ -28,7 +27,7 @@ import System.Environment import System.IO -import Hledger.Utils (hereFileRelative)+import Hledger.Utils (embedFileRelative) import Hledger.Data.RawOptions import Hledger.Data.Types import Hledger.Cli.CliOptions@@ -36,7 +35,7 @@ --import Hledger.Utils.Debug  helpmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Help.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Help.txt"))   [flagNone ["info"]  (setboolopt "info")  "show the manual with info"   ,flagNone ["man"]   (setboolopt "man")   "show the manual with man"   ,flagNone ["pager"] (setboolopt "pager") "show the manual with $PAGER or less"@@ -74,9 +73,10 @@       | pagerprog `elem` exes           = pager       | otherwise                       = cat    case topic of-    Nothing -> putStrLn $ [here|-Please choose a manual by typing "hledger help MANUAL" (any substring is ok).-A viewer (info, man, a pager, or stdout) will be auto-selected,-or type "hledger help -h" to see options. Manuals available:-|] ++ "\n " ++ intercalate " " docTopics+    Nothing -> putStrLn $ unlines [+       "Please choose a manual by typing \"hledger help MANUAL\" (any substring is ok)."+      ,"A viewer (info, man, a pager, or stdout) will be auto-selected,"+      ,"or type \"hledger help -h\" to see options. Manuals available:"+      ]+      ++ "\n " ++ intercalate " " docTopics     Just t  -> viewer t
Hledger/Cli/Commands/Import.hs view
@@ -18,7 +18,7 @@ import Text.Printf  importmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Import.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Import.txt"))   [flagNone ["dry-run"] (\opts -> setboolopt "dry-run" opts) "just show the transactions to be imported"]    [generalflagsgroup1]   []
Hledger/Cli/Commands/Incomestatement.hs view
@@ -17,7 +17,7 @@ import Hledger.Cli.CompoundBalanceCommand  incomestatementSpec = CompoundBalanceCommandSpec {-  cbcdoc      = ($(hereFileRelative "Hledger/Cli/Commands/Incomestatement.txt")),+  cbcdoc      = ($(embedFileRelative "Hledger/Cli/Commands/Incomestatement.txt")),   cbctitle    = "Income Statement",   cbcqueries  = [      CBCSubreportSpec{
Hledger/Cli/Commands/Prices.hs view
@@ -15,7 +15,7 @@ import System.Console.CmdArgs.Explicit  pricesmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Prices.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Prices.txt"))   [flagNone ["costs"] (setboolopt "costs") "print transaction prices from postings"   ,flagNone ["inverted-costs"] (setboolopt "inverted-costs") "print transaction inverted prices from postings also"]   [generalflagsgroup1]
Hledger/Cli/Commands/Print.hs view
@@ -27,7 +27,7 @@   printmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Print.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Print.txt"))   [let arg = "STR" in    flagReq  ["match","m"] (\s opts -> Right $ setopt "match" s opts) arg     ("show the transaction whose description is most similar to "++arg++", and is most recent")
Hledger/Cli/Commands/Printunique.hs view
@@ -13,7 +13,7 @@ import Hledger.Cli.Commands.Print  printuniquemode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Printunique.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Printunique.txt"))   []   [generalflagsgroup1]   []
Hledger/Cli/Commands/Register.hs view
@@ -28,7 +28,7 @@ import Hledger.Cli.Utils  registermode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Register.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Register.txt"))   [flagNone ["cumulative"]         (\opts -> setboolopt "change" opts)      "show running total from report start date (default)"   ,flagNone ["historical","H"] (\opts -> setboolopt "historical" opts)
Hledger/Cli/Commands/Registermatch.hs view
@@ -15,7 +15,7 @@ import Hledger.Cli.Commands.Register  registermatchmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Registermatch.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Registermatch.txt"))   []   [generalflagsgroup1]   []
Hledger/Cli/Commands/Rewrite.hs view
@@ -23,7 +23,7 @@ import qualified Data.Algorithm.Diff as D  rewritemode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Rewrite.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Rewrite.txt"))   [flagReq ["add-posting"] (\s opts -> Right $ setopt "add-posting" s opts) "'ACCT  AMTEXPR'"            "add a posting to ACCT, which may be parenthesised. AMTEXPR is either a literal amount, or *N which means the transaction's first matched amount multiplied by N (a decimal number). Two spaces separate ACCT and AMTEXPR."   ,flagNone ["diff"] (setboolopt "diff") "generate diff suitable as an input for patch tool"
Hledger/Cli/Commands/Roi.hs view
@@ -30,7 +30,7 @@   roimode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Roi.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Roi.txt"))   [flagNone ["cashflow"] (setboolopt "cashflow") "show all amounts that were used to compute returns"   ,flagReq ["investment"] (\s opts -> Right $ setopt "investment" s opts) "QUERY"     "query to select your investment transactions"
Hledger/Cli/Commands/Stats.hs view
@@ -31,7 +31,7 @@   statsmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Stats.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Stats.txt"))   [flagReq  ["output-file","o"]   (\s opts -> Right $ setopt "output-file" s opts) "FILE" "write output to FILE.  A file extension matching one of the above formats selects that format."   ]   [generalflagsgroup1]
Hledger/Cli/Commands/Tags.hs view
@@ -14,7 +14,7 @@ import Hledger.Cli.CliOptions  tagsmode = hledgerCommandMode-  ($(hereFileRelative "Hledger/Cli/Commands/Tags.txt"))+  ($(embedFileRelative "Hledger/Cli/Commands/Tags.txt"))   [] -- [flagNone ["strict"] (\opts -> setboolopt "strict" opts) "makes date comparing strict"] --    [generalflagsgroup1]   []
Hledger/Cli/Main.hs view
@@ -42,7 +42,6 @@  import Data.Char (isDigit) import Data.List-import Data.String.Here import Safe import System.Console.CmdArgs.Explicit as C import System.Environment@@ -83,14 +82,15 @@         [detailedversionflag]         -- ++ inputflags -- included here so they'll not raise a confusing error if present with no COMMAND     }- ,modeHelpSuffix = lines $ regexReplace "PROGNAME" progname [here|Examples:-PROGNAME                         list commands-PROGNAME CMD [--] [OPTS] [ARGS]  run a command (use -- with addon commands)-PROGNAME-CMD [OPTS] [ARGS]       or run addon commands directly-PROGNAME -h                      show general usage-PROGNAME CMD -h                  show command usage-PROGNAME help [MANUAL]           show any of the hledger manuals in various formats-|]+ ,modeHelpSuffix = map (regexReplace "PROGNAME" progname) [+     "Examples:"+    ,"PROGNAME                         list commands"+    ,"PROGNAME CMD [--] [OPTS] [ARGS]  run a command (use -- with addon commands)"+    ,"PROGNAME-CMD [OPTS] [ARGS]       or run addon commands directly"+    ,"PROGNAME -h                      show general usage"+    ,"PROGNAME CMD -h                  show command usage"+    ,"PROGNAME help [MANUAL]           show any of the hledger manuals in various formats"+    ]  }  -- | Let's go!
hledger.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 0f31726cb805b74d59400bb1d7502bb6c6c7f01eb41ac0272c4da6a8d94144b2+-- hash: a3b985db2886f124f83c06d2753ba621ed2598501eb0371a4cf46c84f0d553e2  name:           hledger-version:        1.13+version:        1.13.1 synopsis:       Command-line interface for the hledger accounting tool description:    This is hledger's command-line interface.                 Its basic function is to read a plain text file describing@@ -136,7 +136,7 @@   other-modules:       Paths_hledger   ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path-  cpp-options: -DVERSION="1.13"+  cpp-options: -DVERSION="1.13.1"   build-depends:       Decimal     , Diff@@ -152,8 +152,7 @@     , filepath     , hashable >=1.2.4     , haskeline >=0.6-    , here-    , hledger-lib >=1.13 && <1.14+    , hledger-lib >=1.13.1 && <1.14     , lucid     , math-functions >=0.2.0.0     , megaparsec >=7.0.0 && <8@@ -188,7 +187,7 @@   hs-source-dirs:       app   ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path-  cpp-options: -DVERSION="1.13"+  cpp-options: -DVERSION="1.13.1"   build-depends:       Decimal     , ansi-terminal >=0.6.2.3@@ -202,9 +201,8 @@     , easytest     , filepath     , haskeline >=0.6-    , here     , hledger-    , hledger-lib >=1.13 && <1.14+    , hledger-lib >=1.13.1 && <1.14     , math-functions >=0.2.0.0     , megaparsec >=7.0.0 && <8     , mtl@@ -241,7 +239,7 @@   hs-source-dirs:       test   ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path-  cpp-options: -DVERSION="1.13"+  cpp-options: -DVERSION="1.13.1"   build-depends:       Decimal     , ansi-terminal >=0.6.2.3@@ -255,9 +253,8 @@     , easytest     , filepath     , haskeline >=0.6-    , here     , hledger-    , hledger-lib >=1.13 && <1.14+    , hledger-lib >=1.13.1 && <1.14     , math-functions >=0.2.0.0     , megaparsec >=7.0.0 && <8     , mtl@@ -308,9 +305,8 @@     , easytest     , filepath     , haskeline >=0.6-    , here     , hledger-    , hledger-lib >=1.13 && <1.14+    , hledger-lib >=1.13.1 && <1.14     , html     , math-functions >=0.2.0.0     , megaparsec >=7.0.0 && <8