CoinStats - A NodeJS Cryptocurrency Statistic Bot - New Graph & Cleaning output folder
CoinStats
What feature(s) did you add?
Changelog:
- Added a new overview graph, showing the percentage change of the last 7 days for each coin
- Added a new config option to toggle auto posting to steemit
- Added a cleanup function and utils class to remove all images after uploading
- Graphs now have a title
How did you implement it/them?
The new utils.js which uses the file system to remove all images:
var fs = require('fs');
var clearImgFolder = function () {
var path = './img';
if (fs.existsSync(path)) {
fs.readdirSync(path).forEach(function(file, index){
var filePath = path + "/" + file;
fs.unlinkSync(filePath);
});
}
}
module.exports = {
clearImgFolder: clearImgFolder,
}
The new graph is done by changing the graphdata and the config.json got a new key 'should_post_to_steemit' which defaults to true.
if (!config.should_post_to_steemit) {
console.log('Not uploading to Steemit - Abort');
return;
}
Roadmap
- V.0.3:
- Bar Charts shows only percentage change over last week
- Toggle Steemit auto posting via config
- Clearing img/ folder after upload
- V.0.4:
- Layout changes
- V.1.0:
- More information (e.g different Charts for each Coin)
- Running on a Server and automatically post every day
- Custom messages for the coins
Proof for GitHub
benediktveith is my main GitHub account.
Check here for another proof
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Hey @moonrise I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x