Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 4.03 KB

README.md

File metadata and controls

90 lines (62 loc) · 4.03 KB

Top GitHub users from a geographical area population: git.io/spain

Top GitHub users rank generator for a given geographical area script written in NodeJS + VueJS.

Project URL : https://git.io/spain

This is my first Node.js project so the code might be (it is) a bit buggy, the scripting is heavily inspired and based on the original @paulmillr repository top-github-users and also from this adaptation showing data from Spanish users top-github-users-data made by: @JJ, both unmaintained on the date of this writing. Feel free to collaborate and open pull requests if you see anything that could be changed.


Usage

  1. Clone it

    $ git clone https://github.com/alterebro/area-top-github-users.git
    $ cd area-top-github-users/
  2. Install dependencies

    $ sudo npm install
  3. Rename /app/github.sample.js to /app/github.js with your own ID and Secret strings, you can get them by creating a new GitHub application here: Register a new OAuth application

    exports.github = {
        'id' : 'alphanumeric_string',
        'secret' : 'alphanumeric_string'
    }
  4. Rename /app/sample.locations.json to /app/locations.json and edit the file, create as many location items as needed following the same JSON structure as shown below:

    [
        {
            "location" : "aquitaine", // main query string
            "label" : "Aquitaine",
            "search" : {
                "include" : ["bordeaux", "pau", "merignac", "pessac", "bayonne", "anglet", "bergerac", "biarritz"], // Array of locations to include on the search query
    			"exclude" : ["paris", "montpellier"], // Array of locations to exclude from the search query
    			"users_out" : ["username"], // Array of users banned by login name.			
                "min_repos" : 0, // minimum repositories. num value HIGHER THAN (>)
                "min_followers" : -1,  // minimum followers. num value HIGHER THAN (>)
                "max_pages" : 5, // maximum pages to crawl from github (max. 10)
                "max_users" : 200 // Maximum num of users to be stored.
            }
        }
    
    	// .. add more items
    ]
  5. Execute main script (app/main.js)

    $ npm start

FrontEnd Development

The FrontEnd is built using Gulp, it can be installed via npm:

$ npm install --global gulp-cli

The development HTML file is ./_app.html and the related scripts and styles are located on the /frontend folder named with the prefix _src. In order to create the distributable files you have to run the default gulp task which will execute the building and compressing tasks.

$ gulp

License

The MIT License (MIT)

Copyright (c) 2016 Jorge Moreno ( moro.es, @alterebro )

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.