CoinStats - A NodeJS Cryptocurrency Statistic Bot - New Graph & Cleaning output folder

in #utopian-io6 years ago (edited)

wallpaper.png

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
    overall_graph
  • 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

Screen Shot 2018-02-23 at 10.47.12.png

benediktveith is my main GitHub account.
Check here for another proof



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

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

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 63974.07
ETH 3426.40
USDT 1.00
SBD 2.54