cli accepts -n normalie
cicd / ci (push) Successful in 1m50s
Details
cicd / ci (push) Successful in 1m50s
Details
parent
188b31aa0c
commit
0eaeeec359
|
|
@ -9,5 +9,6 @@ type Config struct {
|
|||
Depth int
|
||||
Reverse bool
|
||||
NoExchanging bool
|
||||
Normalize bool
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"slices"
|
||||
"strings"
|
||||
|
||||
"gogs.inhome.blapointe.com/ana-ledger/src/ana"
|
||||
"gogs.inhome.blapointe.com/ana-ledger/src/ledger"
|
||||
)
|
||||
|
||||
|
|
@ -21,6 +22,7 @@ func Main() {
|
|||
fs.BoolVar(&config.Query.NoRounding, "no-rounding", false, "no rounding")
|
||||
fs.IntVar(&config.Query.Depth, "depth", 0, "depth grouping")
|
||||
fs.BoolVar(&config.Query.Reverse, "r", false, "reverse printed accounts")
|
||||
fs.BoolVar(&config.Query.Normalize, "n", false, "normalize with default normalizer")
|
||||
fs.BoolVar(&config.Query.NoExchanging, "no-exchanging", true, "omit currency exchanges")
|
||||
if err := fs.Parse(os.Args[1:]); err != nil {
|
||||
panic(err)
|
||||
|
|
@ -70,6 +72,10 @@ func Main() {
|
|||
}
|
||||
group := ledger.GroupName(pattern)
|
||||
|
||||
if config.Query.Normalize {
|
||||
deltas = ana.NewDefaultNormalizer().Normalize(deltas)
|
||||
}
|
||||
|
||||
switch cmd[:3] {
|
||||
case "bal":
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ func (router Router) APITransactions(w http.ResponseWriter, r *http.Request) {
|
|||
))
|
||||
recent := time.Hour * 24 * 365 / 6
|
||||
|
||||
normalizer := ana.NewDefaultNormalizer().
|
||||
normalizer := ana.NewDefaultNormalizer()
|
||||
|
||||
{
|
||||
deltas := houseRelatedDeltas.
|
||||
|
|
|
|||
Loading…
Reference in New Issue