npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

urionlinejudge-cli

v5.4.1

Published

The URIOnlineJudge command line utility.

Downloads

8

Readme

npm version CircleCI Dependency Status devDependency Status

URI Online Judge - CLI

The URI Online Judge command line utility makes it easy to submit problems, wait for the solution and fetch new problems via command line!

What is a command line utility?

A command line utility is one to be used from a shell (or commonly known as a Terminal). It receives input from this shell, and reports its output in the same shell.

Installing

$ npm install -g urionlinejudge-cli

Note: For a global install of -g urionlinejudge-cli, OSX/Linux users may need to prefix the command with sudo or can setup proper file permissions on OSX for npm to install without sudo.

Commands

submit <filepath> [number]

You can submit a problem solution to the URI Online Judge.

Options

| Option | Default | Description | |--------|---------|-------------| | --language [language] | python | Language used for submitting. Options: [c, c++, c#, java, python, python3, ruby, scala, js, java8, go, c99, kotlin, c++17 ]. |

Example

$ urionlinejudge submit ./1001.py
# or
$ urionlinejudge submit ./file.py 1001
# or
$ urionlinejudge submit ./file.cpp 1001 --language c++

fetch <number> [Working in Progress]

You can fetch a problem description from the URI Online Judge and populate a template file with that description.

You have to add urionlinejudge::description to your template.

Options

| Option | Default | Description | |--------|---------|-------------| | -t, --template [path] | Use config.template value | Template filepath. | | -o, --output [path] | Current folder | File output path. | | -f, --force | - | Overwrite existing files. |

Example

You create one template and add // urionlinejudge::description at any place:

#include <iostream>

using namespace std;

// urionlinejudge::description

int main()
{
    // work here

    return 0;
}

Then you execute the fetch command passing your template path:

# get template path from configs
$ urionlinejudge fetch -n 1001
# overwrite the template path
$ urionlinejudge fetch -n 1001 -t ../templates/template.cpp
# overwrite existing files
$ urionlinejudge fetch -n 1001 -t ../templates/template.cpp -f
# save file at ../solutions/folder
$ urionlinejudge fetch -n 1001 -t ../templates/template.cpp -o ../solutions/folder

Then the CLI will fetch the problem description and create this file for you:

#include <iostream>

using namespace std;

/*
 * Title:
 * Extremely Basic
 *
 * Timelimit: 1
 *
 * Description:
 * Read 2 variables, named A and B and make the sum of these two variables,
 * assigning its result to the variable X. Print X as shown below. Print
 * endline after the result otherwise you will get “Presentation Error”.
 *
 * Input:
 * The input file will contain 2 integer numbers.
 *
 * Output:
 * Print X according to the following example, with a blank space before and
 * after the equal signal.
 *
 */

 int main()
 {
     // work here

     return 0;
 }

reset

You can reset your information.

Example

$ urionlinejudge reset
What is the full path for the template? ../uri/template.cpp
What is your email? [email protected]
What is your password? *******

[*] Success:
[*] Email: [email protected]
[*] Template: /Users/user/git/uri/template.cpp

Developing and Contributing

We'd love to get contributions from you! For a quick guide to getting your system setup for developing take a look at our Quickstart Guide. Once you are up and running, take a look at the Contribution Documents to see how to get your changes merged in.

License

See LICENSE file.