Skip to content

Svarii/greyscript-prime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GreyScript Prime Version Badge

GreyScript Prime Banner by Svarii

Enhance Your GreyScript Coding Experience in VSCode

GreyScript Prime is an extension for GreyScript that adds powerful methods for object manipulation. Combined with tools like Greybel VS, Plant UML, and JSDocs Live Preview, GreyScript Prime is designed to boost your coding efficiency and make your development experience in VSCode seamless and productive.

Navigate Documentation in Preview Windows image

image

Key Features

  • Extended String Manipulation: Apply formatting like color, bold, italic, underline, and more directly to your strings.
  • Advanced Number Operations: Perform mathematical computations with ease using methods like .plus, .minus, .diff, etc.
  • List Utilities: Trim lists, print contents, and manipulate list items efficiently.
  • Custom Classes: Access SystemObject and PortMemory objects.
  • Enhanced Documentation: Extensive documentation with custom formatting (to allow insertion into compiler) of DocBlocks and Plant UML to enchance coding environment.

Table of Contents

Installation

To install GreyScript Prime, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Svarii/greyscript-prime.git
  2. Install the recommended VSCode extensions:

  3. Open the project in VSCode and start coding!

Usage

Import GreyScript Prime into your GreyScript projects to start using the extended methods. Here's a quick example:

import_code("/lib/gsplus.so")";
import_code("/lib/gslibs.so")";
import_code("/lib/gsobjects.so")";

newString = "Hello World";
print(newString.bold.color("blue"));

metax = load_lib("metaxploit.so")
print(typeof(metax))

portScan = get_memory_portscanner
print(typeof(portScan))

Methods Overview

String Methods

  • .color("#color"): Apply a color to text.
  • .bold: Make the text bold.
  • .italic: Make the text italic.
  • .underline: Underline the text.
  • .strike: Apply strikethrough to text.
  • .mark: Highlight the text.
  • .sub: Apply subscript to text.
  • .sup: Apply superscript to text.
  • .remove_char_last: Remove the last character from text.
  • .remove_bold: Remove bold formatting from text.
  • .remove_italic: Remove italic formatting from text.
  • .remove_underline: Remove underline formatting.
  • .remove_strike: Remove strikethrough formatting.
  • .remove_mark: Remove highlight from text.
  • .remove_sub: Remove subscript from text.
  • .remove_sup: Remove superscript from text.
  • .extract_between: Extract the text between the given values.
  • .format: Allows for string interpolation.

Number Methods

  • .plus(number): Add 1 or value to a number.
  • .minus(number): Subtract 1 or a value from a number.
  • .diff(number): Calculate the absolute difference.
  • .greater_than(number): Check if number is greater.
  • .lesser_than(number): Check if number is lesser.
  • .random_from(number): Generate a random number from 0 (or number) to number.

List Methods

  • .trim: Removes empty list items from list ends.
  • .print: Loops through a list and prints each item.

Function Methods

  • load_lib(libName, libDir, typeExpected): Load a library from /lib.

Object Methods

  • SystemObject: Returns object type SystemObject.
  • PortMemory: Returns object type PortMemory.

Classes Overview

SystemObject

Access system-level functionalities directly from your code.

terminal = get_system_object;
print(typeof(terminal)); // Outputs: SystemObject
print(terminal.computer.get_name); // Outputs: The name of the computer
terminal.shell.launch("ls"); // Executes the 'ls' command

PortMemory

Interact with collected port information with ease.

portScan = get_memory_portscan;
print(typeof(portScan)); // Outputs: PortMemory

Example

Here's a short video showcasing GreyScript Prime in within VSCode: GreyScript Prime

License

GreyScript Prime is released under the MIT License. See LICENSE for more details.


Enhance your GreyScript development experience today with GreyScript Prime!


About

GreyScript Prime Extention Libraries

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published