xalanq / cf-tool

:bar_chart: Codeforces CLI (Submit, Parse, Test, etc.). Support Contests, Gym, Groups, acmsguru, Windows, macOS, Linux, 7 MB
MIT License
1.31k stars 226 forks source link

After configuring cf isn't working #93

Closed azimjonn closed 4 years ago

azimjonn commented 4 years ago

I configured cf parametres such as login, folder, template. Then I couln't use cf. This is error message:

panic: regexp: Compile(d:\AZIMJON\Dasturlash\rd\codeforces\/contest/((?P<contestID>\d+)/((?P<problemID>\w+)/)?)?): error parsing regexp: invalid escape sequence: \c

goroutine 1 [running]: regexp.MustCompile(0xc0001a7260, 0x59, 0xc000075c38) /usr/local/go/src/regexp/regexp.go:311 +0x159 github.com/xalanq/cf-tool/cmd.parsePath(0xc0001ca0e0, 0xe, 0x7bb84a) /Users/xalanq/go/src/github.com/xalanq/cf-tool/cmd/args.go:225 +0x2c7 github.com/xalanq/cf-tool/cmd.parseArgs(0xc00009d8f0, 0x7375e0, 0xc000090ea0) /Users/xalanq/go/src/github.com/xalanq/cf-tool/cmd/args.go:93 +0x8f0 github.com/xalanq/cf-tool/cmd.Eval(0xc00009d8f0, 0x19, 0xc0000fd6e0) /Users/xalanq/go/src/github.com/xalanq/cf-tool/cmd/cmd.go:23 +0x7e main.main() /Users/xalanq/go/src/github.com/xalanq/cf-tool/cf.go:160 +0x2d1

infalmo commented 4 years ago

Ouch. Seems like regexp has some corner case missed out. Also, the author of the tool is currently not active, so you might not get a quick bug patch for it currently. However, you can try using a near similar tool (with much better features) which I've developed. Here's the repo https://github.com/infixint943/cf

etanot commented 4 years ago

@infixint943

a near similar tool (with much better features) which I've developed. Here's the repo https://github.com/infixint943/cf

Cool.., but what's the point of doing same work multiple times; or your project entirely different this one, in terms of implement. If @xalanq is very busy, all of us could request him to add some more volunteers as maintainer (people whom he trust), so even in his absence, project will move forward.

PS: @infixint943, I think, you would be great candidate for maintainer job. :)

infalmo commented 4 years ago

@infixint943

a near similar tool (with much better features) which I've developed. Here's the repo https://github.com/infixint943/cf

Cool.., but what's the point of doing same work multiple times; or your project entirely different this one, in terms of implement. If @xalanq is very busy, all of us could request him to add some more volunteers as maintainer (people whom he trust), so even in his absence, project will move forward.

PS: @infixint943, I think, you would be great candidate for maintainer job. :)

Exactly, I started it to later make a pull request to the this tool. However, it looks like xalanq is currently not available, so I thought of maintaining by myself. But I'll be very glad if xalanq adds me as a contributor and am willing to merge my source code with this.

However, I've had many more in-progress plans. They are

So now, if xalanq is interested, he could add me as a maintainer and also create an organisation (since multiple tools are to be made under the same name). Otherwise, I could continue in my own repo and "soon" make a codeforces blog stating the reasons and asking for contributors.

Any suggestions are appreciated!

etanot commented 4 years ago

@Azimjon-ibn-Mehmonali I think, replacing fmt.Sprintf(/contest/(?P<contestID>%v)(/problem/(?P<problemID>%v))?, ContestRegStr, ProblemRegStr) with fmt.Sprintf((/contest/(?P<contestID>%v)(/problem/(?P<problemID>%v))?), ContestRegStr, ProblemRegStr) (add parenthesis at begin of /contest and end of ?), should work. (Disclaimer: sorry, if didn't work; I don't know Golang, it was just a random guess.)

etanot commented 4 years ago

@infixint943 let's discuss this is on issue https://github.com/xalanq/cf-tool/issues/100. We are unnecessarily cluttering @Azimjon-ibn-Mehmonali issue.