| Crates.io | leetr |
| lib.rs | leetr |
| version | 0.1.3 |
| created_at | 2024-05-28 13:35:46.50988+00 |
| updated_at | 2024-05-29 21:49:57.169424+00 |
| description | A CLI tool for setting up local LeetCode projects |
| homepage | |
| repository | https://github.com/pophilpo/leetr |
| max_upload_size | |
| id | 1254395 |
| size | 241,507 |
A CLI tool for setting up local LeetCode projects.
Using cargo
cargo install leetr
From source
# Clone the repository
git clone https://github.com/pophilpo/leetr
# Navigate into the project directory
cd leetr
# Build the project in release mode
cargo build --release
# Copy the binary to your bin directory (adjust the path if necessary)
sudo cp target/release/leetr /usr/local/bin
To use leetr, pass the URL of the LeetCode problem or it's title and the language of your choice (python/rust) to the tool.
This command generates a Python 3 project with the following structure:
two_sum/README.md file describing the problem.two_sum/main.py file containing the initial problem codeleetr https://leetcode.com/problems/two-sum/description -l python
This command generates a Rust project with custom name and the following structure:
my_project/README.md file describing the problem.my_project/main.rs file containing the initial problem codeleetr two-sum -l rust -d my_project