Revert the rename of check-dupes
We'll keep the old name, soon to be a hidden command, for compatibility.
This commit is contained in:
parent
8c23a16bf8
commit
ee026f5442
@ -92,7 +92,7 @@ Syntax: http://www.pandoc.org/MANUAL.html#tables -> pipe_tables
|
||||
| [balancesheet](https://github.com/simonmichael/hledger/issues?q=is:open+label:balancesheet) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:balancesheet) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:balancesheet)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:balancesheet)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:balancesheet)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:balancesheet) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:balancesheet) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:balancesheet)
|
||||
| [cashflow](https://github.com/simonmichael/hledger/issues?q=is:open+label:cashflow) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:cashflow) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:cashflow)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:cashflow)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:cashflow)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:cashflow) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:cashflow) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:cashflow)
|
||||
| [checkdates](https://github.com/simonmichael/hledger/issues?q=is:open+label:checkdates) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:checkdates) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:checkdates)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:checkdates)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:checkdates)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:checkdates) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:checkdates) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:checkdates)
|
||||
| [checkleafnames](https://github.com/simonmichael/hledger/issues?q=is:open+label:checkleafnames) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:checkleafnames) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:checkleafnames)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:checkleafnames)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:checkleafnames)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:checkleafnames) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:checkleafnames) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:checkleafnames)
|
||||
| [checkdupes](https://github.com/simonmichael/hledger/issues?q=is:open+label:checkdupes) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:checkdupes) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:checkdupes)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:checkdupes)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:checkdupes)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:checkdupes) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:checkdupes) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:checkdupes)
|
||||
| [close](https://github.com/simonmichael/hledger/issues?q=is:open+label:close) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:close) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:close)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:close)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:close)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:close) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:close) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:close)
|
||||
| [import](https://github.com/simonmichael/hledger/issues?q=is:open+label:import) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:import) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:import)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:import)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:import)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:import) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:import) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:import)
|
||||
| [incomestatement](https://github.com/simonmichael/hledger/issues?q=is:open+label:incomestatement) | [bugs](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:incomestatement) ([good first](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+label:%22good+first+issue%22+label:incomestatement)/[easy](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+label:easy?+label:incomestatement)/[other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+BUG%22+-label:%22good+first+issue%22+-label:easy?+label:incomestatement)) | [wishes](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+label:%22A+WISH%22+label:incomestatement) | [PRs](https://github.com/simonmichael/hledger/issues?q=is:open+is:pr+label:incomestatement) | [other](https://github.com/simonmichael/hledger/issues?q=is:open+is:issue+-label:%22A+BUG%22+-label:%22A+WISH%22+label:incomestatement)
|
||||
|
||||
@ -1268,7 +1268,7 @@ Migration notes:
|
||||
- new tags command: lists tags in matched transactions
|
||||
|
||||
- most addons formerly shipped in bin/ are now builtin commands. These
|
||||
include: check-dates, check-leafnames, equity, prices, print-unique,
|
||||
include: check-dates, check-dupes, equity, prices, print-unique,
|
||||
register-match, rewrite.
|
||||
|
||||
- refactor: new Commands module and subdirectory.
|
||||
@ -1385,7 +1385,7 @@ New addons added/included:
|
||||
- budget - experimental budget reporting command supporting Ledger-like periodic transactions and automated transactions (Mykola Orliuk)
|
||||
- chart - pie-chart-generating prototype, a repackaging of the old hledger-chart tool
|
||||
- check - more powerful balance assertions (Michael Walker)
|
||||
- check-leafnames - find accounts sharing the same leaf name (Stefano Rodighiero)
|
||||
- check-dupes - find accounts sharing the same leaf name (Stefano Rodighiero)
|
||||
- prices - show all market price records (Mykola Orliuk)
|
||||
- register-match - a helper for ledger-autosync's deduplication, finds best match for a transaction description
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ module Hledger.Cli.Commands (
|
||||
,module Hledger.Cli.Commands.Balancesheetequity
|
||||
,module Hledger.Cli.Commands.Cashflow
|
||||
,module Hledger.Cli.Commands.Checkdates
|
||||
,module Hledger.Cli.Commands.Checkleafnames
|
||||
,module Hledger.Cli.Commands.Checkdupes
|
||||
,module Hledger.Cli.Commands.Close
|
||||
,module Hledger.Cli.Commands.Codes
|
||||
,module Hledger.Cli.Commands.Commodities
|
||||
@ -73,7 +73,7 @@ import Hledger.Cli.Commands.Balancesheet
|
||||
import Hledger.Cli.Commands.Balancesheetequity
|
||||
import Hledger.Cli.Commands.Cashflow
|
||||
import Hledger.Cli.Commands.Checkdates
|
||||
import Hledger.Cli.Commands.Checkleafnames
|
||||
import Hledger.Cli.Commands.Checkdupes
|
||||
import Hledger.Cli.Commands.Close
|
||||
import Hledger.Cli.Commands.Codes
|
||||
import Hledger.Cli.Commands.Commodities
|
||||
@ -110,11 +110,11 @@ builtinCommands = [
|
||||
,(balancesheetmode , balancesheet)
|
||||
,(cashflowmode , cashflow)
|
||||
,(checkdatesmode , checkdates)
|
||||
,(checkleafnamesmode , checkleafnames)
|
||||
,(checkdupesmode , checkdupes)
|
||||
,(closemode , close)
|
||||
,(codesmode , codes)
|
||||
,(commoditiesmode , commodities)
|
||||
,(descriptionsmode , descriptions)
|
||||
,(descriptionsmode , descriptions)
|
||||
,(diffmode , diff)
|
||||
,(filesmode , files)
|
||||
,(helpmode , help')
|
||||
@ -168,7 +168,7 @@ commandsList progversion othercmds = [
|
||||
,"+autosync download/deduplicate/convert OFX data"
|
||||
,"+check check more powerful balance assertions"
|
||||
," check-dates check transactions are ordered by date"
|
||||
," check-leafnames check for accounts with the same leaf name"
|
||||
," 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"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Hledger.Cli.Commands.Checkleafnames (
|
||||
checkleafnamesmode
|
||||
,checkleafnames
|
||||
module Hledger.Cli.Commands.Checkdupes (
|
||||
checkdupesmode
|
||||
,checkdupes
|
||||
)
|
||||
where
|
||||
|
||||
@ -15,15 +15,15 @@ import Hledger.Cli.CliOptions
|
||||
import System.Console.CmdArgs.Explicit
|
||||
import Text.Printf
|
||||
|
||||
checkleafnamesmode :: Mode RawOpts
|
||||
checkleafnamesmode = hledgerCommandMode
|
||||
$(embedFileRelative "Hledger/Cli/Commands/Checkleafnames.txt")
|
||||
checkdupesmode :: Mode RawOpts
|
||||
checkdupesmode = hledgerCommandMode
|
||||
$(embedFileRelative "Hledger/Cli/Commands/Checkdupes.txt")
|
||||
[]
|
||||
[generalflagsgroup1]
|
||||
hiddenflags
|
||||
([], Nothing)
|
||||
|
||||
checkleafnames _opts j = mapM_ render $ checkleafnames' $ accountsNames j
|
||||
checkdupes _opts j = mapM_ render $ checkdupes' $ accountsNames j
|
||||
|
||||
accountsNames :: Journal -> [(String, AccountName)]
|
||||
accountsNames j = map leafAndAccountName as
|
||||
@ -31,8 +31,8 @@ accountsNames j = map leafAndAccountName as
|
||||
ps = journalPostings j
|
||||
as = nubSort $ map paccount ps
|
||||
|
||||
checkleafnames' :: (Ord k, Eq k) => [(k, v)] -> [(k, [v])]
|
||||
checkleafnames' l = zip dupLeafs dupAccountNames
|
||||
checkdupes' :: (Ord k, Eq k) => [(k, v)] -> [(k, [v])]
|
||||
checkdupes' l = zip dupLeafs dupAccountNames
|
||||
where dupLeafs = map (fst . head) d
|
||||
dupAccountNames = map (map snd) d
|
||||
d = dupes' l
|
||||
@ -1,8 +1,8 @@
|
||||
check-leafnames\
|
||||
check-dupes\
|
||||
Reports account names having the same leaf but different prefixes.
|
||||
In other words, two or more leaves that are categorized differently.
|
||||
Reads the default journal file, or another specified as an argument.
|
||||
|
||||
_FLAGS
|
||||
|
||||
An example: <http://stefanorodighiero.net/software/hledger-leafnames.html>
|
||||
An example: <http://stefanorodighiero.net/software/hledger-dupes.html>
|
||||
@ -1,4 +1,4 @@
|
||||
check-leafnames
|
||||
check-dupes
|
||||
Reports account names having the same leaf but different prefixes. In
|
||||
other words, two or more leaves that are categorized differently. Reads
|
||||
the default journal file, or another specified as an argument.
|
||||
@ -4,7 +4,7 @@ cabal-version: 1.12
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: a72cc42826939244f2ed9ce667f947ba98a85ac38914cf605de7413ade202776
|
||||
-- hash: 4517e1a53a08aa05c53bb06d8591b5591f3ae6f688bf39f809c8f774fbd1d41c
|
||||
|
||||
name: hledger
|
||||
version: 1.19.99
|
||||
@ -67,7 +67,7 @@ extra-source-files:
|
||||
Hledger/Cli/Commands/Balancesheetequity.txt
|
||||
Hledger/Cli/Commands/Cashflow.txt
|
||||
Hledger/Cli/Commands/Checkdates.txt
|
||||
Hledger/Cli/Commands/Checkleafnames.txt
|
||||
Hledger/Cli/Commands/Checkdupes.txt
|
||||
Hledger/Cli/Commands/Close.txt
|
||||
Hledger/Cli/Commands/Codes.txt
|
||||
Hledger/Cli/Commands/Commodities.txt
|
||||
@ -123,7 +123,7 @@ library
|
||||
Hledger.Cli.Commands.Balancesheetequity
|
||||
Hledger.Cli.Commands.Cashflow
|
||||
Hledger.Cli.Commands.Checkdates
|
||||
Hledger.Cli.Commands.Checkleafnames
|
||||
Hledger.Cli.Commands.Checkdupes
|
||||
Hledger.Cli.Commands.Close
|
||||
Hledger.Cli.Commands.Codes
|
||||
Hledger.Cli.Commands.Commodities
|
||||
|
||||
@ -1622,9 +1622,9 @@ _include_({{Hledger/Cli/Commands/Cashflow.md}})
|
||||
|
||||
_include_({{Hledger/Cli/Commands/Checkdates.md}})
|
||||
|
||||
## check-leafnames
|
||||
## check-dupes
|
||||
|
||||
_include_({{Hledger/Cli/Commands/Checkleafnames.md}})
|
||||
_include_({{Hledger/Cli/Commands/Checkdupes.md}})
|
||||
|
||||
## close
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ extra-source-files:
|
||||
- Hledger/Cli/Commands/Balancesheetequity.txt
|
||||
- Hledger/Cli/Commands/Cashflow.txt
|
||||
- Hledger/Cli/Commands/Checkdates.txt
|
||||
- Hledger/Cli/Commands/Checkleafnames.txt
|
||||
- Hledger/Cli/Commands/Checkdupes.txt
|
||||
- Hledger/Cli/Commands/Close.txt
|
||||
- Hledger/Cli/Commands/Codes.txt
|
||||
- Hledger/Cli/Commands/Commodities.txt
|
||||
@ -169,7 +169,7 @@ library:
|
||||
- Hledger.Cli.Commands.Balancesheetequity
|
||||
- Hledger.Cli.Commands.Cashflow
|
||||
- Hledger.Cli.Commands.Checkdates
|
||||
- Hledger.Cli.Commands.Checkleafnames
|
||||
- Hledger.Cli.Commands.Checkdupes
|
||||
- Hledger.Cli.Commands.Close
|
||||
- Hledger.Cli.Commands.Codes
|
||||
- Hledger.Cli.Commands.Commodities
|
||||
|
||||
Loading…
Reference in New Issue
Block a user