Giter VIP home page Giter VIP logo

github-contributions's Introduction

gh-contributions

$ gh-contributions

Support me on Patreon Buy me a book PayPal Ask me anything Version Downloads Get help on Codementor

Buy Me A Coffee

A tool that generates a repository which being pushed into your GitHub account creates a nice contributions calendar.

Installation

Global installation

Ensure you configured NPM and NodeJS not to require sudo when installing packages globally.

$ npm i -g gh-contributions

To start the GitHub contributions server, do:

$ gh-contributions

Notes for installing on Windows

For this application to work well on Windows, Git must be installed with the option to put it in PATH enabled, like in this screenshot:

If Git is not installed with this option selected, gh-contributions will not be able to generate the repository.

Local installation

$ git clone git@github.com:IonicaBizau/github-contributions.git
$ cd github-contributions
$ npm i
$ npm start

Usage

The server runs on the 9000 port. Open http://localhost:9000/ in your browser.

Check the help information on the app page (http://localhost:9000), after you start the app.

Running Server Inside Docker Container

You will need to use a version lower than 3.0.0 to run this in Docker. Currently this is not supported anymore.

Build Docker container locally:

docker build -t github-contributions .

Start Docker container:

docker run --rm -it -p 127.0.0.1:9000:9000 --name=github-contributions-server github-contributions

Open http://localhost:9000/ in your browser.

❓ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. πŸ›
  3. For direct and quick help, you can use Codementor. πŸš€

πŸ˜‹ How to contribute

Have an idea? Found a bug? See how to contribute.

πŸ’– Support my projects

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like πŸš€

  • Buy me a bookβ€”I love books! I will remember you after years if you buy me one. 😁 πŸ“–

  • PayPalβ€”You can make one-time donations via PayPal. I'll probably buy a coffee tea. 🍡

  • Support me on Patreonβ€”Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).

  • Bitcoinβ€”You can send me bitcoins at this address (or scanning the code below): 1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6

Thanks! ❀️

πŸ’« Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

  • auto-contribution

πŸ“œ License

MIT © Ionică Bizău

github-contributions's People

Contributors

adrianmoisey avatar aleen42 avatar angelkitty avatar codeandrop avatar comfreek avatar czerasz avatar dependabot[bot] avatar guilhermesad avatar ionicabizau avatar ipy avatar nylen avatar ralt avatar silviubogan avatar tkovs avatar whoami-shubham 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

github-contributions's Issues

Special characters?

First I would like to thank you for this tool, I have a lot of fun with it :)

I'd like to know if it's possible to use the Generate data from text button with special characters?

I understand this could be hard to implement, but I'd like to know if there's a workaround, especially for the heart character. For example, I'd like to write "I β™₯ GITHUB".

Thanks for your help!

Remove index.html

Remove index.html and files used only by it.
Then rename gh-index.html to index.html.

Time

Hi,

I was wondering, does it take time to see the "art" on our github ?
Or maybe i've done something wrong... :(

Max.

Random contributions

Would be nice to generate random contributions (random commits per day) so the graph would look more exciting. πŸ’₯

I think this is strongly related to #37–we have to support specific days count.

Like always, contributions are welcome! πŸ’«
Make sure you leave a comment before starting implementing such a thing, just in case somebody else wants to build it too. ❇️

Use ISO 8601 or RFC 2822 instead of unix timestamp

It would be good to migrate the unix timestamp dates to IS 8601 or RFC 2822 formats.

git commit --help helps us:

  • RFC 2822
    The standard email format as described by RFC 2822, for example Thu, 07 Apr 2005 22:13:13 +0200.
  • ISO 8601
    Time and date specified by the ISO 8601 standard, for example 2005-04-07T22:13:13. The parser accepts a space instead of the T character as well.
    Note
    In addition, the date part is accepted in the following formats: YYYY.MM.DD, MM/DD/YYYY and DD.MM.YYYY.

Average archiving time?

I'm stuck at Archiving the repository. This may take a while. Please wait... since about 40 minutes, is it normal? I tried to generate 250 commit per day. I'm just wondering if the waiting time is normal or if it's some sort of bug. Thanks :)

Here's my json file:

{
    "coordinates": [
        {
            "x": 3,
            "y": 2
        },
        {
            "x": 3,
            "y": 3
        },
        {
            "x": 3,
            "y": 4
        },
        {
            "x": 3,
            "y": 5
        },
        {
            "x": 3,
            "y": 6
        },
        {
            "x": 4,
            "y": 6
        },
        {
            "x": 5,
            "y": 6
        },
        {
            "x": 7,
            "y": 2
        },
        {
            "x": 8,
            "y": 2
        },
        {
            "x": 9,
            "y": 2
        },
        {
            "x": 7,
            "y": 3
        },
        {
            "x": 7,
            "y": 4
        },
        {
            "x": 8,
            "y": 4
        },
        {
            "x": 7,
            "y": 5
        },
        {
            "x": 7,
            "y": 6
        },
        {
            "x": 8,
            "y": 6
        },
        {
            "x": 9,
            "y": 6
        },
        {
            "x": 11,
            "y": 2
        },
        {
            "x": 12,
            "y": 2
        },
        {
            "x": 13,
            "y": 2
        },
        {
            "x": 11,
            "y": 3
        },
        {
            "x": 11,
            "y": 4
        },
        {
            "x": 12,
            "y": 4
        },
        {
            "x": 11,
            "y": 5
        },
        {
            "x": 11,
            "y": 6
        },
        {
            "x": 15,
            "y": 2
        },
        {
            "x": 16,
            "y": 2
        },
        {
            "x": 17,
            "y": 2
        },
        {
            "x": 15,
            "y": 3
        },
        {
            "x": 17,
            "y": 3
        },
        {
            "x": 15,
            "y": 4
        },
        {
            "x": 17,
            "y": 4
        },
        {
            "x": 15,
            "y": 5
        },
        {
            "x": 17,
            "y": 5
        },
        {
            "x": 15,
            "y": 6
        },
        {
            "x": 16,
            "y": 6
        },
        {
            "x": 17,
            "y": 6
        },
        {
            "x": 19,
            "y": 2
        },
        {
            "x": 21,
            "y": 2
        },
        {
            "x": 19,
            "y": 3
        },
        {
            "x": 21,
            "y": 3
        },
        {
            "x": 20,
            "y": 4
        },
        {
            "x": 20,
            "y": 5
        },
        {
            "x": 20,
            "y": 6
        }
    ],
    "commitsPerDay": 250
}

Problems when installing on Windows

Hi,

I am having problems installing it in Windows. I read through the installation guide and tried to download and install it through PowerShell and Cygwin. In both I get errors.

In: * PowerShell it does not recognise the wget or curl . Also the -qO- in the wget command throws an error.
* In Cygwin, the installer works, but I think there is something wrong with Node?

Thanks,

Sebie

(Also, can you tag it with "Question" ? I think that is the appropriate label..)

Cannot read property 'date' of undefined

Listening on localhost:9000
C:\Strategy\github-contributions\lib\contributions\calendar.js:101
options.dates.push(year[cPoint.x - 1][cPoint.y - 1].date);
^

TypeError: Cannot read property 'date' of undefined
at module.exports (C:\Strategy\github-contributions\lib\contributions\calendar.js:101:60)
at module.exports (C:\Strategy\github-contributions\lib\contributions\index.js:48:5)
at Socket. (C:\Strategy\github-contributions\lib\client_handler\index.js:73:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at C:\Strategy\github-contributions\node_modules\socket.io\lib\socket.js:503:12
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)

npm ERR! Windows_NT 10.0.16193
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./lib/server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node ./lib/server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gh-contributions package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs gh-contributions
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls gh-contributions
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\yutia\AppData\Roaming\npm-cache_logs\2017-05-28T04_11_17_465Z-debug.log

Date commit not exact

This is the image created in the node server:

untitled

But the this is generated instead:

git

The whole data is shifted up by one layer(till March ).

Guess the dates need to be fixed.

Anyways, awesome work @IonicaBizau !

Suggestion: Single commit everyday

I'm not sure if this suggestion is realistic but would it be possible to create a single commit every day so our graph looks "full"?

For example, here's how my graph looks with this tool:

Example 1

Here's how it could look with my suggestion:

Example 1

Thanks again :)

npm error on install: Couldn't read dependencies

OS X Lion 10.7.4
Node v0.8.19

Console:

