Example Script to read historic stock data into gnucash.
More...
Go to the source code of this file.
Variables |
|
string | quotes_historic::FILE = "./test.gnucash" |
|
string | quotes_historic::url = "xml://" |
|
tuple | quotes_historic::f = open('INTC') |
|
list | quotes_historic::data = [] |
|
tuple | quotes_historic::tmp = f.readline() |
|
list | quotes_historic::stock_date = [] |
|
list | quotes_historic::stock_price = [] |
|
tuple | quotes_historic::year = int(data[i].rsplit(',')[1].rsplit('/')[0]) |
|
tuple | quotes_historic::month = int(data[i].rsplit(',')[1].rsplit('/')[1]) |
|
tuple | quotes_historic::day = int(data[i].rsplit(',')[1].rsplit('/')[2]) |
|
tuple | quotes_historic::session = Session(url, True, False, False) |
|
tuple | quotes_historic::root = session.book.get_root_account() |
|
| quotes_historic::book = session.book |
|
tuple | quotes_historic::account = book.get_root_account() |
|
tuple | quotes_historic::pdb = book.get_price_db() |
|
tuple | quotes_historic::comm_table = book.get_table() |
|
tuple | quotes_historic::ac = find_account(account,'Intel') |
|
tuple | quotes_historic::stock = ac.GetCommodity() |
|
tuple | quotes_historic::cur = ac.GetSplitList() |
|
tuple | quotes_historic::pl = pdb.get_prices(stock,cur) |
|
list | quotes_historic::pl0 = pl[0] |
|
tuple | quotes_historic::p_new = pl0.clone(book) |
|
tuple | quotes_historic::v = p_new.get_value() |
Detailed Description
Example Script to read historic stock data into gnucash.
- Author:
- Peter Holtermann
- Date:
- January 2011
Call the perl-script
first to achieve data into file INTC which can thereafter be imported to GnuCash using this script.
For explanation of use have a look at the wiki: http://wiki.gnucash.org/wiki/Stocks/get_prices
Definition in file quotes_historic.py.