×

Rainbow

Best Java library to create colorful
User Interfaces for Linux terminals.


  RAINBOW JAVA PACKAGE


  Class Codes


This class contains all the color codes used for rainbow class.

Since

1.0


  Interface Procedures


This class contains all the methods implemented for rainbow class.

Since

1.0


  Class Rainbow


This class contains the implementation of core methods for this library.

Since

1.0

Constructors


Getting Started

Before getting started you need to have Linux OS installed in your machine for this library to work properly. The Rainbow is the java library to make good User Interfaces for Linux terminals. There are many ways through which can get a start use of this library. Below are the following type of uses you can start with:


Developer Use

So if you are a java developer you have to install these technologies in your machine.

1. JDK 8 / 11

So if don't have jdk in your machine you can install JDK 11 / JDK 8.

2. Git

The git should be in your machine if your are a developer if you don't have then you can install is here. Clone the repository using the below command:

3. A good Java IDE

You can install any of the good IDE's listed below

If you don't have any IDE listed above then you can install from below links:

For complete Developer Use click below


Library Jar Usage

So if you want to use this library jar as a dependency then you have to install these technologies in your machine

1. JDK 11

So if don't have jdk in your machine you can install JDK 11 from here because the jar only compatible with java 11 only.

2. A good Java IDE

You can install any of the good IDE's listed below

If you don't have any IDE listed above then you can install from below links:

3. Download

You have download the jar from this link or from below button.

For complete Library Jar Usage click below


Github Package Registory Use

Follow the first 3 steps of the developer use then follow below steps.

4. Maven

For using Github Package Registory you have to install maven for using this library package. If you don't have maven then you can download from here.

For checking if maven is present or not you can check with below command:

After running this command in the terminal you will get output like this:

For complete more Github Package Registory Use click on more


Developer Use

Before starting to use the library you have to follow above three steps. After following the steps follow below steps according to your IDE:


Intellij Idea


Using of App Class in Rainbow Package

  1. For using the local package Build the project.
  2. Open the path src/main/java/org.techous/rainbow
  3. You can see the below sample code is there is in App class.
  4. Run App class you will see the output in the console
  5. Here you can see the documentation of the Rainbow class and try different functions or we you want to add some custom functions in our library then you can see our next section.

Adding customization to Rainbow Library

  1. Create a new class filename Hello in java folder.
  2. Copy the below code in Hello.java file.
  3. Run the Hello.java file then you will see the output of the new method which we have created.

Building local Artifacts and use of library jar

  1. Firstly remove the META-INF folder from src/main/java directory.
  2. Then click on File option in the menu and then click on Project Structure.
  3. Then click on artifacts and add new jar by selecting From modules with dependencies...
  4. Select the App class as a main class file and src/main/java directory for generating manifest (META-INF folder).
  5. Now build the project.
  6. After building build artifact and your jar will get generated in out folder.
  7. Now you can use this jar file as external library in your project.

Eclipse


Using of App Class in Rainbow Package

  1. After cloning just make a workspace in Eclipse and open the cloned project.
  2. After opening the project install the ANSI Escape in Consoleplugin in your Eclipse by visiting Eclipse Marketplace.
  3. Open the path src/main/java/org.techous/rainbow
  4. You can see the below sample code is there in App class.
  5. Run App class you will see the output in the console.
  6. Here you can see the documentation of the Rainbow class and try different functions or we you want to add some custom functions in our library then you can see our next section.

Adding customization to Rainbow Library

  1. Create a new class filename Hello in java folder.
  2. Copy the below code in Hello.java file.
  3. Run the Hello.java file then you will see the output of the new method which we have created.

Exporting local Library Jar

  1. Right click org.techous.rainbow package and click on export.
  2. Then click on jar and select the jar path where you want to export.
  3. After finishing this process your jar will be created which you can use as project dependency jar.

VS Code


Using of App class in VS Code

  1. For using App class in VS Code you have to install java Extension pack from VS Code marketplace.
  2. Open the path src/main/java/org.techous/rainbow
  3. You can see the below sample code is there is in App class.
  4. Click on run and App class will get executed and you will see the output in the vscode terminal.
  5. Here you can see the documentation of the Rainbow class and try different functions or we you want to add some custom functions in our library then you can see our next section.

Customize with VS Code

  1. For doing customization in VS Code you have to install java Extension pack from VS Code marketplace.
  2. Create a new class filename Hello in java folder.
  3. Copy the below code in Hello.java file.
  4. Run the Hello.java file then you will see the output of the new method which we have created.

Creating local jar with vscode

  1. Create a Build.bash file in the root of the project
  2. Copy the code given below in the Build.bash file
  3. Run the bash file using command bash Build.bash
  4. It will generate java package and jar file which you can use in your project.

Library Jar Usage

Before starting make sure that you have downloaded the jar. If you have not downloaded the above jar then you can download it here.


Intellij Idea

  1. Create a java project with project name INTELLIJ but you can use any other name.
  2. Your project structure will be like this:
  3. After creation of project you have to add the downloaded jar in External Libraries in intellij.
  4. For adding the jar as a dependency click on file and then project structure. After opening click on libraries and add the downloaded jar.
  5. After adding you have to create a class name Main in the src folder.
  6. Copy the code given below in that class file.
  7. Run this class file and you will get the output on Run screen of Intellij.
  8. In this way you can add this Library Jar to your project.

Eclipse

  1. Open eclipse and select any workspace if not present create one wtih name ECW.
  2. Create a java project with project name eclipse in the workspace which you have selected.
  3. After creating your project your project will look like this:
  4. Add the library jar in classpath of the eclipse project.
  5. After adding the library jar its time to add some code for using library jar.
  6. Create a new class Main in src folder and copy the below code in your java file.

VS Code

  1. Then create a folder with name VSCODE, but you take any name of the folder.
  2. Open the folder in vscode.
  3. Create a lib and src folder in your root folder.
  4. After creating the project copy the rainbow jar in the lib folder.
  5. Then create a java class with name Main.java but you can take any other name but make sure you have changed the class name Main to your name according to java.
  6. Open the integrated terminal in VSCode and go in src folder.
  7. Follow the below commands one by one in the terminal and you will get your output in the terminal.
  8. Your output will be like this:

Github Java Package Use

Coming Soon


Contribution

For contributing to this project you should have a good knowledge of maven and java. Then fork our project here.

Want to suggest any idea regarding our project

After forking create an issue here for suggesting new features. If we found your idea interesting then we will reply you back asap.

Issue/Bugs Report

If you found some bugs then first you have to create an issue from here before sending any pull request.

If we found issue logged is present then we reply you asap and then merge your pull request.

Want to add new tutorials

If you want to add new tutorials to our website then feel free to add just create an issue if we like your tutorial idea then we will reply you back for merging the pull request for tutorials.

Contributors

GauravWalia19 profile image

LICENSE

MIT License

Copyright (c) 2020 TechOUs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Version

We are using Major Release. Minor Release. Bug fix versioning system.

Releases

version: 1.0.1

version: 1.0.0