Skip to content

Commit

Permalink
Add quick introduction in README.
Browse files Browse the repository at this point in the history
The goal is to provide minimal information required for new users to
start using the command:
1. an exact command to install the package (I am new to python and I did
   not know how to do this)
1. simple command to fetch one stock, to ensure installation was
   successful
1. information about required `price` metadata in beancount file
1. infomration about --update flag to fetch most recent prices

I also added the command for the type checker that is used by the CI.

Refs beancount#33
  • Loading branch information
doriath committed Mar 23, 2021
1 parent 7622308 commit 5e79015
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,46 @@ This used to be located within Beancount itself (at v2) under beancount.prices.
This repo will contain all future updates to that script and to those price
sources.


## Documentation

Some documentation is still part of Beancount. More about how to use this can be
found on that [mailing-list](https://groups.google.com/forum/#!forum/beancount).
Otherwise read the source.

## Quick start

To install beanprice, run:

```shell
pip install git+https://github.com/beancount/beanprice.git
```

You can fetch the latest price of a stock by running:

```shell
bean-price -e 'USD:yahoo/AAPL'
```

To fetch the latest prices from your beancount file, first ensure that commodities have price metadata, e.g.

```
2000-01-01 commodity AAPL
price: "USD:yahoo/AAPL"
```

## Download & Installation
Then run:

You can obtain the source code from the official Git repository on Github:
```shell
bean-price ledger.beancount
```

| https://github.com/beancount/beanprice/
To update prices up to the present day, run:

```shell
bean-price --update ledger.beancount
```

Install using the usual pip incantation.
For more detailed guide for price fetching, read <https://beancount.github.io/docs/fetching_prices_in_beancount.html>.

## Testing

Expand All @@ -39,6 +64,12 @@ Lint:
pylint beanprice
```

Type checker:

```
mypy beanprice --ignore-missing-imports
```

## Copyright and License

Copyright (C) 2007-2020 Martin Blais. All Rights Reserved.
Expand Down

0 comments on commit 5e79015

Please sign in to comment.