GithubHelp home page GithubHelp logo

rdwz / react-github-scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from axelmy318/react-github-scraper

0.0 0.0 1.0 578 KB

Provides multiple customizable components to automatically load and display GitHub repositories data by just passing the targeted repository!

Home Page: https://axelmy-projects-showcase.firebaseapp.com/react-github-scraper

JavaScript 97.04% CSS 2.96%

react-github-scraper's Introduction

react-github-scraper ๐Ÿ‘‹

Provides multiple customizable components to automatically load and display GitHub repositories data by just passing the targeted repository!

Installation

npm i react-github-scraper

Demo & API ๐Ÿ‘€

https://axelmy-projects-showcase.firebaseapp.com/react-github-scraper (...with code ๐Ÿ˜‰)

Components

  • GithubScraper
    • Repository related
      • Contributors
      • ForksCount
      • Languages
      • PushedAt
      • Size
      • StargazersCount
      • Topics
      • WatchersCount
    • User related
      • MemberSince
      • OwnerAvatar
      • OwnerFollowersCount
      • PublicReposCount

Usage ๐Ÿ’ป

import GithubScraper, { Languages, StargazersCount } from 'react-github-scraper';

const Example = () => {
    return (
        <GithubScraper 
            username='axelmy318' 
            repository='react-github-scraper' 
            branch='master'
        >
            <StargazersCount prefix="โญ&nbsp;" label={'Stargazers count'} />
            <Languages label={'Languages'} />
            <Topics label={'Topics'} />
            <Contributors label={'Contributors'} />
            <PushedAt label={'Last push'} />
            <Size label={'Size'} />
        </GithubScraper>
    )
}


export default Example

Configuration

To know what is the targeted repository, you have to wrap your components into <GithubScraper> and pass it the username, repository, and optionally branch as props.

Common props

  • label: every components has it. It defines the title written above the data
  • prefix: some components allow you to use a prefix, to put right before the data. See the <StargazersCount /> component for some examples.

Screenshots

Here is what you can get by mixing some of your own CSS with the example in the "Usage" section

screenshot1

Todos

  • Create a wrapper to provide the github repository only once
  • Create a class shared to all the components to prevent fetching the same data twice
  • List repository languages
  • List repository topics
  • List repository contributors
  • Display repository counts (stargazers, watchers, forks)
  • Display repository dates (last pushed, last commit, ...)
  • Provide theme to the <GithubScraper> component so that it automatically applies to all children
  • Create a parameter to not render the component if there is no data (IE: don't render <Topics /> if there are none)

react-github-scraper's People

Contributors

axelmy318 avatar

Forkers

renovate-bot

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.