https://github.com/ylogx/universal
Universal Competitive Programming Suite
https://github.com/ylogx/universal
command-line competitive-programming competitive-programming-contests pypi python universal-compiler
Last synced: 7 months ago
JSON representation
Universal Competitive Programming Suite
- Host: GitHub
- URL: https://github.com/ylogx/universal
- Owner: ylogx
- License: gpl-3.0
- Created: 2013-06-23T22:36:22.000Z (about 13 years ago)
- Default Branch: develop
- Last Pushed: 2017-08-22T15:38:28.000Z (almost 9 years ago)
- Last Synced: 2025-09-08T15:13:47.455Z (10 months ago)
- Topics: command-line, competitive-programming, competitive-programming-contests, pypi, python, universal-compiler
- Language: Python
- Homepage: https://pypi.org/project/Universal/
- Size: 187 KB
- Stars: 14
- Watchers: 7
- Forks: 8
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.txt
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Universal Competitive Programming Suite
=======================================
[](https://gitter.im/shubhamchaudhary/universal?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://pypi.python.org/pypi/Universal) [](https://pypi.python.org/pypi/Universal) [](https://pypi.python.org/pypi/Universal) [](https://github.com/shubhamchaudhary/universal/releases) [](https://github.com/shubhamchaudhary/universal/releases/latest)
[](https://travis-ci.org/shubhamchaudhary/universal) [](https://coveralls.io/r/shubhamchaudhary/universal?branch=master) [](https://circleci.com/gh/shubhamchaudhary/universal) [](https://snap-ci.com/shubhamchaudhary/universal/branch/master) [](https://requires.io/github/shubhamchaudhary/universal/requirements/?branch=master)
[](https://github.com/shubhamchaudhary/universal/issues) [](https://waffle.io/shubhamchaudhary/universal)
A tool to quickly compile and run different source files using same command
Universal allows you to __quickly__ compile, build and run files. Universal make it very easy to compile _any_ source code and create & execute corresponding files.
## Usage
Let us say you want to compile _batman.c_.
### Normal(SLOW) way
`gcc -g -O2 -std=gnu99 -static -Wall -Wextra -Isrc -rdynamic -fomit-frame-pointer -o batman.out batman.c -lm -lrt`
That is around 114 keystrokes with these options that I use for ICPC practice. Now you need to type `./batman.out` to execute.
How __Universal__ helps you in programming?
You just need to type `u batman.c`
Typing effort is reduces even more if you use tab for filename prediction i.e type `u` followed by space and then first word of file `b` and hit tab. Voila, hit enter.
After pressing enter universal will do following things for you:
* It will compile your _batman.c_ (with a lot of awesome gcc commandline options & flags already set).
* After compiling it will create an executable named _batman.out_
* Give you instructions to copy-paste for editing or executing.
* You may also use `u batman.out` to execute the executable just created.
### Universal way
`u b`
With universal installed you just need to type __3__ keystrokes to compile and execute any type of source code.
Best part you don't need to remember anything, not even the name of compiler. Forget the command name & its syntax and all those stupid, long but helpful command line options which are different for each compiler.
You can use the __same__ command/syntax `u filename.extension` to build & run __any__ source code. Yes _any_ type of source file. Universal will either run it or tell you how to install its compiler. Universal supports a large variety of languages including c, c++, java, python and many more.
## Installation:
To install type
```
pip3 install universal
```
After completing installation you can type command name `universal --help` or `universal -h` or the easiest and fastest version of command `u -h` and just hit enter to get usage instruction and help.
List of command line options:
* `u --help` or `u -h` - get help
* `u --update` or `u -u` - update software to the latest developement version with many bug fixes
* `u --download` or `u -d` - download latest source code in a .zip file
* `u --problem` or `u -p` - Report problems, bugs, issues etc.
* `u .c t` - Perform a memory test while running the executable
To get latest version of Universal type `u -u` or do `pip install --upgrade universal`
It is recommended that you update the software after every few weeks.
Find us:
* [PyPi](https://pypi.python.org/pypi/Universal)
* [Ohloh](https://www.ohloh.net/p/UniversalCompiler)
* [LaunchPad](https://launchpad.net/universalcompiler)
[](https://app.wercker.com/project/bykey/b72e37a06749fd7aab9512499ed15481)