Uh oh!
There was an error while loading. Please reload this page.
AccountStats Plugin - #349
Conversation
rnevet
commented
May 22, 2017
Related to #240 |
| ~~~~~~~~~~~~~~~~~~~ | ||
| The AccountStats plugin fetches all your loan history and provides statistics based on it. | ||
| Current implementation sends a earnings summery Notification (see Notifications sections) every 24hr. |
There was a problem hiding this comment.
My classic typo. Thanks!
| def get_plugins_config(): | ||
| active_plugins = [] | ||
| if config.has_option("BOT", "plugins"): | ||
| active_plugins = config.get("BOT", "plugins").split(',') |
There was a problem hiding this comment.
Probably also want to strip values in case user puts spaces between plugin names.
| # noinspection PyAttributeOutsideInit | ||
| def init_db(self): | ||
| self.db = sqlite3.connect(r'market_data\loan_history.sqlite3') |
There was a problem hiding this comment.
That r looks like a typo, can't find reference to it in the docs.
Unless it means "relative" to current directory?
There was a problem hiding this comment.
it indicates a raw string - so \ don't need to be escaped. :)
https://docs.python.org/2.0/ref/strings.html
There was a problem hiding this comment.
You should use / as path separator (work on any system). Or os.path.join().
rnevet
commented
May 26, 2017
@Evanito did you run the notification, was the total earnings calculation correct? |
- Created Plugin system, allowing user to define which Plugins are loaded from config file - Started implementation of AccountStats (fetching history)
Split Plugin events to before and after lending
Added notify event (every cycle at the moment)
Typo in docs
Evanito
commented
May 26, 2017
It resorts to scientific notation if you only get a few satoshi in the past 24hrs, but otherwise worked like a charm. I was unable to install |
Evanito
commented
May 26, 2017
Shouldn't you add the |
I was thinking to stop adding optional setting to the example config, what do you think? |
Reno007
commented
May 28, 2017
Cool that this has now been merged! I have added the relevant line in the config file but am not getting the notification (have telegram enabled). Am I supposed to wait 24 hours? Anything else to enable? |
rnevet
commented
May 28, 2017
Place the plugins line under config [BOT], the implementation is spamming you'll notice it's working |
Description
Implemented a plugins structure, first plugin is AccountStats.
AccountStats fetches your loans history and provides a Daily Earnings Notification
TESTING STAGE
In progress, currently seeing mismatching results when compared to exported CSV data.
Types of changes
Checklist: