feat: Implement intelligent auto-categorization for skills

- Added `scripts/auto_categorize_skills.py` to analyze skill names and descriptions, auto-assigning categories based on keyword matching.
- Updated category distribution to show counts and sort categories by skill count in the Home page dropdown.
- Created documentation in `docs/CATEGORIZATION_IMPLEMENTATION.md` and `docs/SMART_AUTO_CATEGORIZATION.md` detailing the new categorization process and usage.
- Introduced `scripts/fix_year_2025_to_2026.py` to update all skill dates from 2025 to 2026.
- Enhanced user experience by moving "uncategorized" to the bottom of the category list and displaying skill counts in the dropdown.
This commit is contained in:
Zied
2026-02-26 12:52:03 +01:00
parent f8123cb5a9
commit 8de886a2ff
8 changed files with 4258 additions and 3520 deletions

View File

@@ -106,7 +106,17 @@ export function Home() {
setFilteredSkills(result);
}, [search, categoryFilter, skills]);
const categories = ['all', ...new Set(skills.map(s => s.category).filter(Boolean))];
// Sort categories by count (most skills first), with 'uncategorized' at the end
const categoryStats = {};
skills.forEach(skill => {
categoryStats[skill.category] = (categoryStats[skill.category] || 0) + 1;
});
const categories = ['all', ...Object.keys(categoryStats)
.filter(cat => cat !== 'uncategorized')
.sort((a, b) => categoryStats[b] - categoryStats[a]),
...(categoryStats['uncategorized'] ? ['uncategorized'] : [])
];
return (
<div className="space-y-8">
@@ -136,7 +146,12 @@ export function Home() {
onChange={(e) => setCategoryFilter(e.target.value)}
>
{categories.map(cat => (
<option key={cat} value={cat}>{cat.charAt(0).toUpperCase() + cat.slice(1)}</option>
<option key={cat} value={cat}>
{cat === 'all'
? 'All Categories'
: `${cat.charAt(0).toUpperCase() + cat.slice(1)} (${categoryStats[cat] || 0})`
}
</option>
))}
</select>
</div>