String template
StringTemplateExtract
Bases: ExtractionMethod
Accepts a template and output_key. Existing terms are added to the template.
Method name: string_template
Example Configuration
.. code-block:: yaml
- method: string_template
inputs:
template: {hello}/{goodbye}/{hello}/bonjour.html
output_key: manifest_url
Source code in extraction_methods/plugins/string_template.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
StringTemplateInput
Bases: Input
Model for String Template Input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
str
|
Template to follow. |
required |
descructive
|
bool
|
True if terms should be removed after templating. |
False
|
output_key
|
str
|
key to output to. |
required |
Source code in extraction_methods/plugins/string_template.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |