Skip to content

Commit

Permalink
plugin.spec sync
Browse files Browse the repository at this point in the history
  • Loading branch information
rmurray-r7 committed Jan 13, 2025
1 parent 2906f56 commit 0ca1019
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 41 deletions.
8 changes: 4 additions & 4 deletions plugins/string/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"spec": "66e9ce90ef486ea29f7113995ed701ab",
"manifest": "1ec5f5cb6f45039155f589eb516e4e2b",
"setup": "9db7a8efac3085fd9937946ee94a5cec",
"spec": "af4772c66e6dfae2a41dbc24c4fafde9",
"manifest": "ff9feb5c62cc6078a3212085652011c3",
"setup": "394787d1ead943699cecc2712c114b1b",
"schemas": [
{
"identifier": "length/schema.py",
Expand All @@ -25,7 +25,7 @@
},
{
"identifier": "split_to_object/schema.py",
"hash": "d39a4841d4f5601bc93f5a28ae286eeb"
"hash": "69e573420b92e9c831d81e095534f76b"
},
{
"identifier": "trim/schema.py",
Expand Down
2 changes: 1 addition & 1 deletion plugins/string/bin/komand_string
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from sys import argv
Name = "String Operations"
Vendor = "rapid7"
Version = "1.4.2"
Description = "The String plugin provides common programmatic string operations"
Description = "The String Operations plugin allows easy manipulation of string data.This plugin utilizes the Python 3 String library [set of methods](https://docs.python.org/3/library/stdtypes.html#string-methods)"


def main():
Expand Down
47 changes: 16 additions & 31 deletions plugins/string/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The String Operations plugin allows easy manipulation of string data.

This plugin utilizes the Python 3 String library [set of methods](https://docs.python.org/3/library/stdtypes.html#string-methods).
This plugin utilizes the Python 3 String library [set of methods](https://docs.python.org/3/library/stdtypes.html#string-methods)

# Key Features

Expand Down Expand Up @@ -206,16 +206,22 @@ Example output:
```

#### Split String to Object

This action is used to convert a string to an object containing key:value strings.

Any input requiring more than a single key:value pair, e.g. `USER=Bob` needs to use the `block_delimiter` option.
In this case, the input string is split by the `block_delimiter` character first, and the resulting items are then split
by the `string_delimiter` option. Stripping of double-quotes is automatically applied in this situation for each item before the plugin returns it.

The [output schema object](https://docs.komand.com/v0.42.1/docs/python-script-plugins#section-configure-the-plugin-output-schema) on the action's page can be modified to pre-populate the workflow with the names of the keys.
It allows users the ability to use the green selector and choose a specific variable later in the workflow by name.
[Input templating](https://docs.komand.com/docs/input-templating) would need to be used to obtain variables by name otherwise.
Any input requiring more than a
single key:value pair, e.g. `USER=Bob` needs to use the `block_delimiter` option.
In this case, the input string is
split by the `block_delimiter` character first, and the resulting items are then split
by the `string_delimiter` option.
Stripping of double-quotes is automatically applied in this situation for each item before the plugin returns it.
The
[output schema](https://docs.komand.com/v0.42.1/docs/python-script-plugins#section-configure-the-plugin-output-schema)
on the action's page can be modified to pre-populate the workflow with the names of the keys.
It allows users the
ability to use the green selector and choose a specific variable later in the workflow by name.
[Input
templating](https://docs.komand.com/docs/input-templating) would need to be used to obtain variables by name otherwise

##### Input

Expand Down Expand Up @@ -251,27 +257,6 @@ Example output:
}
```

Here is another example with a slightly more complex string input that contains multiple key:value pairs.
These pairs are separated from each other by a space, and the keys and values within each pair are separated by an equal sign:

```
Computer_ID="bef41e8b-47b8-e188-8e43-3a2b662dd55d" Computer_Name="dgdemo\RGWin64" Computer_Type="Windows"
```

Setting `block_delimiter` to ` ` and `string_delimiter` to `=` will return the information presented in the example below.

Example output:

```
{
"object": {
"Computer_ID": "bef41e8b-47b8-e188-8e43-3a2b662dd55d",
"Computer_Name": "dgdemo\RGWin64",
"Computer_Type": "Windows"
}
}
```

#### Trim

This action is used to trim a string of leading and trailing whitespace
Expand Down Expand Up @@ -348,7 +333,7 @@ Example output:

## Troubleshooting

There may be complex string manipulation needs that are likely outside the scope of this plugin. If this is the case, consider using the Python 3 Script plugin instead.
* There may be complex string manipulation needs that are likely outside the scope of this plugin. If this is the case, consider using the Python 3 Script plugin instead.

# Version History

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class Component:
DESCRIPTION = "Converts a string to an object containing key:value strings"
DESCRIPTION = "This action is used to convert a string to an object containing key:value strings.Any input requiring more than a single key:value pair, e.g. `USER=Bob` needs to use the `block_delimiter` option.In this case, the input string is split by the `block_delimiter` character first, and the resulting items are then splitby the `string_delimiter` option. Stripping of double-quotes is automatically applied in this situation for each item before the plugin returns it.The [output schema](https://docs.komand.com/v0.42.1/docs/python-script-plugins#section-configure-the-plugin-output-schema) on the action's page can be modified to pre-populate the workflow with the names of the keys.It allows users the ability to use the green selector and choose a specific variable later in the workflow by name.[Input templating](https://docs.komand.com/docs/input-templating) would need to be used to obtain variables by name otherwise"


class Input:
Expand Down
7 changes: 4 additions & 3 deletions plugins/string/plugin.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extension: plugin
products: [insightconnect]
name: string
title: String Operations
description: The String plugin provides common programmatic string operations
description: "The String Operations plugin allows easy manipulation of string data.\n\nThis plugin utilizes the Python 3 String library [set of methods](https://docs.python.org/3/library/stdtypes.html#string-methods)"
version: 1.4.2
connection_version: 1
vendor: rapid7
Expand Down Expand Up @@ -43,7 +43,8 @@ version_history:
- "1.1.0 - New action Set Encoding"
- "1.0.1 - Update plugin tag from `util` to `utilities` for Marketplace searchability"
- "1.0.0 - Initial plugin"
troubleshooting: "There may be complex string manipulation needs that are likely outside the scope of this plugin. If this is the case, consider using the Python 3 Script plugin instead."
troubleshooting:
- "There may be complex string manipulation needs that are likely outside the scope of this plugin. If this is the case, consider using the Python 3 Script plugin instead."
links:
- "[Python 3 String Methods](https://docs.python.org/3/library/stdtypes.html#string-methods)"
references:
Expand Down Expand Up @@ -109,7 +110,7 @@ actions:
example: '["This", "is", "a", "sentence"]'
split_to_object:
title: Split String to Object
description: Converts a string to an object containing key:value strings
description: "This action is used to convert a string to an object containing key:value strings.\n\nAny input requiring more than a single key:value pair, e.g. `USER=Bob` needs to use the `block_delimiter` option.\nIn this case, the input string is split by the `block_delimiter` character first, and the resulting items are then split\nby the `string_delimiter` option. Stripping of double-quotes is automatically applied in this situation for each item before the plugin returns it.\nThe [output schema](https://docs.komand.com/v0.42.1/docs/python-script-plugins#section-configure-the-plugin-output-schema) on the action's page can be modified to pre-populate the workflow with the names of the keys.\nIt allows users the ability to use the green selector and choose a specific variable later in the workflow by name.\n[Input templating](https://docs.komand.com/docs/input-templating) would need to be used to obtain variables by name otherwise"
input:
string:
title: String Input
Expand Down
2 changes: 1 addition & 1 deletion plugins/string/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(name="string-rapid7-plugin",
version="1.4.2",
description="The String plugin provides common programmatic string operations",
description="The String Operations plugin allows easy manipulation of string data.This plugin utilizes the Python 3 String library [set of methods](https://docs.python.org/3/library/stdtypes.html#string-methods)",
author="rapid7",
author_email="",
url="",
Expand Down

0 comments on commit 0ca1019

Please sign in to comment.