rcollect

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 6 Imported by: 0

README

rcollect

还在为一页一页查找自己GitHub star的项目而烦恼吗? 快来使用 rcollect,一个用于收集某个github账号当前star的所有仓库的工具,提升你的幸福感❤️❤️。

编译

go build -o ./rollect ./cmd/...

如何使用

$ ./rcollect -h
collect github star repositorys, and export to csv file.

Usage:
  rcollect [flags]

Flags:
  -a, --account string   github account
  -h, --help             help for rcollect
  -o, --output string    file output path (default "./")

Documentation

Index

Constants

View Source
const (
	GithubUrl         = "https://github.com"
	GithubStarPageUrl = "https://github.com/%s?tab=stars"
)

Variables

This section is empty.

Functions

func OutputToCSV

func OutputToCSV(repos []RepoInfo, account string, filepath string) error

Types

type RCollector

type RCollector struct {
	// contains filtered or unexported fields
}

func NewRCollector

func NewRCollector(opt ...SetOption) *RCollector

type RCollectorOption

type RCollectorOption struct {
	Proxy colly.ProxyFunc
	Async bool
}

func DefaultOption

func DefaultOption() *RCollectorOption

type RepoInfo

type RepoInfo struct {
	Link       string `json:"link"`
	Desc       string `json:"desc"`
	Star       int    `json:"star"`
	UpdateTime string `json:"updateTime"`
}

func CollectGithubStarRepo

func CollectGithubStarRepo(c *RCollector, accountName string) ([]RepoInfo, error)

type SetOption

type SetOption func(*RCollectorOption)

func WithAsync

func WithAsync(async bool) SetOption

func WithProxy

func WithProxy(proxy colly.ProxyFunc) SetOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL