26 lines
824 B
Python
26 lines
824 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
|
|
with open('/root/.hermes/wizard-outputs/spark/skills_inventory.json') as f:
|
|
data = json.load(f)
|
|
|
|
print('VALID JSON: True')
|
|
print('Total skills:', data['total_skills'])
|
|
print('Generated at:', data['generated_at'])
|
|
print('Categories:', data['categories'])
|
|
print()
|
|
|
|
skills_with_links = [s for s in data['skills'] if s['linked_files']]
|
|
print(f"Skills with linked files: {len(skills_with_links)}")
|
|
|
|
link_types = {}
|
|
for skill in data['skills']:
|
|
for t in skill['linked_files']:
|
|
link_types[t] = link_types.get(t, 0) + 1
|
|
|
|
print('Linked files by type:')
|
|
for t, count in sorted(link_types.items()):
|
|
print(f' {t}: {count} skills')
|
|
|
|
total_links = sum(len(s['linked_files'].get(t, [])) for s in data['skills'] for t in s['linked_files'])
|
|
print(f'Total linked files: {total_links}') |