MCPcopy Index your code
hub / github.com/zer0yu/CyberSecurityRSS / build_category_map

Function build_category_map

scripts/add_feed_to_tiny.py:90–98  ·  view source on GitHub ↗
(body: ET.Element)

Source from the content-addressed store, hash-verified

88
89
90def build_category_map(body: ET.Element) -> Dict[str, ET.Element]:
91 mapping: Dict[str, ET.Element] = {}
92 for child in list(body):
93 if child.tag != "outline" or is_rss_outline(child):
94 continue
95 name = category_name(child)
96 if name and name not in mapping:
97 mapping[name] = child
98 return mapping
99
100
101def resolve_category_name(requested_name: str, category_map: Dict[str, ET.Element]) -> str:

Callers 1

add_feed_to_treeFunction · 0.70

Calls 2

is_rss_outlineFunction · 0.70
category_nameFunction · 0.70

Tested by

no test coverage detected