From 5d9bea2468baca035974b3ffd8095de089239bb4 Mon Sep 17 00:00:00 2001 From: Jianfeng Li Date: Thu, 22 Oct 2020 20:23:50 +0800 Subject: [PATCH] add github action --- .goreleaser.yml | 47 ++++++++++++++++++++++++++++++++++++++ _examples/bget_url.sh | 6 ++--- _meta/default.json | 2 +- _meta/tools/main.json | 18 +++++++-------- api/cmd/biotools.go | 4 ++-- api/cmd/cligov.go | 4 ++-- api/cmd/covid19.go | 4 ++-- api/cmd/crossRef.go | 4 ++-- api/cmd/dataset2tools.go | 4 ++-- api/cmd/gdc.go | 4 ++-- api/cmd/mgrast.go | 4 ++-- api/cmd/ncbi.go | 4 ++-- api/cmd/root.go | 2 +- api/cmd/utils.go | 2 +- api/fetch/biotools.go | 2 +- api/fetch/cligov.go | 2 +- api/fetch/covid19.go | 2 +- api/fetch/crossref.go | 2 +- api/fetch/dataset2tools.go | 2 +- api/fetch/gdc.go | 2 +- api/fetch/mgrast.go | 2 +- api/fetch/ncbi.go | 2 +- api/fetch/utils.go | 2 +- api/main.go | 2 +- chrome/doi.go | 3 +-- cmd/doi.go | 8 +++---- cmd/i.go | 10 ++++---- cmd/root.go | 4 ++-- cmd/seq.go | 4 ++-- cmd/url.go | 10 ++++---- cmd/version.go | 2 +- docs/cli.html | 46 ++++++++++++++++++------------------- go.mod | 35 ++++++++++++---------------- main.go | 2 +- spider/core.go | 4 ++-- spider/ncbi.go | 2 +- spider/oa.go | 4 ++-- spider/scihub.go | 2 +- spider/universal.go | 4 ++-- versions/versions.go | 2 +- 40 files changed, 156 insertions(+), 115 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..4767297 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,47 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod download + # you may remove this if you don't need go generate + - go generate ./... +builds: +- env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows +archives: +- replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: 32-bit #i386 + amd64: 64-bit #x86_64 + format: tar.gz + files: + #- LICENSE.md + #- CHANGELOG.md + #- README.md + #- test_data/* +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +release: + github: + owner: clindet + name: bget + # You can change the name of the release. + # Default is `{{.Tag}}` + # name_template: "latest" + +project_name: bget diff --git a/_examples/bget_url.sh b/_examples/bget_url.sh index 11c0d5f..fdbc2ae 100644 --- a/_examples/bget_url.sh +++ b/_examples/bget_url.sh @@ -9,9 +9,9 @@ bget url ${urls} -t 3 -o /tmp/download -g wget --resume bget url -l /tmp/urls.list -o /tmp/download -f -t 3 bget url Miachol/github_demo --github -bget url PapenfussLab/gridss openanno/bget --with-github-assets -t 5 --github -bget url PapenfussLab/gridss openanno/bget --only-github-assets -t 5 --github -bget url PapenfussLab/gridss openanno/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github +bget url PapenfussLab/gridss clindet/bget --with-github-assets -t 5 --github +bget url PapenfussLab/gridss clindet/bget --only-github-assets -t 5 --github +bget url PapenfussLab/gridss clindet/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github bget --clean diff --git a/_meta/default.json b/_meta/default.json index bf7efeb..6d9f553 100644 --- a/_meta/default.json +++ b/_meta/default.json @@ -2,7 +2,7 @@ "baseURL": [ "{{HOME}}/.config/bget/meta", "https://hiplot.com.cn/download/bget/_meta", - "https://raw.githubusercontent.com/openanno/bget/master/_meta/" + "https://raw.githubusercontent.com/clindet/bget/master/_meta/" ], "entry": [ "default.json" diff --git a/_meta/tools/main.json b/_meta/tools/main.json index 48cddcf..a3078b9 100644 --- a/_meta/tools/main.json +++ b/_meta/tools/main.json @@ -375,13 +375,13 @@ "Tags": null, "URL": { "Linux": [ - "https://github.com/openanno/bget/releases/download/{{version}}/bget_linux64" + "https://github.com/clindet/bget/releases/download/{{version}}/bget_linux64" ], "Mac": [ - "https://github.com/openanno/bget/releases/download/{{version}}/bget_osx" + "https://github.com/clindet/bget/releases/download/{{version}}/bget_osx" ], "Win": [ - "https://github.com/openanno/bget/releases/download/{{version}}/bget.exe" + "https://github.com/clindet/bget/releases/download/{{version}}/bget.exe" ] }, "PostShellCmd": null @@ -394,13 +394,13 @@ "Tags": null, "URL": { "Linux": [ - "https://github.com/openanno/bioctl/releases/download/{{version}}/bioctl_linux64" + "https://github.com/clindet/bioctl/releases/download/{{version}}/bioctl_linux64" ], "Mac": [ - "https://github.com/openanno/bioctl/releases/download/{{version}}/bioctl_osx" + "https://github.com/clindet/bioctl/releases/download/{{version}}/bioctl_osx" ], "Win": [ - "https://github.com/openanno/bioctl/releases/download/{{version}}/bioctl.exe" + "https://github.com/clindet/bioctl/releases/download/{{version}}/bioctl.exe" ] }, "PostShellCmd": null @@ -413,13 +413,13 @@ "Tags": null, "URL": { "Linux": [ - "https://github.com/openanno/bioextr/releases/download/{{version}}/bioextr_linux64" + "https://github.com/clindet/bioextr/releases/download/{{version}}/bioextr_linux64" ], "Mac": [ - "https://github.com/openanno/bioextr/releases/download/{{version}}/bioextr_osx" + "https://github.com/clindet/bioextr/releases/download/{{version}}/bioextr_osx" ], "Win": [ - "https://github.com/openanno/bioextr/releases/download/{{version}}/bioextr.exe" + "https://github.com/clindet/bioextr/releases/download/{{version}}/bioextr.exe" ] }, "PostShellCmd": null diff --git a/api/cmd/biotools.go b/api/cmd/biotools.go index 3b34aa7..a7432b0 100644 --- a/api/cmd/biotools.go +++ b/api/cmd/biotools.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/cligov.go b/api/cmd/cligov.go index 745cdf6..c808555 100644 --- a/api/cmd/cligov.go +++ b/api/cmd/cligov.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/covid19.go b/api/cmd/covid19.go index 105a94b..7fdd72e 100644 --- a/api/cmd/covid19.go +++ b/api/cmd/covid19.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/crossRef.go b/api/cmd/crossRef.go index df3d1cd..76129ee 100644 --- a/api/cmd/crossRef.go +++ b/api/cmd/crossRef.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/dataset2tools.go b/api/cmd/dataset2tools.go index a7bac7f..8d514c7 100644 --- a/api/cmd/dataset2tools.go +++ b/api/cmd/dataset2tools.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/gdc.go b/api/cmd/gdc.go index 6b9d9fd..4c5fd0e 100644 --- a/api/cmd/gdc.go +++ b/api/cmd/gdc.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/mgrast.go b/api/cmd/mgrast.go index 648efd2..25de3cb 100644 --- a/api/cmd/mgrast.go +++ b/api/cmd/mgrast.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/spf13/cobra" ) diff --git a/api/cmd/ncbi.go b/api/cmd/ncbi.go index 9b62487..0b241a8 100644 --- a/api/cmd/ncbi.go +++ b/api/cmd/ncbi.go @@ -6,8 +6,8 @@ import ( "os" "strings" - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" "github.com/openbiox/ligo/flag" cio "github.com/openbiox/ligo/io" "github.com/spf13/cobra" diff --git a/api/cmd/root.go b/api/cmd/root.go index 92caa5f..aadd12c 100644 --- a/api/cmd/root.go +++ b/api/cmd/root.go @@ -5,7 +5,7 @@ import ( "os" "path" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" cio "github.com/openbiox/ligo/io" "github.com/openbiox/ligo/stringo" "github.com/spf13/cobra" diff --git a/api/cmd/utils.go b/api/cmd/utils.go index f03c57f..c73bf2c 100644 --- a/api/cmd/utils.go +++ b/api/cmd/utils.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" cvrt "github.com/openbiox/ligo/convert" cio "github.com/openbiox/ligo/io" clog "github.com/openbiox/ligo/log" diff --git a/api/fetch/biotools.go b/api/fetch/biotools.go index 5ecbe5c..4497b0f 100644 --- a/api/fetch/biotools.go +++ b/api/fetch/biotools.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" ) const BioToolsHost = "https://bio.tools/api/tool/" diff --git a/api/fetch/cligov.go b/api/fetch/cligov.go index b7acf1c..8bec41c 100644 --- a/api/fetch/cligov.go +++ b/api/fetch/cligov.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" ) const CligovHost = "https://clinicaltrials.gov/api/" diff --git a/api/fetch/covid19.go b/api/fetch/covid19.go index 96f75e0..b299adc 100644 --- a/api/fetch/covid19.go +++ b/api/fetch/covid19.go @@ -7,7 +7,7 @@ import ( "github.com/openbiox/ligo/stringo" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" ) const Covid19Host = "https://api.covid19api.com/" diff --git a/api/fetch/crossref.go b/api/fetch/crossref.go index 645055c..c0bc577 100644 --- a/api/fetch/crossref.go +++ b/api/fetch/crossref.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/PuerkitoBio/goquery" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" cio "github.com/openbiox/ligo/io" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/stringo" diff --git a/api/fetch/dataset2tools.go b/api/fetch/dataset2tools.go index a204d62..8b2a917 100644 --- a/api/fetch/dataset2tools.go +++ b/api/fetch/dataset2tools.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" ) const Dataset2toolsHost = "http://amp.pharm.mssm.edu/datasets2tools/api/search?" diff --git a/api/fetch/gdc.go b/api/fetch/gdc.go index ec86039..f564dad 100644 --- a/api/fetch/gdc.go +++ b/api/fetch/gdc.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/bytefmt" "github.com/olekukonko/tablewriter" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" cio "github.com/openbiox/ligo/io" cnet "github.com/openbiox/ligo/net" mpb "github.com/vbauerster/mpb/v5" diff --git a/api/fetch/mgrast.go b/api/fetch/mgrast.go index 59385a1..1071446 100644 --- a/api/fetch/mgrast.go +++ b/api/fetch/mgrast.go @@ -9,7 +9,7 @@ import ( "github.com/openbiox/ligo/stringo" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" ) const MgRastHost = "http://api.mg-rast.org/" diff --git a/api/fetch/ncbi.go b/api/fetch/ncbi.go index 01b3c1d..d4593d4 100644 --- a/api/fetch/ncbi.go +++ b/api/fetch/ncbi.go @@ -8,7 +8,7 @@ import ( "github.com/biogo/ncbi" "github.com/biogo/ncbi/entrez" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" cnet "github.com/openbiox/ligo/net" ) diff --git a/api/fetch/utils.go b/api/fetch/utils.go index bb055d3..34a0bb8 100644 --- a/api/fetch/utils.go +++ b/api/fetch/utils.go @@ -13,7 +13,7 @@ import ( "github.com/PuerkitoBio/goquery" xj "github.com/basgys/goxml2json" - "github.com/openanno/bget/api/types" + "github.com/clindet/bget/api/types" cio "github.com/openbiox/ligo/io" clog "github.com/openbiox/ligo/log" cnet "github.com/openbiox/ligo/net" diff --git a/api/main.go b/api/main.go index e70c32e..2215b42 100644 --- a/api/main.go +++ b/api/main.go @@ -15,7 +15,7 @@ package main import ( - "github.com/openanno/bget/api/cmd" + "github.com/clindet/bget/api/cmd" ) func main() { diff --git a/chrome/doi.go b/chrome/doi.go index 4fb1bc1..a321929 100644 --- a/chrome/doi.go +++ b/chrome/doi.go @@ -10,7 +10,6 @@ import ( glog "github.com/openbiox/ligo/log" stringo "github.com/openbiox/ligo/stringo" - "github.com/chromedp/chromedp" cdp "github.com/chromedp/chromedp" ) @@ -166,7 +165,7 @@ func visibleDownloadTask(url string, ctx context.Context) cdp.Tasks { return nil }), cdp.WaitVisible(`#main-container`, cdp.ByQuery), - chromedp.OuterHTML("html", &body), + cdp.OuterHTML("html", &body), cdp.ActionFunc(func(context.Context) error { fmt.Println(body) return nil diff --git a/cmd/doi.go b/cmd/doi.go index d5a67a0..6a298a5 100644 --- a/cmd/doi.go +++ b/cmd/doi.go @@ -13,9 +13,9 @@ import ( "strings" "time" - "github.com/openanno/bget/api/fetch" - "github.com/openanno/bget/api/types" - "github.com/openanno/bget/spider" + "github.com/clindet/bget/api/fetch" + "github.com/clindet/bget/api/types" + "github.com/clindet/bget/spider" cio "github.com/openbiox/ligo/io" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/slice" @@ -35,7 +35,7 @@ var printCrossRefMeta bool var DoiCmd = &cobra.Command{ Use: "doi [doi1 doi2 doi3...]", Short: "Can be used to access files via DOI.", - Long: `Can be used to access files via DOI. More see here https://github.com/openanno/bget.`, + Long: `Can be used to access files via DOI. More see here https://github.com/clindet/bget.`, Run: func(cmd *cobra.Command, args []string) { doiCmdRunOptions(cmd, args) }, diff --git a/cmd/i.go b/cmd/i.go index f24b4aa..3d4ec08 100644 --- a/cmd/i.go +++ b/cmd/i.go @@ -17,9 +17,9 @@ import ( "time" "github.com/olekukonko/tablewriter" - "github.com/openanno/bget/spider" - "github.com/openanno/bget/urlpool" - vers "github.com/openanno/bget/versions" + "github.com/clindet/bget/spider" + "github.com/clindet/bget/urlpool" + vers "github.com/clindet/bget/versions" "github.com/openbiox/ligo/archive" bexec "github.com/openbiox/ligo/exec" cio "github.com/openbiox/ligo/io" @@ -40,7 +40,7 @@ var defaultEntry = map[string][]string{ "baseURL": []string{ "{{HOME}}/.config/bget/meta", "https://hiplot.com.cn/download/bget/_meta", - "https://raw.githubusercontent.com/openanno/bget/master/_meta/", + "https://raw.githubusercontent.com/clindet/bget/master/_meta/", }, "entry": []string{"default.json"}, "tools": []string{"tools/main.json"}, @@ -59,7 +59,7 @@ var defaultEntry = map[string][]string{ var KeyCmd = &cobra.Command{ Use: "i [name1 name2 name3...]", Short: "Can be used to access URLs via a key string.", - Long: `Can be used to access URLs via a key string. e.g. 'item' or 'item@version #releaseVersion', : bwa, reffa-defuse@GRCh38 #97. More see here https://github.com/openanno/bget.`, + Long: `Can be used to access URLs via a key string. e.g. 'item' or 'item@version #releaseVersion', : bwa, reffa-defuse@GRCh38 #97. More see here https://github.com/clindet/bget.`, Run: func(cmd *cobra.Command, args []string) { keyCmdRunOptions(cmd, args) }, diff --git a/cmd/root.go b/cmd/root.go index 4a94f74..12958fb 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -6,7 +6,7 @@ import ( "path" "runtime" - api "github.com/openanno/bget/api/cmd" + api "github.com/clindet/bget/api/cmd" stringo "github.com/openbiox/ligo/stringo" "github.com/spf13/cobra" ) @@ -58,7 +58,7 @@ var bgetClis bgetCliT var rootCmd = &cobra.Command{ Use: "bget", Short: "Lightweight downloader for bioinformatics data, databases and files.", - Long: `Lightweight downloader for bioinformatics data, databases and files (under development). It will provides a simple and parallelized method to access various bioinformatics resoures. More see here https://github.com/openanno/bget.`, + Long: `Lightweight downloader for bioinformatics data, databases and files (under development). It will provides a simple and parallelized method to access various bioinformatics resoures. More see here https://github.com/clindet/bget.`, Run: func(cmd *cobra.Command, args []string) { rootCmdRunOptions(cmd, args) }, diff --git a/cmd/seq.go b/cmd/seq.go index f0ae9d3..90b8ebd 100644 --- a/cmd/seq.go +++ b/cmd/seq.go @@ -3,7 +3,7 @@ package cmd import ( "strings" - "github.com/openanno/bget/spider" + "github.com/clindet/bget/spider" cio "github.com/openbiox/ligo/io" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/stringo" @@ -13,7 +13,7 @@ import ( var SeqCmd = &cobra.Command{ Use: "seq [id1 id2 id3... | manifest1 manifest2 manifest3...]", Short: "Can be used to access sequence data via unique id (dbGAP and EGA) or manifest files (TCGA).", - Long: `Can be used to access sequence data via unique id or manifest files. More see here https://github.com/openanno/bget.`, + Long: `Can be used to access sequence data via unique id or manifest files. More see here https://github.com/clindet/bget.`, Run: func(cmd *cobra.Command, args []string) { seqCmdRunOptions(cmd, args) }, diff --git a/cmd/url.go b/cmd/url.go index 675b88d..851c330 100644 --- a/cmd/url.go +++ b/cmd/url.go @@ -4,7 +4,7 @@ import ( "path" "strings" - "github.com/openanno/bget/urlpool" + "github.com/clindet/bget/urlpool" "github.com/openbiox/ligo/archive" cio "github.com/openbiox/ligo/io" cnet "github.com/openbiox/ligo/net" @@ -14,7 +14,7 @@ import ( var URLCmd = &cobra.Command{ Use: "url [url1 url2 url3...]", Short: "Can be used to access URLs via Golang http, wget, curl, axel and git, and rsync.", - Long: `Can be used to access URLs via Golang http, wget, curl, axel and git, and rsync. More see here https://github.com/openanno/bget.`, + Long: `Can be used to access URLs via Golang http, wget, curl, axel and git, and rsync. More see here https://github.com/clindet/bget.`, Run: func(cmd *cobra.Command, args []string) { URLCmdRunOptions(cmd, args) }, @@ -143,7 +143,7 @@ func init() { bget url -l /tmp/urls.list -o /tmp/download -f -t 3 bget url Miachol/github_demo --github - bget url PapenfussLab/gridss openanno/bget --with-github-assets -t 5 --github - bget url PapenfussLab/gridss openanno/bget --only-github-assets -t 5 --github - bget url PapenfussLab/gridss openanno/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github` + bget url PapenfussLab/gridss clindet/bget --with-github-assets -t 5 --github + bget url PapenfussLab/gridss clindet/bget --only-github-assets -t 5 --github + bget url PapenfussLab/gridss clindet/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github` } diff --git a/cmd/version.go b/cmd/version.go index 28bede8..e0503b8 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,3 +1,3 @@ package cmd -var version = "v0.3.1" +var version = "v0.3.2" diff --git a/docs/cli.html b/docs/cli.html index 06f38e9..6e645f5 100644 --- a/docs/cli.html +++ b/docs/cli.html @@ -171,7 +171,7 @@

2020-04-01

Main interface

bget -h
 
-#> Lightweight downloader for bioinformatics data, databases and files (under development). It will provides a simple and parallelized method to access various bioinformatics resoures. More see here https://github.com/openanno/bget.
+#> Lightweight downloader for bioinformatics data, databases and files (under development). It will provides a simple and parallelized method to access various bioinformatics resoures. More see here https://github.com/clindet/bget.
 #> 
 #> Usage:
 #>   bget [flags]
@@ -188,7 +188,7 @@ 

Main interface

#> Flags: #> --clean remove _download and _log in current dir. #> -h, --help help for bget -#> --log-dir string log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> --save-log Save log to file. #> -k, --task-id string task ID (default is random). (default "8t728ol2maxkmsi") #> --verbose int verbose level (0:no output, 1: basic level, 2: with env info) (default 1) @@ -219,7 +219,7 @@

bget api

#> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> #> Global Flags: -#> --log-dir string log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> --save-log Save log to file. #> -k, --task-id string task ID (default is random). (default "ykdbmlls4y7bnrk") #> --verbose int verbose level (0:no output, 1: basic level, 2: with env info) (default 1) @@ -264,7 +264,7 @@

ncbi

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "j87m3v209t043q1") @@ -332,7 +332,7 @@

gdc

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "cvxari3inxx6avk") @@ -379,7 +379,7 @@

