-
Committer:
yacinechaouche at yahoo
-
Date:
2013-11-02 22:00:24 UTC
-
Revision ID:
yacinechaouche@yahoo.com-20131102220024-tc4htquxdv7b79mg
* added a preliminary show history/progression/variations/chart/plot (all aliases) function : for now it only shows progression of prices for the products in one chart, but in the future each product will have its own chart.
Changes in fortune.py
- Added a new period attribute for Game (period = season + year)
- do_show accepts new arguments (all aliases) : history/progression/variations/chart/plot
- Stock now has its own History instance for tracking price changes records
- Stock.add_item and Market.variate_price have been modified to accomodate price changes tracking in History
- new Stock.show_variation() method which opens a PDF containing the line charts.
- Added a new History class, used by Stock, which has 3 methods, two of which are used for the moment : add_price and get_prices. The unused one is get_item_prices
Changes in utils.py
new Plotter class, which takes a period at init time but must be fed with successve calls to add_line(product_name,price_list). The two exposed methods of Plotter is add_line and show(). All other methods are used internally (and thus should be underscored...)