GithubHelp home page GithubHelp logo

jrm2k6 / contwidgetor Goto Github PK

View Code? Open in Web Editor NEW
27.0 3.0 1.0 65 KB

Displays your contributions from Github and Bitbucket

License: MIT License

JavaScript 97.80% HTML 2.20%
github bitbucket react contributions-discover

contwidgetor's Introduction

Contwidgetor

##What is it?

Github is great to show you all your contributions as a timeline. Bitbucket doesn't have any of this. I use mainly Github for my open-source projects but also use a bit of Bitbucket for some other projects that I consider more private. I still want to show that I am contibuting even if it is not on Github. It is in my opinion important to show that you are passionate about programming when you are looking for a new job for example.

Contwidgetor (still looking for a better name) will display a grid showing all your contributions for the past year (commits only). It merges your contributions from Github and Bitbucket.

Installation

npm install contwidgetor

Setup

You need to create a .env file at the root of your project. You just need to fill some simple properties.

You can see the .env.example provided in the repo to have an idea of what to put in it.

What if I don't have the right tokens?

For Github, go to creating an API token

For Bitbucket, go to create a consumer

API

There is only 3 methods provided by the package:

fetchContributions: will fetch your contributions from Bitbucket and Github and store the results in an in-memore database.

getContributionsTimeline: will create a JSON file (from the filename provided in the .env file) containing your contributions

getContributionsGridWidget: will create the grid UI component depending or not on the existence of the JSON file containing your contributions. This will return a React component that you can rendered server side (it won't contain any interaction though).

Contwidgetor-ui package

contwidgetor-ui is the package providing the React components to display the grid. It is still in development but you can check out the example of this package to know how to use it on the client side, and providing your own JSON object representing your contributions.

Example

You can run the example provided in this package. You just have to modify the cli.js example to call the method you want. You need to create your .env file first.

To run the example:

cd Example
npm install
node cli.js

If you have generated your JSON file:

webpack
open index.html

contwidgetor's People

Contributors

jrm2k6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

skapeyi

contwidgetor's Issues

contwigetor is not in the npm registry

Hi,
I'm trying to use this project but when I try to install it, it gives me this error:

npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "contwigetor"
npm ERR! node v0.10.47
npm ERR! npm v2.15.1
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/contwigetor
npm ERR! 404
npm ERR! 404 'contwigetor' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR! /home/valter/npm-debug.log

Can you please advise ?

Thank you!

Duplicate data property in object literal not allowed in strict mode

Hi,
I'm trying your example and is given me this message:

valter@legion:~/git/test/contwidgetor/Example$ sudo node cli.js

/home/valter/node_modules/contwidgetor/node_modules/contwidgetor-ui/lib/ui/grid.js:88
            'color': '#aaa',
            ^^^^^^^
SyntaxError: Duplicate data property in object literal not allowed in strict mode
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/valter/node_modules/contwidgetor/node_modules/contwidgetor-ui/lib/index.js:3:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Can you please advise ?

Best regards,
Valter Henrique.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.