dta

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "g9pkz5h1qvak04f") @@ -443,7 +443,7 @@

cligov

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "bob3jhhs6cwttlh") @@ -491,7 +491,7 @@

biots

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "jgf00jy64tkd9m0") @@ -524,7 +524,7 @@

crf

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "7irofxq0dlk333w") @@ -565,7 +565,7 @@

mgrast

#> --xml2json convert returned XML data to json format. #> #> Global Flags: -#> --log-dir string Log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string Log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> -o, --outfn string Out specifies destination of the returned data (default to stdout). #> --save-log Save log to local file. #> -k, --task-id string Task ID (random). (default "wuxioslx36pv435") @@ -577,7 +577,7 @@

mgrast

bget doi

bget doi -h
-#> Can be used to access files via DOI. More see here https://github.com/openanno/bget.
+#> Can be used to access files via DOI. More see here https://github.com/clindet/bget.
 #> 
 #> Usage:
 #>   bget doi [doi1 doi2 doi3...] [flags]
@@ -619,7 +619,7 @@ 

bget doi

#> --timeout int Set the timeout of per request. (default 35) #> #> Global Flags: -#> --log-dir string log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> --save-log Save log to file. #> -k, --task-id string task ID (default is random). (default "ud32gfsb939l2w9") #> --verbose int verbose level (0:no output, 1: basic level, 2: with env info) (default 1)
@@ -627,7 +627,7 @@

