GitXplorerGitXplorer
h

gnucash-tickers

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
289a0427780e80bde948d9059578c3d80f4d3ddc

Update README.md

hhades committed 8 months ago
Unverified
310c58564f5f31cbe73e06fff78c169397e5c0be

update README

hhades committed 8 months ago
Unverified
b2c71776361e519be5470b57b626295eec2f0ba7

fix package name in pyproject.toml

hhades committed 8 months ago
Unverified
ebbe2aebfbfc04ea9acf50af2d6d44cabf5161c5

implement the "add" command to add a ticker

hhades committed 8 months ago
Unverified
983e044d2cd6e4dc25dfd7258fcf3fae4ca3a0bf

Initial commit

hhades committed 8 months ago

README

The README file for this repository.

Gnucash Tickers

This is a command-line tool to manipulate the Securities Database in Gnucash books. Currently it supports listing securities, and adding a new security by fetching its data by ISIN.

Prerequisites

To run this tool, you will need the following:

  • Python bindings for Gnucash,
  • Poetry.

Since Gnucash is not added explicitly as a dependency on this package, you will have to enable system site packages access in Poetry:

$ poetry config virtualenvs.options.system-site-packages true

Distribution-Specific Instructions

Feel free to add instructions for your operating system.

Ubuntu:

$ sudo apt-get install python3-gnucash python3-poetry gnucash
$ poetry config virtualenvs.options.system-site-packages true
$ poetry install --without=dev

Running

Listing tickers in a book:

$ poetry run python -m tickers list book.gnucash -v
+--------------+-------------------------------------------+--------+----------------+--------------+-----------+
| Namespace    | Name                                      | Symbol | Display Symbol | ISIN         | Fraction  |
+--------------+-------------------------------------------+--------+----------------+--------------+-----------+
| template     | template                                  |        | template       | template     | 1/1       |
| Currencies   | Andorran Franc                            |        || 950          | 1/100     |
...

Adding a ticker by its ISIN:

$ poetry run python -m tickers add test.gnucash US6903701018
+-----------+----------------+--------+----------------+----------------+----------+
| Namespace | Name           | Symbol | Display Symbol | ISIN           | Fraction |
+-----------+----------------+--------+----------------+----------------+----------+
| NYQ       | Beyond, Inc.   | BYON   | BYON           | US6903701018   | 1/10000  |
+-----------+----------------+--------+----------------+----------------+----------+
Do you want to add this security? (yes/no) [no] y

Developing

Please install the pre-commit hooks to make sure your code passes my very high quality standards. /s

$ poetry install --with=dev
$ poetry run pre-commit install

Add unit tests for all new code.