Summary

🔎 Summarise data for quick insights and analysis.

The Summary feature in your script allows you to provide visual and textual feedback and important details. You can use various functions to add content to the Summary, such as text, lists, HTML, or even structured JSON data.

1. addListsToSummary

The addListsToSummary function is used to display a list of items in the Summary. You can configure it as follows:

addListsToSummary(
    [
        {
            value: "List item 1",
            valueColor: "#220010" , 
            iconColor: "#220010", 
            icon: "fa-duotone fa-check", 
        },
        {
            value: "List item 1",
            valueColor: "#220010" , 
            iconColor: "#220010", 
            icon: "fa-duotone fa-check",
        }
    ],
)

In this example, you provide an array of items to be displayed in the Summary. Each item has a value (the text to be displayed), valueColor (text colour), iconColor (icon colour), and icon (icon class name).

Output

The output is a visual list in the Summary with the specified items, colours, and icons. This helps organise information and provide users with a clear overview of the script's progress or results.

2. addHtmlToSummary

The addHtmlToSummary function allows you to include HTML content in the Summary. You can configure it like this:

addHtmlToSummary("<h1>You can put any html here. Might be useful when you want to display something fancy here.</h1>")

Output

The output is the rendered HTML content displayed in the Summary. This feature is useful when presenting information in a more visually appealing or customised format.

3. addJsonToSummary

The addJsonToSummary function is used to display structured JSON data in the Summary. Here's how you can configure it:

addJsonToSummary(
    {
        hello:"world"
    },  
    {
        enableCopy:true, 
        collapsed: 1, 
        name: "root", 
    } 
)

You provide a JSON object to be displayed in the Summary. Additionally, you can specify configuration options:

  • enableCopy: Allows users to copy the JSON data for reference.
  • collapsed: Determines whether the JSON data is initially collapsed (1) or expanded (0) in the Summary.
  • name: Specifies a name for the JSON data in the Summary.

Output

The output is a structured representation of the JSON data in the Summary. Users can interact with it, copy the data if allowed, and expand or collapse sections as needed.

📌 Need Help?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.