bget doi

bget seq

bget seq -h
-#> Can be used to access sequence data via unique id or manifest files. More see here https://github.com/openanno/bget.
+#> Can be used to access sequence data via unique id or manifest files. More see here https://github.com/clindet/bget.
 #> 
 #> Usage:
 #>   bget seq [id1 id2 id3... | manifest1 manifest2 manifest3...] [flags]
@@ -662,7 +662,7 @@ 

bget seq

#> --ignore Contine to download and skip the check of existed files. #> -l, --list-file string A file contains accession ids for download. #> -m, --mirror string Set the mirror of resources. -#> -o, --outdir string Set the download dir. (default "/Users/apple/Documents/openanno/bget/docs") +#> -o, --outdir string Set the download dir. (default "/Users/apple/Documents/clindet/bget/docs") #> -f, --overwrite Logical indicating that whether to overwrite existing files. #> --proxy string HTTP proxy to download. #> --query-gpl Wheather fetch GPL files from GEO database. @@ -679,7 +679,7 @@

bget seq

#> --token-gdc string Token to access TCGA portal files. #> #> Global Flags: -#> --log-dir string log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> --save-log Save log to file. #> -k, --task-id string task ID (default is random). (default "y1xhwn1sa5rx7cg") #> --verbose int verbose level (0:no output, 1: basic level, 2: with env info) (default 1)
@@ -687,7 +687,7 @@