...
inflating: github-contributions-master/samples/I-love-Github.json
inflating: github-contributions-master/samples/happy-2014.json
inflating: github-contributions-master/server.js
mv: rename gh-contributions-master/* to ./*: No such file or directory
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/Users/guilherme/gh-contributions/package.json'
...
npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/guilherme/gh-contributions
npm ERR! node -v v0.8.19
npm ERR! npm -v 1.1.71
npm ERR! path /Users/guilherme/gh-contributions/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/guilherme/gh-contributions/npm-debug.log
npm ERR! not ok code 0
Sucessfully installed. Please type: cd ~/gh-contributions
Bye!

Not any additional info on npm-debug.log

package dependences

It seems that it requires at least these four packages: colors & underscore & statique & socket.io. We should use sudo npm install to install the above packages.

Perhaps you can make it clear all the dependences it needs in README.md so that we can download and install all the dependences before we install your packages. That would be better.

Too large cost

  • when setting the value of "commitsPerDay" to over 200, it'll has been over 5 hours to generate, but without any responses.

Add process config function

There must be a function that sets the default configuration values.

Also, in this function we must set the objects to avoid Cannot read ... of undefined errors.

Failure to generate repo on Windows

I tried to generate the repo, but the box popped up with this:

Error: Error: ENOENT, mkdir 'C:\Users\Kenzie Togami\AppData\Roaming\npm\node_modules\gh-contributions\lib\public\repos\hhv8llxnxh41jor'

Date commit not correct

Somehow the commit date in github is not the same with the one when I create it.

It suppose to be like this,

alt text

But after push to github, it become like this
alt text

The date was shifted a day before. Commit that suppose to be on 11 August goes to 10 August.

Currently I'm in UTC+0800 region.

Method setStaticServer not found

OS X Mavericks 10.9.2
Node version: v0.10.28

SITYAGI:gh-contributions siddharth_tyagi$ node server.js 

/Users/siddharth_tyagi/gh-contributions/server.js:9
JohnnysStatic.setStaticServer({root: "./public"});
              ^
TypeError: Object #<Object> has no method 'setStaticServer'
    at Object.<anonymous> (/Users/siddharth_tyagi/gh-contributions/server.js:9:15)
    at Module._compile (module.js:456:26)
    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 Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

error: undefined

#12 (comment)

The repository is not getting generated even though the web interface shows the generation is complete. Console stuck on "exec error: undefined".

screen shot 2014-05-05 at 9 55 54 pm

Console:

SITYAGI:gh-contributions siddharth_tyagi$ node server.js 
Listening on 9000
/css/gh-style.css - OK
/js/index.js - OK
/bootstrap/js/bootstrap.min.js - OK
/js/jquery.min.js - OK
/css/github.css - OK
/bootstrap/css/bootstrap.min.css - OK
exec error: undefined
exec error: undefined
exec error: undefined
exec error: undefined
exec error: undefined
exec error: undefined
exec error: undefined
exec error: undefined
exec error: undefined

Bug: Cannot read property 'date' of undefined

OS: Windows
Node Ver: 10.x

Console outputs:

C:\Users\Luke Shiels\gh-contributions>npm start

> gh-contributions@0.0.0 start C:\Users\Luke Shiels\gh-contributions
> node server.js

Listening on 9000
/css/gh-style.css - Not Modified
/js/jquery.min.js - Not Modified
/bootstrap/js/bootstrap.min.js - Not Modified
/js/index.js - Not Modified
/bootstrap/css/bootstrap.min.css - Not Modified
/css/github.css - Not Modified

C:\Users\Luke Shiels\gh-contributions\contributions.js:60
            options.dates.push(year[p.x - 1][p.y - 1].date);
                                                     ^
TypeError: Cannot read property 'date' of undefined
    at Object.module.exports.getRepo (C:\Users\Luke Shiels\gh-contributions\co
ributions.js:60:54)
    at C:\Users\Luke Shiels\gh-contributions\server.js:53:27
    at IncomingMessage.<anonymous> (C:\Users\Luke Shiels\gh-contributions\serv
.js:107:13)
    at IncomingMessage.EventEmitter.emit (events.js:92:17)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

npm ERR! gh-contributions@0.0.0 start: `node server.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the gh-contributions@0.0.0 start script.
npm ERR! This is most likely a problem with the gh-contributions package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls gh-contributions
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\n
ejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\Users\Luke Shiels\gh-contributions
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Luke Shiels\gh-contributions\npm-debug.log
npm ERR! not ok code 0

C:\Users\Luke Shiels\gh-contributions>

The client on the browser just says: Error: undefined.

Not working with statique 4.0.0

I can't get github-contributions to work with statique 4.0.0. I get the following error:

adrian@yoshi:~/github-contributions$ node server.js 

/Users/adrian/github-contributions/server.js:9
Statique.server({root: __dirname + "/public"})
         ^
TypeError: Object function (options) {
    var self = this;
    self._routes = {};
    self._regexpRoutes = [];
    Api(self);
    return self.server(options);
} has no method 'server'
    at Object.<anonymous> (/Users/adrian/github-contributions/server.js:9:10)
    at Module._compile (module.js:456:26)
    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 Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

After downgrading to statique 0.3.7 it works again.

Why?

GitHub already has this. Why does this exist?

"Uncaught ReferenceError: $day is not defined" when cursor moves over a cell

Get this in both the latest Chrome and Edge versions. Everything else aside from the "smooth" painting and erasing modes seem to work despite the errors.

index.js:266 Uncaught ReferenceError: $day is not defined
    at SVGRectElement.<anonymous> (index.js:266)
    at SVGRectElement.handle (jquery.min.js:1382)
    at HTMLDocument.dispatch (jquery.min.js:1316)
    at HTMLDocument.v.handle (jquery.min.js:1253)
(anonymous) @ index.js:266
handle @ jquery.min.js:1382
dispatch @ jquery.min.js:1316
v.handle @ jquery.min.js:1253

Repo not generated after clicking 'Generate repository from data'

OS X Mavericks 10.9.2
Node version v0.10.28
Chrome v34.0.1847.131

No repo, only one README.md with 'hello wolrd' and a long list of integers.

Console:

SITYAGI-M-V03U:repos siddharth_tyagi$ ls -latr
total 88
-rw-r--r--  1 siddharth_tyagi  staff     14 Apr 14 00:24 .gitignore
drwxr-xr-x  7 siddharth_tyagi  staff    238 Apr 14 00:24 ..
drwxr-xr-x  3 siddharth_tyagi  staff    102 May  6 00:07 rtgmnbzhtxfxbt9
-rw-r--r--  1 siddharth_tyagi  staff  18872 May  6 00:21 rtgmnbzhtxfxbt9.zip
-rw-r--r--  1 siddharth_tyagi  staff  18817 May  6 00:24 kdgz54mh2jfw29.zip
drwxr-xr-x  3 siddharth_tyagi  staff    102 May  6 00:27 kdgz54mh2jfw29
drwxr-xr-x  3 siddharth_tyagi  staff    102 May  6 00:27 public
drwxr-xr-x  8 siddharth_tyagi  staff    272 May  6 00:27 .
SITYAGI-M-V03U:repos siddharth_tyagi$ ls public/repos/
rtgmnbzhtxfxbt9
SITYAGI-M-V03U:repos siddharth_tyagi$ ls public/repos/rtgmnbzhtxfxbt9/
README.md
SITYAGI-M-V03U:repos siddharth_tyagi$ unzip kdgz54mh2jfw29.zip 
Archive:  kdgz54mh2jfw29.zip
   creating: public/repos/kdgz54mh2jfw29/
  inflating: public/repos/kdgz54mh2jfw29/README.md  
SITYAGI-M-V03U:repos siddharth_tyagi$ ls
kdgz54mh2jfw29      kdgz54mh2jfw29.zip  public          rtgmnbzhtxfxbt9     rtgmnbzhtxfxbt9.zip
SITYAGI-M-V03U:repos siddharth_tyagi$ ls -latr public/repos/kdgz54mh2jfw29/
total 80
drwxr-xr-x  3 siddharth_tyagi  staff    102 May  6 00:09 .
-rw-r--r--  1 siddharth_tyagi  staff  40004 May  6 00:24 README.md
drwxr-xr-x  4 siddharth_tyagi  staff    136 May  6 00:27 ..
SITYAGI-M-V03U:repos siddharth_tyagi$ 

README.md contents:

Hello Wolrd
13290
17833
22376
26919
15532
20075
8689
13232
17775
22318
26861
31404
20017
7722
12265

Error when run `npm start` on Local installation

Hello, I try to install it local by clone and run npm command

Local installation
$ git clone [email protected]:IonicaBizau/github-contributions.git
$ cd github-contributions
$ npm i
$ npm start

But after run sudo npm i. I run sudo npm start, it caught an error:

 % sudo npm start                                                                                               !4020

> [email protected] start /media/hoangddt/Soft1/source/open-sources/github-contributions
> ./lib/server.js

sh: 1: ./lib/server.js: Permission denied

npm ERR! [email protected] start: `./lib/server.js`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the gh-contributions package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./lib/server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls gh-contributions
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-34-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /media/hoangddt/Soft1/source/open-sources/github-contributions
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /media/hoangddt/Soft1/source/open-sources/github-contributions/npm-debug.log
npm ERR! not ok code 0

My OS is ubuntu 14.04.

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.