Skip to content
Svarii edited this page Dec 8, 2024 · 21 revisions

GreyScript

GreyScript Prime is an extension for Grey Script that adds additional methods for object manipulation. With the combination of Greybel VS, PHP Doc Extended, Plant UML, and JSDocs Live Preview, this tool is designed to enhance your coding efficiency in VSCode.

Example Screenshot

Limited custom formatting of DocBlocks and Plant UML allow for insertion to GreyScript Compiler.


GreyScript Prime Static Badge

stringMethods

Static Badge

.color

The .color method allows you to apply a color to the given text.

image

newString = "Hello"

print(newString.color("blue")) // Outputs: <color=blue>Hello</color>

.bold

The .bold method allows you to apply bold to the given text.

image

newString = "Hello"

print(newString.bold) // Outputs: <b>Hello</b>

.italic

The .italic method allows you to apply italic to the given text.

image

newString = "Hello"

print(newString.italic) // Outputs: <i>Hello</i>

.underline

The .underline method allows you to apply underline to the given text.

image

newString = "Hello"

print(newString.underline) // Outputs: <u>Hello</u>

.strike

The .strike method allows you to apply strikethrough to the given text.

image

newString = "Hello"

print(newString.strike) // Outputs: <s>Hello</s>

.mark

The .mark method allows you to apply highlight to the given text.

image

newString = "Hello"

print(newString.mark) // Outputs: <mark>Hello</mark>

.sub

The .sub method allows you to apply subscript to the given text. Example usage:

image

newString = "Hello"

print(newString.tiny) // Outputs: <sub>Hello</sub>

.sup

The .sup method allows you to apply superscript to the given text. Example usage:

image

newString = "Hello"

print(newString.sup) // Outputs: <sup>Hello</sup>

.remove_char_last

The .remove_char_last method allows you to remove the last character to the given text. Example usage:

image

newString = "Hello"

print(newString.remove_char_last) // Outputs: Hell

.remove_bold

The .remove_bold method allows you to remove bold tags from the given text. Example usage:

image

newString = "<b>Hello</b>"

print(newString.remove_bold) // Outputs: Hello

.remove_italic

The .remove_italic method allows you to remove italic tags from the given text. Example usage:

image

newString = "<i>Hello</i>"

print(newString.remove_italic) // Outputs: Hello

.remove_underline

The .remove_underline method allows you to remove underline tags from the given text. Example usage:

image

newString = "<u>Hello</u>"

print(newString.remove_underline) // Outputs: Hello

.remove_strike

The .remove_strike method allows you to remove strikethrough tags from the given text. Example usage:

image

newString = "<s>Hello</s>"

print(newString.remove_strike) // Outputs: Hello

.remove_mark

The .remove_mark method allows you to remove mark tags from the given text. Example usage:

image

newString = "<mark>Hello</mark>"

print(newString.remove_mark) // Outputs: Hello

.remove_sub

The .remove_sub method allows you to remove sub tags from the given text. Example usage:

image

newString = "<sub>Hello</sub>"

print(newString.remove_sub) // Outputs: Hello

.remove_sup

The .remove_sup method allows you to remove superscript tags from the given text. Example usage:

image

newString = "<sup>Hello</sup>"

print(newString.remove_sup) // Outputs: Hello

.extract_between

The .extract_between method allows you to extract the text between the provided values

image

newString = "<b>0x53C737</b>"

print(newString.extract_between("<b>", "</b>")) // Outputs: 0x53C737

.format

The .format method allows for string interpolation

image

variableString = "The quick brown %s jumps over the lazy %s"
animalsList = ["fox", "dog"]      
sentence = variableString.format(animalsList)
print(sentence); // Outputs: The quick brown fox jumps over the lazy dog
Modification of implimentation by dynobytes.

numberMethods

Static Badge

.plus

The .plus method allows you to add a specified amount to a number. If no amount is provided, it defaults to 1. image

newNumber = 40

result = newNumber.plus(2)
print(result) // Outputs: 42

.minus

The .minus method allows you to subtract a specified amount from a number. If no amount is provided, it defaults to 1. image

newNumber = 44

result = newNumber.minus(2)
print(result) // Outputs: 42

.diff

The .diff method calculates the absolute difference between the current number and another number. image

newNumber = 44
newNumber2 = 2

result = newNumber.diff(newNumber2)
print(result) // Outputs: 42

.greater_than

The .greater_than method checks if the current number is greater than a provided number. Returns true if greater, false otherwise. image

myNumber = 42
myNumber2 = 100

result = myNumber.greater_than(myNumber2)
print(result) // Outputs: 0 (false)

.lesser_than

The .lesser_than method checks if the current number is less than a provided number. Returns true if lesser, false otherwise. image

myNumber = 42
myNumber2 = 100

result = myNumber.lesser_than(myNumber2)
print(result) // Outputs: 1 (true)

.random_from

The .random_from method generates a random number in the range of 1 (or optional parameter) to number. image

myNumber = 42
myNumber2 = 100

result = myNumber.lesser_than(myNumber2)
print(result) // Outputs: 1 (true)

listMethods

Static Badge

.trim

The .trim method Returns a new list stripped of any spacing at the beginning and ending. If any value gets passed that is not a list this method will return null.

image

myList = ["", "string", "string", "", ""]

result = myList.trim
print(result) // Outputs: ["string", "string"]

.print

The .print method loops through a list and prints each item

image

myList = ["string", "string"]
myList.print

// Outputs:
string
string

📄 Functions Overview

load_lib

lib = load_lib;
lib = load_lib("metaxploit.so");
lib = load_lib("metaxploit.so", "/lib");
lib = load_lib("metaxploit.so", "/lib", "MetatxploitLib");
// All Output: typeof(lib) == "MetaxploitLib"

image


📄 Class Overview

SystemObject

image

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

Port Memory Object

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

image


Example

Screen Shot of vsCode with Grey Script Prime and recommended plugins. image

image

Clone this wiki locally