sbipf reporter CLI
Project description
sbipf-reporter
SBI証券のポートフォリオCSVからレポートを生成するCLIツール。
機能
- SBI証券CSVのパース(Shift-JIS / UTF-8 自動判別)
- 3形式のレポート出力: ターミナル(rich) / Markdown / CSV
- 11列・10列のCSVフォーマット両対応
- 口座区分(特定・NISA成長・NISAつみたて)の自動分類
- 投資信託にも対応
インストール
pip install sbipf-reporter
使い方
# ターミナル表示(デフォルト)
sbipf-reporter report path/to/portfolio.csv
# Markdown出力
sbipf-reporter report path/to/portfolio.csv --format md --output portfolio.md
# CSV出力
sbipf-reporter report path/to/portfolio.csv --format csv --output portfolio.csv
# バージョン確認
sbipf-reporter version
出力例
SBI証券ポートフォリオ
┌──────┬──────────────┬──────────┬──────┬──────────┬──────────┬────────────┬──────────────┬──────────┐
│ コード │ 銘柄名 │ 口座 │ 数量 │ 取得単価 │ 現在値 │ 評価額 │ 損益 │ 損益率 │
├──────┼──────────────┼──────────┼──────┼──────────┼──────────┼────────────┼──────────────┼──────────┤
│ 6758 │ ソニー │ 特定 │ 50 │ ¥9,850 │ ¥10,240 │ ¥512,000 │ ¥+1,950 │ +1.98% │
│ 7203 │ 新日鉄 │ NISA(成長)│ 200 │ ¥695 │ ¥742 │ ¥148,400 │ ¥+9,400 │ +13.52% │
│ ... │ │ │ │ │ │ │ │ │
├──────┴──────────────┴──────────┴──────┴──────────┴──────────┴────────────┴──────────────┴──────────┤
│ 合計: 保有数 16件, 総資産 ¥15,798,700, 損益 +¥563,700 (+3.70%) │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
対応CSVフォーマット
SBI証券のポートフォリオCSVには2種類のフォーマットがあり、自動判別します。
| フォーマット | 列数 | 特徴 |
|---|---|---|
| 11列版 | 11 | 参考単価を含む従来フォーマット |
| 10列版 | 10 | 参考単価なしの新しいフォーマット |
エンコーディングは UTF-8(BOM有無どちらも)・Shift-JIS を自動判別します。
開発
git clone https://github.com/Chronona/sbipf-reporter.git
cd sbipf-reporter
pip install -e ".[dev]"
pytest
ライセンス
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sbipf_reporter-0.4.2.tar.gz
(11.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sbipf_reporter-0.4.2.tar.gz.
File metadata
- Download URL: sbipf_reporter-0.4.2.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56829152594660c1cb1e80cae48af08ae0431fbf8dd94c9c3a8dc3f3c52f8643
|
|
| MD5 |
2c25824d516ee8f6a57d85f523c18726
|
|
| BLAKE2b-256 |
a85246491d1276162302887f9a692bb9c7099f9324bfbfa87cc5cbe12720fdf3
|
File details
Details for the file sbipf_reporter-0.4.2-py3-none-any.whl.
File metadata
- Download URL: sbipf_reporter-0.4.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f71a213cb10fe451c47408b781ecd656e8b77a938672cd6e10aca4a93ac800
|
|
| MD5 |
fd7e27b5fa03ef7d545bc87c593c6034
|
|
| BLAKE2b-256 |
3494bc573b7697fa1b8eb1f9bcd8f552b74e07ffad260ec96a20b83b0e9734f0
|