bget seq

bget url

bget url -h
-#> Can be used to access URLs via Golang http, wget, curl, axel and git, and rsync. More see here https://github.com/openanno/bget.
+#> Can be used to access URLs via Golang http, wget, curl, axel and git, and rsync. More see here https://github.com/clindet/bget.
 #> 
 #> Usage:
 #>   bget url [url1 url2 url3...] [flags]
@@ -704,9 +704,9 @@ 

bget url

#> bget url -l /tmp/urls.list -o /tmp/download -f -t 3 #> #> bget url Miachol/github_demo --github -#> bget url PapenfussLab/gridss openanno/bget --with-github-assets -t 5 --github -#> bget url PapenfussLab/gridss openanno/bget --only-github-assets -t 5 --github -#> bget url PapenfussLab/gridss openanno/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github +#> bget url PapenfussLab/gridss clindet/bget --with-github-assets -t 5 --github +#> bget url PapenfussLab/gridss clindet/bget --only-github-assets -t 5 --github +#> bget url PapenfussLab/gridss clindet/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github #> #> Flags: #> -g, --engine string Point the download engine: go-http, wget, curl, axel, git, and rsync. (default "go-http") @@ -718,7 +718,7 @@

bget url

#> -l, --list-file string A file contains urls for download. #> -m, --mirror string Set the mirror of resources. #> --only-github-assets Logical indicating that whether to only download github repo assets files. -#> -o, --outdir string Set the download dir. (default "/Users/apple/Documents/openanno/bget/docs") +#> -o, --outdir string Set the download dir. (default "/Users/apple/Documents/clindet/bget/docs") #> -f, --overwrite Logical indicating that whether to overwrite existing files. #> --proxy string HTTP proxy to download. #> -n, --remote-name Use remote defined filename. @@ -732,7 +732,7 @@

bget url

#> --with-github-assets Logical indicating that whether to download associated assets files of github repo. #> #> Global Flags: -#> --log-dir string log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> --save-log Save log to file. #> -k, --task-id string task ID (default is random). (default "6sh42j0t9mpp0aa") #> --verbose int verbose level (0:no output, 1: basic level, 2: with env info) (default 1)
@@ -740,7 +740,7 @@

bget url

bget key

bget key -h
-#> Can be used to access URLs via a key string. e.g. 'item' or 'item@version #releaseVersion', : bwa, reffa-defuse@GRCh38 #97. More see here https://github.com/openanno/bget.
+#> Can be used to access URLs via a key string. e.g. 'item' or 'item@version #releaseVersion', : bwa, reffa-defuse@GRCh38 #97. More see here https://github.com/clindet/bget.
 #> 
 #> Usage:
 #>   bget key [key1 key2 key3...] [flags]
@@ -791,7 +791,7 @@ 

bget key

#> --with-assets Logical indicating that whether to download associated assets files. #> #> Global Flags: -#> --log-dir string log dir. (default "/Users/apple/Documents/openanno/bget/docs/_log") +#> --log-dir string log dir. (default "/Users/apple/Documents/clindet/bget/docs/_log") #> --save-log Save log to file. #> -k, --task-id string task ID (default is random). (default "i80qflt1ucomltk") #> --verbose int verbose level (0:no output, 1: basic level, 2: with env info) (default 1)
diff --git a/go.mod b/go.mod index 38909cf..c662a64 100644 --- a/go.mod +++ b/go.mod @@ -1,31 +1,26 @@ -module github.com/openanno/bget +module github.com/clindet/bget -go 1.14 +go 1.15 require ( code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 - github.com/PuerkitoBio/goquery v1.5.1 + github.com/PuerkitoBio/goquery v1.6.0 github.com/basgys/goxml2json v1.1.0 github.com/biogo/ncbi v1.0.2 github.com/bitly/go-simplejson v0.5.0 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect - github.com/chromedp/cdproto v0.0.0-20200424080200-0de008e41fa0 // indirect - github.com/chromedp/chromedp v0.5.3 - github.com/gobwas/ws v1.0.3 // indirect - github.com/gocolly/colly v1.2.0 + github.com/chromedp/chromedp v0.5.4-0.20200921161456-b56cd66f9ceb + github.com/gocolly/colly/v2 v2.1.0 github.com/google/go-github/v27 v27.0.6 - github.com/mailru/easyjson v0.7.1 // indirect github.com/olekukonko/tablewriter v0.0.4 - github.com/onsi/ginkgo v1.11.0 // indirect - github.com/onsi/gomega v1.8.1 // indirect - github.com/openbiox/ligo v0.0.0-20200607024921-dd2356ca56a1 - github.com/sirupsen/logrus v1.6.0 - github.com/spf13/cobra v1.0.0 - github.com/tebeka/selenium v0.9.9 // indirect - github.com/tidwall/pretty v1.0.1 - github.com/vbauerster/mpb/v5 v5.2.2 - golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 // indirect - golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect - golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect + github.com/onsi/ginkgo v1.14.2 // indirect + github.com/onsi/gomega v1.10.3 // indirect + github.com/openbiox/ligo v0.0.0-20201022141109-5ba4b8203f67 + github.com/sirupsen/logrus v1.7.0 + github.com/spf13/cobra v1.1.1 + github.com/tidwall/pretty v1.0.2 + github.com/vbauerster/mpb/v5 v5.3.0 + golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 ) + +replace github.com/knq/sysutil => github.com/chromedp/sysutil v1.0.0 diff --git a/main.go b/main.go index 05ee0de..1ae7394 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ package main import ( - "github.com/openanno/bget/cmd" + "github.com/clindet/bget/cmd" ) func main() { diff --git a/spider/core.go b/spider/core.go index 623355e..2c8174b 100644 --- a/spider/core.go +++ b/spider/core.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/gocolly/colly" - "github.com/openanno/bget/chrome" + "github.com/clindet/bget/chrome" + "github.com/gocolly/colly/v2" glog "github.com/openbiox/ligo/log" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/stringo" diff --git a/spider/ncbi.go b/spider/ncbi.go index a17823d..f0b7224 100644 --- a/spider/ncbi.go +++ b/spider/ncbi.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/PuerkitoBio/goquery" - "github.com/gocolly/colly" + "github.com/gocolly/colly/v2" "github.com/openbiox/ligo/archive" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/stringo" diff --git a/spider/oa.go b/spider/oa.go index f255249..9c0d6a6 100644 --- a/spider/oa.go +++ b/spider/oa.go @@ -6,8 +6,8 @@ import ( "net/url" "strings" - "github.com/gocolly/colly" - "github.com/gocolly/colly/extensions" + "github.com/gocolly/colly/v2" + "github.com/gocolly/colly/v2/extensions" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/stringo" ) diff --git a/spider/scihub.go b/spider/scihub.go index 2612428..a8ca760 100644 --- a/spider/scihub.go +++ b/spider/scihub.go @@ -3,7 +3,7 @@ package spider import ( "fmt" - "github.com/gocolly/colly" + "github.com/gocolly/colly/v2" stringo "github.com/openbiox/ligo/stringo" ) diff --git a/spider/universal.go b/spider/universal.go index ce5e8cd..aff8de7 100644 --- a/spider/universal.go +++ b/spider/universal.go @@ -7,8 +7,8 @@ import ( "path" "strings" - "github.com/gocolly/colly" - "github.com/gocolly/colly/extensions" + "github.com/gocolly/colly/v2" + "github.com/gocolly/colly/v2/extensions" cnet "github.com/openbiox/ligo/net" "github.com/openbiox/ligo/slice" "github.com/openbiox/ligo/stringo" diff --git a/versions/versions.go b/versions/versions.go index 732dda4..87dd138 100644 --- a/versions/versions.go +++ b/versions/versions.go @@ -9,7 +9,7 @@ import ( "sync" "github.com/olekukonko/tablewriter" - "github.com/openanno/bget/urlpool" + "github.com/clindet/bget/urlpool" "github.com/openbiox/ligo/stringo" )