1
0

osc copypac from project:devel:languages:haskell:ghc-9.6.x package:hledger-interest revision:3, using keep-link

OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/hledger-interest?expand=0&rev=32
This commit is contained in:
Peter Simons 2023-11-10 14:07:23 +00:00 committed by Git OBS Bridge
parent fb1f52e2c8
commit 99a28d8c0f

View File

@ -1,127 +1,127 @@
Name: hledger-interest Name: hledger-interest
Version: 1.6.6 Version: 1.6.6
x-revision: 1 x-revision: 1
Synopsis: computes interest for a given account Synopsis: computes interest for a given account
License: BSD3 License: BSD3
License-file: LICENSE License-file: LICENSE
Author: Peter Simons <simons@cryp.to> Author: Peter Simons <simons@cryp.to>
Maintainer: Peter Simons <simons@cryp.to> Maintainer: Peter Simons <simons@cryp.to>
Homepage: https://github.com/peti/hledger-interest Homepage: https://github.com/peti/hledger-interest
Category: Finance Category: Finance
Build-type: Simple Build-type: Simple
Cabal-version: >= 1.10 Cabal-version: >= 1.10
Extra-source-files: README.md Extra-source-files: README.md
Stability: stable Stability: stable
tested-with: GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, tested-with: GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7,
GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.7, GHC == 9.6.1 GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.7, GHC == 9.6.1
Description: Description:
hledger-interest is a small command-line utility based on Simon hledger-interest is a small command-line utility based on Simon
Michael's hleder library. Its purpose is to compute interest for a Michael's hleder library. Its purpose is to compute interest for a
given ledger account. Using command line flags, the program can be given ledger account. Using command line flags, the program can be
configured to use various schemes for day-counting, such as act\/act, configured to use various schemes for day-counting, such as act\/act,
30\/360, 30E\/360, and 30\/360isda. Furthermore, it supports a (small) 30\/360, 30E\/360, and 30\/360isda. Furthermore, it supports a (small)
number of interest schemes, i.e. annual interest with a fixed rate and number of interest schemes, i.e. annual interest with a fixed rate and
the scheme mandated by the German BGB288 (Basiszins fuer the scheme mandated by the German BGB288 (Basiszins fuer
Verbrauchergeschaefte). Extending support for other schemes is fairly Verbrauchergeschaefte). Extending support for other schemes is fairly
easy, but currently requires changes to the source code. easy, but currently requires changes to the source code.
. .
As an example, consider the following loan, stored in a file called As an example, consider the following loan, stored in a file called
@test.ledger@: @test.ledger@:
. .
> 2008/09/26 Loan > 2008/09/26 Loan
> Assets:Bank EUR 10000.00 > Assets:Bank EUR 10000.00
> Liabilities:Bank > Liabilities:Bank
> >
> 2008/11/27 Payment > 2008/11/27 Payment
> Assets:Bank EUR -3771.12 > Assets:Bank EUR -3771.12
> Liabilities:Bank > Liabilities:Bank
> >
> 2009/05/03 Payment > 2009/05/03 Payment
> Assets:Bank EUR -1200.00 > Assets:Bank EUR -1200.00
> Liabilities:Bank > Liabilities:Bank
> >
> 2010/12/10 Payment > 2010/12/10 Payment
> Assets:Bank EUR -3700.00 > Assets:Bank EUR -3700.00
> Liabilities:Bank > Liabilities:Bank
. .
Suppose that loan earns 5% interest per year, and payments amortize Suppose that loan earns 5% interest per year, and payments amortize
interest before amortizing the principal claim, then the resulting interest before amortizing the principal claim, then the resulting
ledger would look like this: ledger would look like this:
. .
> $ hledger-interest --file=test.ledger --source=Expenses:Interest --target=Liabilities:Bank --30-360 --annual=0.05 Liabilities:Bank > $ hledger-interest --file=test.ledger --source=Expenses:Interest --target=Liabilities:Bank --30-360 --annual=0.05 Liabilities:Bank
> 2008/09/26 Loan > 2008/09/26 Loan
> Assets:Bank EUR 10000.00 > Assets:Bank EUR 10000.00
> Liabilities:Bank > Liabilities:Bank
> >
> 2008/11/27 Payment > 2008/11/27 Payment
> Assets:Bank EUR -3771.12 > Assets:Bank EUR -3771.12
> Liabilities:Bank > Liabilities:Bank
> >
> 2008/11/27 5.00% interest for EUR -10000.00 over 61 days > 2008/11/27 5.00% interest for EUR -10000.00 over 61 days
> Liabilities:Bank EUR -84.72 > Liabilities:Bank EUR -84.72
> Expenses:Interest > Expenses:Interest
> >
> 2008/12/31 5.00% interest for EUR -6313.60 over 34 days > 2008/12/31 5.00% interest for EUR -6313.60 over 34 days
> Liabilities:Bank EUR -29.81 > Liabilities:Bank EUR -29.81
> Expenses:Interest > Expenses:Interest
> >
> 2009/05/03 Payment > 2009/05/03 Payment
> Assets:Bank EUR -1200.00 > Assets:Bank EUR -1200.00
> Liabilities:Bank > Liabilities:Bank
> >
> 2009/05/03 5.00% interest for EUR -6343.42 over 123 days > 2009/05/03 5.00% interest for EUR -6343.42 over 123 days
> Liabilities:Bank EUR -108.37 > Liabilities:Bank EUR -108.37
> Expenses:Interest > Expenses:Interest
> >
> 2009/12/31 5.00% interest for EUR -5251.78 over 238 days > 2009/12/31 5.00% interest for EUR -5251.78 over 238 days
> Liabilities:Bank EUR -173.60 > Liabilities:Bank EUR -173.60
> Expenses:Interest > Expenses:Interest
> >
> 2010/12/10 Payment > 2010/12/10 Payment
> Assets:Bank EUR -3700.00 > Assets:Bank EUR -3700.00
> Liabilities:Bank > Liabilities:Bank
> >
> 2010/12/10 5.00% interest for EUR -5425.38 over 340 days > 2010/12/10 5.00% interest for EUR -5425.38 over 340 days
> Liabilities:Bank EUR -256.20 > Liabilities:Bank EUR -256.20
> Expenses:Interest > Expenses:Interest
> >
> 2010/12/31 5.00% interest for EUR -1981.58 over 21 days > 2010/12/31 5.00% interest for EUR -1981.58 over 21 days
> Liabilities:Bank EUR -5.78 > Liabilities:Bank EUR -5.78
> Expenses:Interest > Expenses:Interest
. .
Running the utility with @--help@ gives a brief overview over the Running the utility with @--help@ gives a brief overview over the
available options: available options:
. .
> Usage: hledger-interest [OPTION...] ACCOUNT > Usage: hledger-interest [OPTION...] ACCOUNT
> -h --help print this message and exit > -h --help print this message and exit
> -V --version show version number and exit > -V --version show version number and exit
> -v --verbose echo input ledger to stdout (default) > -v --verbose echo input ledger to stdout (default)
> -q --quiet don't echo input ledger to stdout > -q --quiet don't echo input ledger to stdout
> --today compute interest up until today > --today compute interest up until today
> -f FILE --file=FILE input ledger file (pass '-' for stdin) > -f FILE --file=FILE input ledger file (pass '-' for stdin)
> -s ACCOUNT --source=ACCOUNT interest source account > -s ACCOUNT --source=ACCOUNT interest source account
> -t ACCOUNT --target=ACCOUNT interest target account > -t ACCOUNT --target=ACCOUNT interest target account
> -I --ignore-assertions ignore any failing balance assertions > -I --ignore-assertions ignore any failing balance assertions
> --act use 'act' day counting convention > --act use 'act' day counting convention
> --30-360 use '30/360' day counting convention > --30-360 use '30/360' day counting convention
> --30E-360 use '30E/360' day counting convention > --30E-360 use '30E/360' day counting convention
> --30E-360isda use '30E/360isda' day counting convention > --30E-360isda use '30E/360isda' day counting convention
> --constant=RATE constant interest rate > --constant=RATE constant interest rate
> --annual-schedule=SCHEDULE schedule of annual interest rates. > --annual-schedule=SCHEDULE schedule of annual interest rates.
> syntax: '[(Date1,Rate1),(Date2,Rate2),...]' > syntax: '[(Date1,Rate1),(Date2,Rate2),...]'
> --annual=RATE annual interest rate > --annual=RATE annual interest rate
> --bgb288 compute interest according to German BGB288 > --bgb288 compute interest according to German BGB288
Source-Repository head Source-Repository head
Type: git Type: git
Location: https://github.com/peti/hledger-interest.git Location: https://github.com/peti/hledger-interest.git
Executable hledger-interest Executable hledger-interest
default-language: Haskell2010 default-language: Haskell2010
Main-is: Main.hs Main-is: Main.hs
Build-depends: base >= 3 && < 5, hledger-lib >= 1.26 && < 1.32, time, mtl, Cabal, Decimal, text Build-depends: base >= 3 && < 5, hledger-lib >= 1.26 && < 1.32, time, mtl, Cabal, Decimal, text
other-modules: Hledger.Interest other-modules: Hledger.Interest
Hledger.Interest.DayCountConvention Hledger.Interest.DayCountConvention
Hledger.Interest.Rate Hledger.Interest.Rate
Paths_hledger_interest Paths_hledger_interest