diff --git a/README.md b/README.md index 1760719..628f404 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# Codeforces Tool +# Codeforces CLI -[![Github release](https://img.shields.io/github/release/lcian/cf-tool.svg)](https://github.com/lcian/cf-tool/releases) -[![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue.svg)](https://github.com/lcian/cf-tool/releases) -![Build](https://github.com/lcian/cf-tool/actions/workflows/build.yaml/badge.svg) -[![Go Report Card](https://goreportcard.com/badge/github.com/lcian/cf-tool)](https://goreportcard.com/report/github.com/lcian/cf-tool) +[![Github release](https://img.shields.io/github/release/lcian/codeforces-cli.svg)](https://github.com/lcian/codeforces-cli/releases) +[![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue.svg)](https://github.com/lcian/codeforces-cli/releases) +![Build](https://github.com/lcian/codeforces-cli/actions/workflows/build.yaml/badge.svg) +[![Go Report Card](https://goreportcard.com/badge/github.com/lcian/codeforces-cli)](https://goreportcard.com/report/github.com/lcian/codeforces-cli) [![Go Version](https://img.shields.io/badge/go-%3E%3D1.12-green.svg)](https://github.com/golang) -[![license](https://img.shields.io/badge/license-MIT-%23373737.svg)](https://raw.githubusercontent.com/lcian/cf-tool/master/LICENSE) +[![license](https://img.shields.io/badge/license-MIT-%23373737.svg)](https://raw.githubusercontent.com/lcian/codeforces-cli/master/LICENSE) -Codeforces Tool is a command-line interface tool for [Codeforces](https://codeforces.com). +Codeforces CLI is a command-line interface tool for the competitive programming platform [Codeforces](https://codeforces.com). It's fast, small, cross-platform and powerful. @@ -34,19 +34,19 @@ Pull requests are always welcome. ## Installation -You can download the pre-compiled binary file in [here](https://github.com/lcian/cf-tool/releases). +You can download the pre-compiled binary file in [here](https://github.com/lcian/codeforces-cli/releases). Or you can use `go install`: ```sh -go install github.com/lcian/cf-tool@latest +go install github.com/lcian/codeforces-cli@latest ``` Or you can compile it from source **(go >= 1.22)**: ```sh -git clone https://github.com/lcian/cf-tool.git -cd cf-tool +git clone https://github.com/lcian/codeforces-cli.git +cd codeforces-cli make make install ``` @@ -129,7 +129,7 @@ Options: ac The status of the submission is Accepted. Examples: - cf config Configure the cf-tool. + cf config Configure the codeforces-cli. cf submit cf will detect what you want to submit automatically. cf submit -f a.cpp cf submit https://codeforces.com/contest/100/A @@ -176,7 +176,7 @@ Examples: "a" of contest 100. cf pull Pull the latest codes of current problem into current path. - cf clone lcian Clone all codes of lcian. + cf clone lcian Clone all codes of lcian. cf upgrade Upgrade the "cf" to the latest version from GitHub. File: @@ -233,8 +233,7 @@ $%s%$ Second (e.g. 00) ``` ```cpp -/* Generated by powerful Codeforces Tool - * You can download the binary file in here https://github.com/lcian/cf-tool (Windows, macOS, Linux) +/* Generated by Codeforces CLI (https://github.com/lcian/codeforces-cli) * Author: $%U%$ * Time: $%Y%$-$%M%$-$%D%$ $%h%$:$%m%$:$%s%$ **/ @@ -256,7 +255,7 @@ int main() { ### I double click the program but it doesn't work -Codeforces Tool is a command-line tool. You should run it in terminal. +Codeforces CLI is a command-line tool. You should run it in the terminal. ### I cannot use `cf` command diff --git a/cf.go b/cf.go index ccb0894..dd96784 100644 --- a/cf.go +++ b/cf.go @@ -7,9 +7,9 @@ import ( "github.com/fatih/color" ansi "github.com/k0kubun/go-ansi" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/cmd" - "github.com/lcian/cf-tool/config" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/cmd" + "github.com/lcian/codeforces-cli/config" "github.com/mitchellh/go-homedir" docopt "github.com/docopt/docopt-go" @@ -20,7 +20,7 @@ const configPath = "~/.cf/config" const sessionPath = "~/.cf/session" func main() { - usage := `Codeforces Tool $%version%$ (cf). https://github.com/lcian/cf-tool + usage := `Codeforces CLI $%version%$ (cf). https://github.com/lcian/codeforces-cli You should run "cf config" to configure your handle, password and code templates at first. @@ -62,7 +62,7 @@ Options: ac The status of the submission is Accepted. Examples: - cf config Configure the cf-tool. + cf config Configure the codeforces-cli. cf submit cf will detect what you want to submit automatically. cf submit -f a.cpp cf submit https://codeforces.com/contest/100/A diff --git a/client/client.go b/client/client.go index 5a078cb..6243064 100644 --- a/client/client.go +++ b/client/client.go @@ -9,7 +9,7 @@ import ( "path/filepath" "github.com/fatih/color" - "github.com/lcian/cf-tool/cookiejar" + "github.com/lcian/codeforces-cli/cookiejar" ) // Client codeforces client diff --git a/client/clone.go b/client/clone.go index 24a62b7..53d48d7 100644 --- a/client/clone.go +++ b/client/clone.go @@ -8,7 +8,7 @@ import ( "time" "github.com/fatih/color" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" ) type cloneData struct { diff --git a/client/login.go b/client/login.go index c351419..ccd200e 100644 --- a/client/login.go +++ b/client/login.go @@ -15,8 +15,8 @@ import ( "syscall" "github.com/fatih/color" - "github.com/lcian/cf-tool/cookiejar" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/cookiejar" + "github.com/lcian/codeforces-cli/util" "golang.org/x/crypto/ssh/terminal" ) diff --git a/client/parse.go b/client/parse.go index 78dff15..ae352e3 100644 --- a/client/parse.go +++ b/client/parse.go @@ -11,7 +11,7 @@ import ( "strings" "sync" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" "github.com/k0kubun/go-ansi" diff --git a/client/pull.go b/client/pull.go index aaac386..deda81b 100644 --- a/client/pull.go +++ b/client/pull.go @@ -10,7 +10,7 @@ import ( "regexp" "strings" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" "github.com/fatih/color" ) diff --git a/client/race.go b/client/race.go index 0c04596..65156bc 100644 --- a/client/race.go +++ b/client/race.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" "github.com/fatih/color" ansi "github.com/k0kubun/go-ansi" diff --git a/client/register.go b/client/register.go index 15a6178..f06f9a9 100644 --- a/client/register.go +++ b/client/register.go @@ -10,7 +10,7 @@ import ( "github.com/PuerkitoBio/goquery" "github.com/fatih/color" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" ) // Register for a contest diff --git a/client/statis.go b/client/statis.go index 26da01a..46c7342 100644 --- a/client/statis.go +++ b/client/statis.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" ) // StatisInfo statis information diff --git a/client/submit.go b/client/submit.go index 47a573d..9273016 100644 --- a/client/submit.go +++ b/client/submit.go @@ -7,7 +7,7 @@ import ( "regexp" "strings" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" "github.com/fatih/color" ) diff --git a/client/watch.go b/client/watch.go index 8038963..ea7e6d3 100644 --- a/client/watch.go +++ b/client/watch.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" "github.com/PuerkitoBio/goquery" "github.com/fatih/color" diff --git a/cmd/args.go b/cmd/args.go index cf112f3..3491428 100644 --- a/cmd/args.go +++ b/cmd/args.go @@ -7,8 +7,8 @@ import ( "regexp" "github.com/docopt/docopt-go" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" ) // ParsedArgs parsed arguments diff --git a/cmd/browser.go b/cmd/browser.go index c4f9c3a..6a89fff 100644 --- a/cmd/browser.go +++ b/cmd/browser.go @@ -2,8 +2,8 @@ package cmd import ( "github.com/fatih/color" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" "github.com/skratchdot/open-golang/open" ) diff --git a/cmd/clone.go b/cmd/clone.go index 58d37c6..5eb76ea 100644 --- a/cmd/clone.go +++ b/cmd/clone.go @@ -3,7 +3,7 @@ package cmd import ( "os" - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" ) // Clone command diff --git a/cmd/cmd.go b/cmd/cmd.go index 437d41c..b5c4e3a 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -11,9 +11,9 @@ import ( "github.com/docopt/docopt-go" "github.com/fatih/color" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" + "github.com/lcian/codeforces-cli/util" ) // Eval opts diff --git a/cmd/config.go b/cmd/config.go index 8ae476e..e4aabe1 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -3,9 +3,9 @@ package cmd import ( "github.com/fatih/color" ansi "github.com/k0kubun/go-ansi" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" + "github.com/lcian/codeforces-cli/util" ) // Config command diff --git a/cmd/contests.go b/cmd/contests.go index 936fe1d..da7cffd 100644 --- a/cmd/contests.go +++ b/cmd/contests.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/fatih/color" - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" "github.com/olekukonko/tablewriter" ) diff --git a/cmd/gen.go b/cmd/gen.go index d41fadd..7d0fdca 100644 --- a/cmd/gen.go +++ b/cmd/gen.go @@ -10,9 +10,9 @@ import ( "time" "github.com/fatih/color" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" + "github.com/lcian/codeforces-cli/util" ) func parseTemplate(source string, cln *client.Client) string { diff --git a/cmd/list.go b/cmd/list.go index 24474a3..ea265bf 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -8,7 +8,7 @@ import ( "github.com/fatih/color" ansi "github.com/k0kubun/go-ansi" - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" "github.com/olekukonko/tablewriter" ) diff --git a/cmd/parse.go b/cmd/parse.go index 44c22f4..be87499 100644 --- a/cmd/parse.go +++ b/cmd/parse.go @@ -4,8 +4,8 @@ import ( "errors" "path/filepath" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" ) // Parse command diff --git a/cmd/pull.go b/cmd/pull.go index 53de109..0174224 100644 --- a/cmd/pull.go +++ b/cmd/pull.go @@ -3,7 +3,7 @@ package cmd import ( "os" - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" ) // Pull command diff --git a/cmd/race.go b/cmd/race.go index ba18112..43f512c 100644 --- a/cmd/race.go +++ b/cmd/race.go @@ -3,8 +3,8 @@ package cmd import ( "time" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" ) // Race command diff --git a/cmd/register.go b/cmd/register.go index 1f797c2..483cabe 100644 --- a/cmd/register.go +++ b/cmd/register.go @@ -1,7 +1,7 @@ package cmd import ( - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" ) // Register command diff --git a/cmd/submit.go b/cmd/submit.go index b114304..d84c4e5 100644 --- a/cmd/submit.go +++ b/cmd/submit.go @@ -3,8 +3,8 @@ package cmd import ( "io/ioutil" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/config" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/config" ) // Submit command diff --git a/cmd/test.go b/cmd/test.go index 2ddc5a8..fa7e707 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -15,8 +15,8 @@ import ( "github.com/fatih/color" ansi "github.com/k0kubun/go-ansi" - "github.com/lcian/cf-tool/config" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/config" + "github.com/lcian/codeforces-cli/util" "github.com/sergi/go-diff/diffmatchpatch" "github.com/shirou/gopsutil/process" ) diff --git a/cmd/unregister.go b/cmd/unregister.go index c246d6a..399d3fb 100644 --- a/cmd/unregister.go +++ b/cmd/unregister.go @@ -1,7 +1,7 @@ package cmd import ( - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" ) // Unregister command diff --git a/cmd/upgrade.go b/cmd/upgrade.go index 05a3a16..7531bcb 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -16,7 +16,7 @@ import ( "time" "github.com/fatih/color" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/util" ) func less(a, b string) bool { @@ -62,7 +62,7 @@ func getLatest() (version, note, ptime, url string, size uint, err error) { return } - resp, err := http.Get("https://api.github.com/repos/lcian/cf-tool/releases/latest") + resp, err := http.Get("https://api.github.com/repos/lcian/codeforces-cli/releases/latest") if err != nil { return } @@ -77,7 +77,7 @@ func getLatest() (version, note, ptime, url string, size uint, err error) { note = result["body"].(string) tm, _ := time.Parse("2006-01-02T15:04:05Z", result["published_at"].(string)) ptime = tm.In(time.Local).Format("2006-01-02 15:04") - url = fmt.Sprintf("https://github.com/lcian/cf-tool/releases/download/%v/cf_%v_%v_%v.zip", version, version, goos, arch) + url = fmt.Sprintf("https://github.com/lcian/codeforces-cli/releases/download/%v/cf_%v_%v_%v.zip", version, version, goos, arch) assets, _ := result["assets"].([]interface{}) for _, tmp := range assets { asset, _ := tmp.(map[string]interface{}) diff --git a/cmd/watch.go b/cmd/watch.go index 684a253..439d37b 100644 --- a/cmd/watch.go +++ b/cmd/watch.go @@ -1,7 +1,7 @@ package cmd import ( - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" ) // Watch command diff --git a/config/config.go b/config/config.go index e5e9cbd..e3d0968 100644 --- a/config/config.go +++ b/config/config.go @@ -8,7 +8,7 @@ import ( "path/filepath" "github.com/fatih/color" - "github.com/lcian/cf-tool/client" + "github.com/lcian/codeforces-cli/client" ) // CodeTemplate config parse code template diff --git a/config/misc.go b/config/misc.go index 60489dc..91d3529 100644 --- a/config/misc.go +++ b/config/misc.go @@ -5,8 +5,8 @@ import ( "regexp" "github.com/fatih/color" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/util" ) // SetGenAfterParse set it yes or no diff --git a/config/template.go b/config/template.go index 6041821..7c5f84f 100644 --- a/config/template.go +++ b/config/template.go @@ -9,8 +9,8 @@ import ( "github.com/fatih/color" ansi "github.com/k0kubun/go-ansi" - "github.com/lcian/cf-tool/client" - "github.com/lcian/cf-tool/util" + "github.com/lcian/codeforces-cli/client" + "github.com/lcian/codeforces-cli/util" homedir "github.com/mitchellh/go-homedir" ) diff --git a/go.mod b/go.mod index 6339725..1e16a91 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/lcian/cf-tool +module github.com/lcian/codeforces-cli go 1.22