A run-codes cli front end with some extra features

Related tags

Command-line run-cli
Overview

run-cli

Contributors Forks Stargazers Issues MIT License


Run-cli

A run-codes cli front end with some extra features

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Run-cli is a tool to use run.codes from the command line.

What it can do:

  • Login in run codes site
  • Save your credentials
  • Select a course an a exercise
  • Create a initial template from your submission type selection
    • C++
    • C
    • Haskell
    • Java
    • Zip/MakeFile
    • Python
  • Download exercise descriptions
  • Download exercise related files
  • Run and compile your code
  • Download all test cases
  • Run your test cases locally
    • Run a specific test case
  • Generate a report for the test cases output
  • Send your submission to run.codes
  • Show your run.codes results
  • Subscribe in new courses
  • Get the input of the closed test cases
  • Import projects from git/run.codes

See the open issues for a full list of proposed features (and known issues).

(back to top)

Built With Rust

Used libraries:

(back to top)

Getting Started

How to get started with the project

Prerequisites

First you will need to install rust.

Installation

  1. Clone the repo

     git clone https://github.com/Math-42/run-cli && cd run-cli
  2. Install cargo packages and build the project

    cargo install --path .
  3. Create a project

    run-cli init

(back to top)

Usage

Run:

run-cli -h

To get a full list of possible commands.

run-cli 0.1.0

USAGE:
    run-cli <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    build                Compile the project
    help                 Print this message or the help of the given subcommand(s)
    import               import a project from a git repo or from run codes
    init                 Start a new project
    run                  Runs the project
    secret               Get the closed test cases
    send                 Submit the current project to run.codes
    store-credentials    Set the user credentials
    subscribe            Enroll to a new class
    test                 Run all test cases
    update               Update the data of the exercise

(back to top)

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b features/feature-name)
  3. Commit your Changes (git commit -m 'feature: Add some code')
  4. Push to the Branch (git push origin features/feature-name)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @NedLandy - [email protected]

(back to top)

