GithubHelp home page GithubHelp logo

pombredanne / libcollector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kusuwada/libcollector

0.0 1.0 0.0 569 KB

Collect name & versions of the used libraries from github repositories

License: MIT License

Python 100.00%

libcollector's Introduction

Libcollector

Collect name, versions, and other information (e.g. license, author) of the used OSS libraries from github repositories.

Description

libcollector is a python3 commandline tool to collect information of the library which used in specified github repositories.
This tool collects libraries from package management files like requirements.txt with python or package.json in nodejs. The available managers are below.
Optional information like license or author will collected from each package manager's web api or web site. If it can't find these information, the optional information will be empty.
You can specify repositories which you have Read permission.

Demo

Here is an execution sample. Target repository is vuejs/vue, and output format is csv.

$ python libcollector.py

demo_vue

Installation

Requirements

  • python3

Installation

Get this repository and install required modules.

$ git clone https://github.com/kusuwada/libcollector.git
$ cd libcollector
$ pip install -r requirements.txt

Usage

Prepare

Before use, you have to create your "github access token for commandline", if the target repository is private.
See GitHub Help: Authenticating to GitHub.
As it says, please select repo in scope selection.

Basic usage

$ cd libcollector
$ python libcollector.py [--token {github_access_token}]
  • --token is an optional. If the target includes private repository, you have to create "github access token" and set this option.

Settings

See and Edit libcollector/settings.yml

target_repositories

List of the target repositories. Format is below

{owner}/{repository}

e.g.

target_repositories:
  - kusuwada/node-slack-log-exporter
  - kusuwada/ruby-slack-log-exporter
  - requests/requests

You can specify both public & private repository. If you specify private repository, see Prepare.

target_manager

List of the target library managers. Now, we support below managers.

  • requirements.txt (python)
  • Gemfile (ruby)
  • package.json (javascript)

If you want to collect libraries from other manager file, you can add your implementation.

output

List of the export media/formats. Format is below.

{output_type}: {output_path}

Now, we support below formats.

  • csv
  • text

If you want to export other medias or db, you can add your implementation.

optional_information

You can specify output optional information below or not.

  • info_license: library's license
  • info_author: library's author
  • info_homepage_url: library's homepage url
  • info_code_url: library's source code url

If the tool can't get these information, output record becomes empty.

License

Please see the LICENSE file for details. [URL] or MIT

Author

kusuwada

Future Plan

  • Support library collection from install command. e.g. apt-get, yum
  • Add test

libcollector's People

Contributors

kusuwada avatar

Watchers

 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.