auto-contribution

1.2.2 • Public • Published

auto-contribution

Pay GitHub issues GitHub license Gitter

npm version Build Status devDependency Status npm

a node.js module for automatically generating contributions on github without worrying about its movement in the next week. which is only used on Linux OS.

Installation

NPM Installation
npm install auto-contribution
cd ./node_modules/auto-contribution
npm i
Clone Installation
git clone https://github.com/aleen42/auto-contribution.git
cd auto-contribution
npm i

Usage

i. Setup your repository to store generated commits history

ii. Enter root mode to run install and test:

npm i && npm test

iii. Create a json file with IonicaBizau/github-contributions

npm i -g gh-contributions && gh-contributions

after complete listening, you can just visit the website localhost:9000

then build up a colorful calendar for yourself, and then genereate json data, which should be store into a json file

iv. Start to update with root mode

su
 
npm start <repo-url under SSH> <coordinates data json file path>
 
# example: npm start git@github.com:aleen42/contribution.git example.json 

repo-url under SSH: the repo url should be under SSH protocol like git@github.com:aleen42/contribution.git so that we can run the script in a crontab task.

coordinates data json file path: you should put your data generated by IonicaBizau/github-contributions into a json file and give the path of it, and here is an example of json file of aboved result

if you set up all the things and it should run like this, and waiting for the result cause it will behave so slow when your commitsPerDay is large.

v. Without any problems of updating remote repository, you can use crontab to set this script in the root mode to automatically update every week like this:

# su 
# crontab -e 
 
# Edit this file to introduce tasks to be run by cron. 
# 
# Each task to run has to be defined through a single line 
# indicating with different fields when the task will be run 
# and what command to run for the task 
# 
# To define the time you can provide concrete values for 
# minute (m), hour (h), day of month (dom), month (mon), 
# and day of week (dow) or use '*' in these fields (for 'any').# 
# Notice that tasks will be started based on the cron's system 
# daemon's notion of time and timezones. 
# 
# Output of the crontab jobs (including errors) is sent through 
# email to the user the crontab file belongs to (unless redirected). 
# 
# For example, you can run a backup of all your user accounts 
# at 5 a.m every week with: 
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ 
# 
# For more information see the manual pages of crontab(5) and cron(8) 
# 
# m h  dom mon dow   command 
0 0 * * 0 cd /opt/lampp/htdocs/auto-contribution && npm start git@github.com:aleen42/contribution.git example.json

Tests

npm test

Notice that: the repository generated with test case will be in ./auto-contribution/node_modules/gh-contributions/lib/public/repos/

Release History

  • 1.0.0 Initial release
    • 1.1.0 Catch some exceptions
    • 1.1.1 Update readme.md
    • 1.2.0 Add progress to improve interaction
    • 1.2.1 Update readme.md
    • 1.2.2 Fix bugs

⛽️ How to contribute

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

📜 License

MIT © aleen42

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i auto-contribution

Weekly Downloads

0

Version

1.2.2

License

MIT

Last publish

Collaborators

  • aleen42