From 67b25bcf8ca023c8ba6c08a2cdfad37287cf976e Mon Sep 17 00:00:00 2001 From: user Date: Sun, 10 Mar 2024 22:20:16 +0300 Subject: [PATCH] Regenerate PLUGINS.md --- PLUGINS.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/PLUGINS.md b/PLUGINS.md index 7ee3449..01ee96c 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -1,5 +1,5 @@ - + ## Description and configuration of available plugins ### Table of content: @@ -1141,28 +1141,30 @@ Record produced by an internal event (usually error) inside the plugin ### `download` - Download a file -Take an url from a record field and download it as a file to specified location. -Field must contain a valid url with a scheme or a list of such urls. +Take an url from a field of a processed record with a name specified in `url_field` +and download it as a file to specified location. +The field must be present in the record and must contain a valid url with a scheme +(such as "https") or a list of such urls. -Primarily designed for downloading images, attached to a post, or thumbnails. -Does not support resuming interrupted download or detecting that this exact file is +Primarily designed for downloading images attached to a post, or thumbnails. +Does not support resuming interrupted downloads or detecting that this exact file is already stored at target location without downloading it again. File extension and name are inferred from HTTP headers and path part of the url, unless provided explicitly with `extension` and `filename` parameters. -Since final file name is determined as part of the download process, the file -is initially stored under temporary name (currently an sha1 of the url) in the +Since final file name is determined as a part of the download process, the file +is initially stored under a temporary name (currently an SHA1 of the url) in the download directory, and then renamed to target filename. -If file with given name already exists, based on `overwrite` setting new file will either +If a file with given name already exists, depending on an `overwrite` setting a new file will either overwrite it or get stored under different name, generated by combining -base name with a number added as part of `rename_suffix`. -If, however, exact copy of the new file is found among files in target directory -sharing base name, the new file will be deleted, giving preference to existing copy. +the base name with a number added as part of `rename_suffix`. +If, however, an exact copy of the new file is found among the files in target directory +sharing the base name, the new file will be deleted, giving preference to the existing copy. #### Plugin configuration options: -* `max_concurrent_downloads`: limit for simultaneously active download tasks among all entities. Note, that each entity will still process records sequentially regardless of this setting. Default value is `1`. +* `max_concurrent_downloads`: limit for simultaneously active download tasks among all entities. Note that each entity will still process records sequentially regardless of this setting. Default value is `1`. * `partial_file_suffix`: appended to a name of the file that is not yet completely downloaded. Default value is `.part`. @@ -1178,7 +1180,7 @@ sharing base name, the new file will be deleted, giving preference to existing c * `filename`: name downloaded file should be stored under. If not provided will be inferred from HTTP headers or download url. Supports templating with {...}. Not required. * `extension`: normally file extension will be inferred from HTTP headers. This option allows to overwrite it. Not required. * `overwrite`: whether file should be overwritten in if it already exists. If set to false will cause suffix with a number be added to the newly downloaded file name. Default value is `false`. -* `rename_suffix`: when overwriting is disabled, this suffix is attached to base filename with the "{i}" part replaced with a number. Must contain "{i}" exactly once. Default value is ` [{i}]`. +* `rename_suffix`: when overwriting is disabled, this suffix is attached to the base filename with the "{i}" part replaced with a number. Must contain "{i}" exactly once. Default value is ` [{i}]`. ---