A generic tool to populate Metric IDs into HTML files based on an Excel/CSV dictionary. Supports fuzzy matching and contextual prefixing (e.g. "Count" in "Login" tab to "Login User Count").
This skill provides a generic utility to scan an HTML file for text (metric names) and append their corresponding IDs from a provided data source.
h3, th, td).python3 .agent/skills/fill-metric-ids/scripts/fill_metrics.py \
--html <input.html> \
--source <metrics.xlsx>
The script automatically handles:
miniprogram_context.json to map specific tabs to metric prefixes.context.json:
{
"#login-tab": ["Login User"],
".share-section": ["Share User"]
}
If the tool finds "Count" inside <div id="login-tab">, it looks for "Login UserCount" in the Excel.