diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2016-03-01 23:34:05 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-03-01 23:34:05 +0100 |
commit | 413051037749da90f03055bcd305c82b1ee90afd (patch) | |
tree | db3df6acc3037eb6a8e02e6345908f7b94c3cb33 /wikifolio-plot-trades | |
parent | 31ec72ec239656655c3c1bab84efcca01b7fdd6c (diff) | |
download | wikifolio-rss-413051037749da90f03055bcd305c82b1ee90afd.tar.gz wikifolio-rss-413051037749da90f03055bcd305c82b1ee90afd.zip |
Add script to read trades
Diffstat (limited to 'wikifolio-plot-trades')
-rwxr-xr-x | wikifolio-plot-trades | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/wikifolio-plot-trades b/wikifolio-plot-trades new file mode 100755 index 0000000..3bd53dc --- /dev/null +++ b/wikifolio-plot-trades @@ -0,0 +1,16 @@ +#!/usr/bin/python3 +import os +import sys +import logging + +import wikifolio + +logging.basicConfig(level=logging.INFO) + +if len(sys.argv) == 2 and os.path.exists(sys.argv[1]): + filename = sys.argv[1] + name, _ = os.path.splitext(filename) + cert = wikifolio.get_id_from_name(name) + trades = wikifolio.get_trades(cert) + for trade in trades: + print(repr(trade)) |