Git Product home page Git Product logo

reposcraper's Introduction

reposcraper

A program to search for own repositories from Github, Gitlab, and Bitbucket written in Go.

Get the program

go get github.com/MircoT/reposcraper

If you have correctly configured Go, just use reposcraper from the command line and puts the configuration file in your home folder $HOME/.reposcraper/config.json. Read the following documentation for the configuration file requirements.

From source

Edit the config.example.json and rename it config.json. You have to put the information for each service you want to use. For example, if you need only the GitHub search you have to add only this information:

{
    "github": {
        "username": "your username",
        "token": "your token"
    },
}

After that, you can start to use the program simply by typing:

go run .

You can also build the executable and then use it:

go build
./reposcraper

After the program collected all the repositories information (name and description, if it is private or not), you can type to search for a repository and select it from the suggestions. Select the correct response by pressing enter and the program will try to open the repository in the browser using its URL.

By default, the program search also the repository you starred. To search for a specific type, use the flag type:

Search for a repository that you own or you starred

Usage:
  reposcraper [flags]

Flags:
      --config string   config file (default "./config.json")
  -h, --help            help for reposcraper
      --type string     search type: [all, starred, owned] (default "all")

Config file requirements

The program needs the following token from the various services:

  • GitHub: a personal access token with the repo and user scopes.
  • GitLab: a personal access token with the api and read_repository scopes
  • Bitbucket: an OAuth consumers with the following characteristics:
    • Callback URL: http://localhost/bitbucket (or whatever you want, it is not used but only required by the Bitbucket API)
    • This is a private consumer option checked
    • Permission on Projects Read

Then, you can compile the config file with the proper information:

{
    "github": {
        "username": "user",
        "token": "yyy"
    },
    "gitlab": {
        "username": "user",
        "token": "zzz"
    },
    "bitbucket": {
        "username": "user",
        "key": "aaa",
        "secret": "bbb"
    }
}

Note: if a service is missing it will not be used.

Make your own binary

git clone https://github.com/MircoT/reposcraper.git
cd reposcraper
go build

reposcraper's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.