Coder Social home page Coder Social logo

ageekwall / code-now Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ashish1294/code-now

0.0 2.0 0.0 135 KB

A chrome / chromium plugin to instantly open your Favourite IDE directly from browsers

Home Page: https://www.ashishkedia.me/projects/code_now

License: Apache License 2.0

JavaScript 41.35% C 0.64% C++ 1.43% Shell 40.12% Java 1.55% Python 14.91%

code-now's Introduction

code-now

A chrome/chromium plugin for CodeChef, SPOJ, CodeForces and HackerEarth to instantly open your Favorite IDE

What it does !!

It is a simple chrome/chromium plugin for Linux Users which adds 4 buttons to every CodeChef / SPOJ / CodeForces / HackerEarth Problem Page (one for each of C, C++, Python and Java). Clicking on each button will open up your favorite IDE for that language instantly with a default template !! It is particularly useful during short contests.

You can choose different IDEs for different Languages. Templates can also be different for different Languages.

Prerequisites

Any Linux Distro / MAC OS X, Google Chrome Browser, Python 2.7 or above and Your favorite IDEs

Google Chrome can be installed from here : https://www.google.com/chrome/browser/ Chromium Browser can be installed via Ubuntu Software or by typing following command :

sudo apt-get install chromium-browser

Installation

Easy 2-step Installation. Download the latest release here -> Release v5.0 and unzip it

  1. Install Plugin - The chrome plugin is available for free installation on Chrome Web Store. Install it here

  2. Install Host Program - A simple script has been provided for installation of the host script on your machine which can communicate with the chrome plugin. Before installing, please edit the template files provided. These templates will be automatically added to all your solutions. After editing Templates you can first set the executable bit of the install.sh script and then execute it.

cd PATH_TO_INSTALL_FOLDER
chmod +x install.sh
./install.sh

You can configure your default IDEs for each of the 4 languages during installation. In case you need to re-configure your templates or IDEs please reinstall the host program by runnning the installation script again.

Development

This a small app. Most code is self explainatory. Three primary languages - js, shell-scripting and python. You might use IDE if you want. The flow of the system is :

  1. The manifest file specifies which JS script runs on which page
  2. JS script extracts the problem information and adds the button. Click listenors sends the data to native host.
  3. Native host is a python script on local system. It reads the data and makes a new file, add appropriate header and then starts a the IDE on a separate thread.
  4. Shell Script is useful to install the system. It checks for dependencies and configures the values used in python script.

Note : basic.js file runs on all problem pages. It declares the languages supported and initialises some variables used by all other scripts. JQuery is a dependency for all scripts.

If you want to contribute / work with the code you have to check the "developer mode" on the top right corner of the chrome's extension page(chrome://extensions). After that use the chrome's Load Unpacked Extension feature for working with javascripts. Note that while using this method only the javascript will run but the native messaging will actually not work due to the a different extension ID. You have to pack the extension using the Pack Extension feature in developer mode and then install the packed extension for Native Host to work. The Private Key to pack the extension is included in the repository. To avoid packing extension everytime you make changes to plugin you can load the unpacked extension and then change the codenow.json file with the extension id generated by chrome when you load the unpacked extension and then install the host program using install.sh file.

"allowed_origins": [
    "chrome-extension://eiifebdnfcadjhgenpanagdankjhkjeb/"
  ]

Refer the todo.md file for a list of features that you can add to this application

Contributors

Following is a list of contributors:

  1. Ashish Kedia (@ashish1294)
  2. Dementor (@sam17)
  3. Sahil Dua (@sahildua2305)
  4. Ibrahim Jarif (@jarifibrahim)

code-now's People

Contributors

ashish1294 avatar sahildua2305 avatar jarifibrahim avatar sam17 avatar

Watchers

James Cloos avatar Soumya Agrawal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.