New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

cp-cli2

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

cp-cli2

This is a command-line interface (CLI) tool for competitive programming (CP) enthusiasts. The tool provides several functionalities that can help with CP tasks.

unpublished
latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

CP CLI

This is a command-line interface (CLI) tool for competitive programming (CP) enthusiasts. The tool provides several functionalities that can help with CP tasks.

Install

  • Install Dependencies To use the script, you will need to have Node.js and the zx package installed on your system.
    • If you do not have Node.js installed, you can download it from the official website (https://nodejs.org/).
    • Once Node.js is installed, you can install the zx package by running the following command in your terminal:
      $ npm i -g zx
      
      or
      $ yarn global add zx
      
  • Clone the repository
    git clone https://github.com/p-nerd/cp-cli2.git
    
  • Install the script as cli tool
    $ sudo cp ./cp-cli2.mjs /usr/bin/cp-cli2
    $ sudo chmod +x /usr/bin/cp-cli2
    

Commands

  • <file name>: Create a file with ~/.cp-cpi/template.cpp contents.
  • set <file name>: Copy the template file to ~/.cp-cpi/template.cpp.
  • cf_status <numeric series> <alphabetical series>: Open the problem submission status page for the given problem on the Codeforces website in the default web browser.
  • cf_rename <file name> <problem numeric series> <dir name rate>: Rename the specified file with a specific formatting for Codeforces problems.
  • done <file name>: Add the current time to the end of the specified file.
  • help: Show the list of available commands and their descriptions.

Usage

To create a file with ~/.cp-cpi/template.cpp contents: $ cp-cli2 <file name> Replace with the name of the file you want to create.

To copy the template file to ~/.cp-cpi/template.cpp: $ cp cli set <file name> Replace with the name of the file you want to set the template for.

To open the problem submission status page for a Codeforces problem in the default web browser: $ cp-cli2 cf_status <numeric series> <alphabetical series> Replace with the numeric series of the problem and with the alphabetical series of the problem.

To rename a file with a specific formatting for Codeforces problems: $ cp-cli2 cf_rename <file name> <problem numeric series> <dir name rate> Replace with the name of the file you want to rename. If you want to include the problem numeric series in the file name, include it as the second argument. If you want to include a directory name in the file path, include it as the third argument.

To add the current time to the end of a file: $ cp-cli2 done <file name> Replace with the name of the file you want to add the timestamp to.

To show the list of available commands and their descriptions: $ cp-cli2 help

FAQs

Package last updated on 26 Apr 2023

Related posts