PPA Tools: Generate
Summary
This module contains actions used to generate various data.
Actions
ppa_tools.generate.
html_table
Generate an HTML table to use in a markdown document or email.
Minimum Plugin Version: 1.2.0
Input
-
header: a list of table column headers
-
rows: the table contents as a list of lists, where each inner list is a row of values
Output
The generated HTML table as a string.
Example
1 2 3 4 5 6 7 8 9 10 |
|
ppa_tools.generate.
random_number
Generate a random number within a defined range.
Minimum Plugin Version: 8.2.0
Input
-
minimum: the smallest number in the range (defaults to
0
) -
maximum: the largest number in the range (defaults to
10
)
Output
The generated number.
Example
1 2 |
|
ppa_tools.generate.
table_from_dictionaries
Generate table data from a list of dictionaries.
Minimum Plugin Version: 1.3.0
Input
-
header: a list of table column headers
-
keys: a list of corresponding dictionary keys, one for each
header
-
dictionaries: a list of dictionaries to get the values of each
key
from
Output
A dictionary containing the keys header
& rows
.
Example
-
Finding failed SSH logons using extract_values & saving them as
failed_logons
-
Using this action to turn
failed_logons
into table data, & saving it asfailed_logons_table
-
Displaying a table using the data generated by this action
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Headers & Keys
The header
& keys
lists must be the same length, & the attributes must be in the same order.
If a supplied key is missing from a dictionary, its value will be blank.
ppa_tools.generate.
uuid
Generate a UUID.
Minimum Plugin Version: 8.2.0
Input
This action takes no inputs.
Output
The generated UUID as a string.
Example
1 2 |
|