-
Notifications
You must be signed in to change notification settings - Fork 3
Home
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.
Limited custom formatting of DocBlocks and Plant UML allow for insertion to GreyScript Compiler.
The .color method allows you to apply a color to the given text.

newString = "Hello"
print(newString.color("blue")) // Outputs: <color=blue>Hello</color>
The .bold method allows you to apply bold to the given text.

newString = "Hello"
print(newString.bold) // Outputs: <b>Hello</b>
The .italic method allows you to apply italic to the given text.

newString = "Hello"
print(newString.italic) // Outputs: <i>Hello</i>
The .underline method allows you to apply underline to the given text.

newString = "Hello"
print(newString.underline) // Outputs: <u>Hello</u>
The .strike method allows you to apply strikethrough to the given text.

newString = "Hello"
print(newString.strike) // Outputs: <s>Hello</s>
The .mark method allows you to apply highlight to the given text.

newString = "Hello"
print(newString.mark) // Outputs: <mark>Hello</mark>
The .sub method allows you to apply subscript to the given text. Example usage:

newString = "Hello"
print(newString.tiny) // Outputs: <sub>Hello</sub>
The .sup method allows you to apply superscript to the given text. Example usage:

newString = "Hello"
print(newString.sup) // Outputs: <sup>Hello</sup>
The .remove_char_last method allows you to remove the last character to the given text. Example usage:

newString = "Hello"
print(newString.remove_char_last) // Outputs: Hell
The .remove_bold method allows you to remove bold tags from the given text. Example usage:

newString = "<b>Hello</b>"
print(newString.remove_bold) // Outputs: Hello
The .remove_italic method allows you to remove italic tags from the given text. Example usage:

newString = "<i>Hello</i>"
print(newString.remove_italic) // Outputs: Hello
The .remove_underline method allows you to remove underline tags from the given text. Example usage:

newString = "<u>Hello</u>"
print(newString.remove_underline) // Outputs: Hello
The .remove_strike method allows you to remove strikethrough tags from the given text. Example usage:

newString = "<s>Hello</s>"
print(newString.remove_strike) // Outputs: Hello
The .remove_mark method allows you to remove mark tags from the given text. Example usage:

newString = "<mark>Hello</mark>"
print(newString.remove_mark) // Outputs: Hello
The .remove_sub method allows you to remove sub tags from the given text. Example usage:

newString = "<sub>Hello</sub>"
print(newString.remove_sub) // Outputs: Hello
The .remove_sup method allows you to remove superscript tags from the given text. Example usage:

newString = "<sup>Hello</sup>"
print(newString.remove_sup) // Outputs: Hello
The .extract_between method allows you to extract the text between the provided values

newString = "<b>0x53C737</b>"
print(newString.extract_between("<b>", "</b>")) // Outputs: 0x53C737
The .format method allows for string interpolation

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
The .plus method allows you to add a specified amount to a number. If no amount is provided, it defaults to 1.

newNumber = 40
result = newNumber.plus(2)
print(result) // Outputs: 42
The .minus method allows you to subtract a specified amount from a number. If no amount is provided, it defaults to 1.

newNumber = 44
result = newNumber.minus(2)
print(result) // Outputs: 42
The .diff method calculates the absolute difference between the current number and another number.

newNumber = 44
newNumber2 = 2
result = newNumber.diff(newNumber2)
print(result) // Outputs: 42
The .greater_than method checks if the current number is greater than a provided number. Returns true if greater, false otherwise.

myNumber = 42
myNumber2 = 100
result = myNumber.greater_than(myNumber2)
print(result) // Outputs: 0 (false)
The .lesser_than method checks if the current number is less than a provided number. Returns true if lesser, false otherwise.

myNumber = 42
myNumber2 = 100
result = myNumber.lesser_than(myNumber2)
print(result) // Outputs: 1 (true)
The .random_from method generates a random number in the range of 1 (or optional parameter) to number.

myNumber = 42
myNumber2 = 100
result = myNumber.lesser_than(myNumber2)
print(result) // Outputs: 1 (true)
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.

myList = ["", "string", "string", "", ""]
result = myList.trim
print(result) // Outputs: ["string", "string"]
The .print method loops through a list and prints each item

myList = ["string", "string"]
myList.print
// Outputs:
string
string
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"


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
portScan = get_memory_portscan
print typeof(portScan) //Outputs: PortMemory

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