Comments
  • failed to compile `run-cli v0.9.1

    failed to compile `run-cli v0.9.1

    When i try to install run-cli i have this error:

    error[E0061]: this function takes 2 arguments but 1 argument was supplied
       --> src/sub_commands/test.rs:228:9
        |
    228 |         match run_single_test(&args.value_of("number").unwrap().to_string()) {
        |               ^^^^^^^^^^^^^^^----------------------------------------------- an argument of type `bool` is missing
        |
    note: function defined here
       --> src/sub_commands/test.rs:95:8
        |
    95  | pub fn run_single_test(test_case_name: &String, verbose: bool)
        |        ^^^^^^^^^^^^^^^ -----------------------  -------------
    help: provide the argument
        |
    228 |         match run_single_test(&args.value_of("number").unwrap().to_string(), /* bool */) {
        |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    For more information about this error, try `rustc --explain E0061`.
    error: could not compile `run-cli` due to previous error
    error: failed to compile `run-cli v0.9.1 (/home/grillo/repos/bleh/run-cli)`, intermediate artifacts can be found at `/home/grillo/repos/bleh/run-cli/target`
    
    opened by Grillo-0 1
  • Add support for --number and --verbose arguments to the test subcommand

    Add support for --number and --verbose arguments to the test subcommand

    Add support for --number and --verbose arguments to the test subcommand.

    Known Issues: the arguments for --number are not necessarily numeric and can be greater than the number of tests. First, it is needed to save the number of tests in a structure and then implement this limit.

    opened by mairacanal 1
  • more scripting support

    more scripting support

    I am personally struggling to create a github actions workflow for run-cli because the program is built around user input via stdin. I would like to see more scripting support (passing all inputs needed via command line, environment variables or other methods) in the program to help setup CI applications.

    enhancement 
    opened by lucasgpulcinelli 2
  • run.codes password is stored in plain text

    run.codes password is stored in plain text

    As the title suggests, after running run-cli credentials, the user email and password is stored in plain text at ~/.config/.run-cli/run-cli-credentials.toml, giving attackers potential control over the whole user account.

    I suggest either adding a token-based authentication system in the run.codes site (ideally limiting access the same way github or AWS tokens), adding password storing in the same way as in docker login, or support a --credentials option that let users secure their passwords in other places and pass it via command line when needed (of course, ideally in an environment variable, because of commands history file).

    security 
    opened by lucasgpulcinelli 0
  • Solve warnings that appears during compilation

    Solve warnings that appears during compilation

    [WARNINGS] Solve warnings that appears during compilation

    The Warnings

    During compilation process, rust compiler generated 2 warnings as follows:

    warning: unused variable: `res`
       --> src/run_codes/mod.rs:102:6
        |
    102 |     let res = client
        |         ^^^ help: if this is intentional, prefix it with an underscore: `_res`
        |
        = note: `#[warn(unused_variables)]` on by default
    
    warning: associated function `read_credentials_locally` is never used
      --> src/utils/mod.rs:85:9
       |
    85 |     pub fn read_credentials_locally(project: Project) -> Option<UserCredentials> {
       |            ^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(dead_code)]` on by default
    
    warning: `run-cli` (bin "run-cli") generated 2 warnings
    

    Sugestion

    Erase line 102

    let res = client
    

    Add macro to ignore unused function

    pub fn read_credentials_locally(project: Project) -> Option<UserCredentials>
    
    bug good first issue 
    opened by CarlosCraveiro 0
  • Add distribution dependencies to the README.md

    Add distribution dependencies to the README.md

    [DOCS] Add distribution dependencies to the README.md

    The Error

    On Fedora 36 (Thirty Six) package openssl-devel is required to compile run-cli from source.

    Without it i got the following error:

    error: failed to run custom build command for `openssl-sys v0.9.77`
    
    Caused by:
      process didn't exit successfully: `/home/coveiro/Repos/run-cli/target/release/build/openssl-sys-856093e4cb4b382b/build-script-main` (exit status: 101)
      --- stdout
      cargo:rustc-cfg=const_fn
      cargo:rustc-cfg=openssl
      cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
      X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
      ...
      Make sure you also have the development packages of openssl installed.
      For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
      ...
    error: failed to compile `run-cli v0.9.1 (/home/coveiro/Repos/run-cli)`, intermediate artifacts can be found at `/home/coveiro/Repos/run-cli/target`
    

    Suggestion

    Add openssl-devel or libssl-dev (openssl developer package) as a dependency on the README.md, warning future users of the requirement.

    documentation 
    opened by CarlosCraveiro 0
Owner
Matheus Vieira
Computer Science Student, University of São Paulo (USP), ICMC.
Matheus Vieira
This is a simple lnd poller and web front-end to see and read boosts and boostagrams.

Helipad This package will poll a Lightning LND node for invoices related to Podcasting 2.0 and display them in a web interface. It's intended for use

Podcastindex.org 26 Dec 29, 2022
A TUI front-end for the Debug Adapter Protocol.

Pesticide A TUI front-end for the Debug Adapter Protocol. Motivation I am an avid kakoune user. Kak is a very niche text editor with few users. As suc

raiguard 6 Jun 17, 2022
HTTP client/libcurl TUI front end in Rust, with request + key storage

Rust TUI HTTP Client with API Key Management This project is still in active development and although it is useable, there may still be bugs and signi

Preston Thorpe 23 Nov 9, 2023
Mod for pxtone Collage that adds some shiny features

ptcMod Mod for pxtone Collage that adds some shiny features READ THIS FIRST The program is extremely invasive to ptCollage. This project makes extensi

David M. 6 Sep 17, 2022
Lightweight alternative Discord client with a smaller footprint and some fancy extensible features.

Dorion Dorion is an alternative Discord client aimed and lower-spec or storage-sensitive PCs that supports themes, plugins, and more! Table of Content

SpikeHD 20 Jan 2, 2023
Rust port of https://github.com/hunar4321/life_code with some fun features.

Smarticles A Rust port of Brainxyz's Artificial Life simulator with some fun features. A simple program to simulate primitive Artificial Life using si

Chevy Ray Johnston 15 Dec 24, 2022
Simple low-level web server to serve file uploads with some shell scripting-friendly features

http_file_uploader Simple low-level web server to serve file uploads with some shell scripting-friendly features. A bridge between Web's multipart/for

Vitaly Shukela 2 Oct 27, 2022
Some Steam patches, fixing broken Steam features on Asus Rog Ally

Ally Steam Patches Ally Steam Patches is a tool designed to enhance your Steam experience by applying patches to the Steam client. Installation To ins

MIkhail Kozlov 2 Jul 10, 2023
Some Steam patches, fixing broken Steam features on Asus Rog Ally

⚙️ Steam Patch Steam Patch is a tool designed to enhance your Steam experience by applying patches to the Steam client. ?? Installation To install Ste

MIkhail Kozlov 3 Jul 18, 2023
Threadless Module Stomping In Rust with some features

NovaLdr is a Threadless Module Stomping written in Rust, designed as a learning project while exploring the world of malware development. It uses advanced techniques like indirect syscalls and string encryption to achieve its functionalities. This project is not intended to be a complete or polished product but rather a journey into the technical aspects of malware, showcasing various techniques and features.

null 139 Oct 23, 2023
A simple CLI I made while practicing rust to easily make QR codes with just one command, all in your terminal.

Welcome to rust-qrcode-cli ?? A CLI I made while practicing rust to easily make QR codes with just one command, all in your terminal. Install git clon

Dhravya Shah 2 Mar 2, 2022
Rust CLI utility library. Error handling, status reporting, and exit codes.

narrate This library provides CLI application error and status reporting utilities. The coloured output formatting aims to be similar to Cargo. Error

Christopher Morton 5 Nov 2, 2022
The library for those who need a little extra from their windows. ™

WinEx The library for those who need a little extra from their windows. ™ WinEx - Short for Window Extended - is a library whose goal is to implement

Matheus Branco Borella 2 Mar 27, 2022
Execute Rust code carefully, with extra checking along the way

cargo-careful cargo careful is a tool to run your Rust code extra carefully -- opting into a bunch of nightly-only extra checks that help detect Undef

Ralf Jung 240 Dec 28, 2022
usysconf - now with extra rust

usysconf-rs A rewrite of the usysconf package trigger management system from Solus - designed to be shared between Solus and Serpent OS The initial fo

Serpent OS 4 Sep 18, 2023
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

Linda_pp 7 Nov 17, 2022
All famous C programming Codes in Rust

All top 100 codes from basic to advance which is taught in C programming language in rust Programming language.

Ajit Chaudhary 3 Oct 2, 2022
Generate basic VCard QR codes from the command line.

vcard-qr Generate basic VCard QR codes from your terminal. Stick them on your things so people can contact you if they get lost! This little program i

null 11 Nov 20, 2022
RedMaple offers an oppinionated yet extremely flexible data modeling system based on events for back-end applications.

RedMaple offers an oppinionated yet extremely flexible data modeling system based on events for back-end applications.

Amir Alesheikh 4 Mar 5, 2023