Coder Social home page Coder Social logo

Comments (5)

xalanq avatar xalanq commented on June 18, 2024

You can parse an individual problems by using cf parse <contest-id> <problem-id>, then the samples will be fetched at ./<contest-id>/<problem-id> (It will not fetch other problems).
Or you can make the directory by yourself, then cd <contest-id>/<problem-id>/. Now you just need to use cf parse without any argument to fetch all samples into current directory

from cf-tool.

infalmo avatar infalmo commented on June 18, 2024

That is not what I meant! What I wanted to say was this:
image
Notice that I navigate to the directory (cd 1000/a/) where the parsed problem is stored. If the tool would automatically navigate to the created directory, it would be helpful.
In this case, after parsing the problem it should automatically navigate to the directory 1000/a/. If I parsed the entire contest, it should navigate to 1000/.

from cf-tool.

xalanq avatar xalanq commented on June 18, 2024

I'm sorry for my wrong understanding..
As I know, there is no way to do that in an individual program. Changing something of system terminal is not safe so the system does not allow the other process running in the terminal to change the terminal's state. (But you can use bash script to do that)
See: https://stackoverflow.com/questions/52435908/how-to-change-the-shells-current-working-directory-in-go

from cf-tool.

infalmo avatar infalmo commented on June 18, 2024

Fair enough!

from cf-tool.

xalanq avatar xalanq commented on June 18, 2024

But you can use a script to do that.
Save it to parse-contest

#!/bin/bash
cf parse $1
cd $1

Then chmod +x parse-contest && sudo mv parse-contest /usr/local/bin. Now you can use parse-contest 1111 to parse a contest and enter the sub-directory.

Here is parse-problem

#!/bin/bash
cf parse $1 $2
cd $1/$2

from cf-tool.

Related Issues (20)

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.