Skip to content

enable scripted submission workflow #240

Open
@znd4

Description

@znd4

First of all, thanks for the cool project! love bringing as much to the terminal as possible.

Second, I'm new to rust, so I'll probably use some incorrect lingo

I like having my rust leetcode solutions inside a full cargo repo so that rust-analyzer will work. I'm currently copy-pasting from my editor into the browser, but it'd be cool to be able to fire up a script like

leetcode test ... --code=$(cat .../1234_some_problem.rs | sed ...) 1234

or passing a file path (with exec this time)

cat .../1234_some_problem.rs | sed ... > /tmp/solution.rs
leetcode exec ... --path=/tmp/solution.rs

or via stdin (super fancy):

cat .../1234_some_problem.rs | sed ... | leetcode test ... --path=- 1234

I have a rough idea of where I could add some spaghetti code to support either of these, but I'm curious which you prefer, or if you think this usecase should be supported in some other way (e.g. via some configuration).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions