Skip to content

Commit a0c7458

Browse files
committed
Show supported financial institutions in help
1 parent a3c1735 commit a0c7458

File tree

5 files changed

+42
-18
lines changed

5 files changed

+42
-18
lines changed

README.md

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Beancount Multitool
22

33
![Tests badge](https://github.com/rlan/beancount-multitool/actions/workflows/tests.yml/badge.svg)
4-
![python version required](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Frlan%2Fbeancount-multitool%2Fmain%2Fpyproject.toml)
4+
![pypi version](https://img.shields.io/pypi/v/beancount-multitool
5+
)
6+
![python version required](https://img.shields.io/pypi/pyversions/beancount-multitool
7+
)
58
![static coverage badge](https://img.shields.io/badge/Coverage-97%25-blue)
69

710
Beancount Multitool is a command-line-interface (CLI) tool that converts financial data from financial institutions to Beancount files.
@@ -25,15 +28,25 @@ What these scripts __can not__ (yet) do:
2528

2629
* Label transactions with different sub-accounts, e.g., `Expenses:JP:Food:Grocery` or `Expenses:JP:Food:Restaurant`.
2730

31+
Installation:
32+
33+
```sh
34+
pip install beancount-multitool
35+
```
36+
2837
Usage:
2938

39+
```sh
40+
bean-mt --help
41+
```
42+
3043
```txt
31-
$ bean-mt --help
3244
Usage: bean-mt [OPTIONS] NAME CONFIG DATA
3345
3446
Read financial data and output a Beancount file.
3547
36-
NAME is the name of the financial institution, e.g. RakutenBank.
48+
NAME is the name of the financial institution. See Note below for a list of
49+
supported names.
3750
3851
CONFIG is a .toml file with run-time configurations, e.g. config.toml.
3952
@@ -43,6 +56,9 @@ Options:
4356
--output PATH Resulting Beancount file
4457
--version Show the version and exit.
4558
--help Show this message and exit.
59+
60+
Note: supported names of financial institutions: ['ja_bank', 'rakuten_bank',
61+
'rakuten_card', 'shinsei_bank']
4662
```
4763

4864
Example:
@@ -62,12 +78,6 @@ config.toml:
6278

6379
There is a default config.toml per financial institutions. Examples are in the test [data folder](./tests/data/).
6480

65-
## Installation
66-
67-
```sh
68-
pip install beancount-multitool
69-
```
70-
7181
## Requirements
7282

7383
* Python 3.9 or higher.

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
0.2.0
4+
5+
* Show a list of supported financial institutions in --help.
6+
37
0.1.0
48

59
* Initial version.

pyproject.toml

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
[tool.poetry]
22
name = "beancount-multitool"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "A CLI tool that converts financial data to Beancount files"
5-
authors = ["Rick Lan"]
5+
authors = ["Rick Lan <[email protected]>"]
66
license = "MIT"
77
readme = "README.md"
88
repository = "https://github.com/rlan/beancount-multitool"
9+
classifiers = [
10+
"Development Status :: 4 - Beta",
11+
"Framework :: Pytest",
12+
"Intended Audience :: Financial and Insurance Industry",
13+
"License :: OSI Approved :: MIT License",
14+
"Natural Language :: English",
15+
"Natural Language :: Japanese",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python :: 3",
18+
"Topic :: Office/Business :: Financial :: Accounting",
19+
"Topic :: Office/Business :: Financial :: Investment",
20+
"Topic :: Text Processing :: General",
21+
"Topic :: Utilities",
22+
]
923

1024
[tool.poetry.dependencies]
1125
python = "^3.9"
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.0"
1+
__version__ = "0.2.0"

src/beancount_multitool/cli.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def validate_name(ctx, param, value):
1717
else:
1818
raise click.BadParameter(f"Name must be one of: {__INSTITUTIONS__}")
1919

20-
@click.command()
20+
@click.command(epilog=f"Note: supported names of financial institutions: {__INSTITUTIONS__}")
2121
@click.argument('name', type=str, callback=validate_name)
2222
@click.argument('config', type=click.Path(exists=True))
2323
@click.argument('data', type=click.Path(exists=True))
@@ -26,16 +26,12 @@ def validate_name(ctx, param, value):
2626
def main(name: str, config, data, output):
2727
"""Read financial data and output a Beancount file.
2828
29-
NAME is the name of the financial institution, e.g. RakutenBank.
29+
NAME is the name of the financial institution. See Note below for a list of supported names.
3030
3131
CONFIG is a .toml file with run-time configurations, e.g. config.toml.
3232
3333
DATA is the raw financial data downloaded from NAME, e.g. input.csv.
3434
"""
35-
#click.echo(name)
36-
#click.echo(data)
37-
#click.echo(config)
38-
#click.echo(output)
3935
if name == JABank.NAME:
4036
tool = JABank(config)
4137
elif name == RakutenBank.NAME:

0 commit comments

Comments
 (0)