MCPcopy
hub / github.com/zer0yu/CyberSecurityRSS / build_category_map

Function build_category_map

scripts/opml_sync.py:439–445  ·  view source on GitHub ↗
(body: ET.Element)

Source from the content-addressed store, hash-verified

437
438
439def build_category_map(body: ET.Element) -> Dict[str, ET.Element]:
440 mapping: Dict[str, ET.Element] = {}
441 for category in top_level_categories(body):
442 name = category_name(category)
443 if name and name not in mapping:
444 mapping[name] = category
445 return mapping
446
447
448def ensure_category(

Callers 1

sync_tiny_to_fullFunction · 0.70

Calls 2

top_level_categoriesFunction · 0.85
category_nameFunction · 0.70

Tested by

no test coverage detected