tests looks good, regenerate output
This commit is contained in:
parent
88239ffb55
commit
87837bbc29
2 changed files with 10 additions and 2 deletions
|
|
@ -211,10 +211,13 @@ class RegexPlugin(Plugin[RegexOptions]):
|
||||||
)
|
)
|
||||||
|
|
||||||
# otherwise, use defaults (apply them using the original entry source dict)
|
# otherwise, use defaults (apply them using the original entry source dict)
|
||||||
|
source_variables_and_overrides_dict = dict(
|
||||||
|
entry_variable_dict, **self.overrides.dict_with_format_strings
|
||||||
|
)
|
||||||
entry.add_variables(
|
entry.add_variables(
|
||||||
variables_to_add={
|
variables_to_add={
|
||||||
_source_var_name(source_var, i): default.apply_formatter(
|
_source_var_name(source_var, i): default.apply_formatter(
|
||||||
variable_dict=entry_variable_dict
|
variable_dict=source_variables_and_overrides_dict
|
||||||
)
|
)
|
||||||
for i, default in enumerate(regex_options.defaults)
|
for i, default in enumerate(regex_options.defaults)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ def regex_subscription_dict(output_directory):
|
||||||
"match": ["([0-9]+)-([0-9]+)-27"],
|
"match": ["([0-9]+)-([0-9]+)-27"],
|
||||||
"defaults": [
|
"defaults": [
|
||||||
"First",
|
"First",
|
||||||
"Second",
|
"Second containing {in_regex_default}",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"artist": {"match": ["Never (.*) capture"], "defaults": ["Always default"]},
|
"artist": {"match": ["Never (.*) capture"], "defaults": ["Always default"]},
|
||||||
|
|
@ -46,8 +46,13 @@ def regex_subscription_dict(output_directory):
|
||||||
"desc_cap": "{description_capture_1}",
|
"desc_cap": "{description_capture_1}",
|
||||||
"upload_date_both_caps": "{upload_date_standardized_capture_1} and {upload_date_standardized_capture_2}",
|
"upload_date_both_caps": "{upload_date_standardized_capture_1} and {upload_date_standardized_capture_2}",
|
||||||
"artist_cap_always_default": "{artist_capture_1}",
|
"artist_cap_always_default": "{artist_capture_1}",
|
||||||
|
"override_with_capture_variable": "{contains_regex_default}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"overrides": {
|
||||||
|
"in_regex_default": "in regex default",
|
||||||
|
"contains_regex_default": "contains {title_capture_1}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue