[samsung-mobile] Add automation (#437)

Detect new models and aggregate EOL data for Samsung Mobile devices.

This script works cumulatively: when a model is not listed anymore on https://security.samsungmobile.com/workScope.smsb
it retains the date and use it as the model's EOL date.
This commit is contained in:
Marc Wrobel
2025-05-03 14:25:41 +02:00
parent 97790695ee
commit 6091ef55fe
6 changed files with 1883 additions and 6 deletions

View File

@@ -127,3 +127,13 @@ def list_configs(products_filter: str = None, methods_filter: str = None, urls_f
products = list_products(products_filter)
configs_by_product = [p.auto_configs(methods_filter, urls_filter) for p in products]
return list(itertools.chain.from_iterable(configs_by_product)) # flatten the list of lists
"""Convert a string to a valid endoflife.date identifier."""
def to_identifier(s: str) -> str:
identifier = s.strip().lower()
identifier = identifier.replace(" ", "-")
return re.sub(r"[^a-z0-9.\-+_]", "", identifier)
return s.lower().replace(" ", "_").replace(".", "_").replace("/", "_")