Writing help and saving
As in the case of model, it is good practice to document your scripts. A script's documentation contains its description as well as information about all inputs and outputs. This helps users to understand the purpose of the script.
To create a help file for the script, open it in the built-in Processing script editor and click on the Edit script help button on the editor toolbar. A Help editor dialog, familiar to us from the Filling model metadata and saving section of Chapter 8, Automating Analysis with Processing Models, opens.
This dialog is divided into three areas. On the top, there is a preview area. Here the current help content is displayed so that you can see in real-time mode how the final result will look. In the bottom-left part is the elements tree, where all the help sections are listed, including algorithm description, parameters, input, and other information. In the bottom-right part, there is an editing area. Here, we will enter the description of the...