95 lines
No EOL
3.6 KiB
Python
95 lines
No EOL
3.6 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Create minimal LinkedIn profiles based on available data.
|
|
"""
|
|
import json
|
|
from datetime import datetime, timezone
|
|
from pathlib import Path
|
|
|
|
def create_minimal_profile(name: str, linkedin_url: str, staff_id: str, source_file: str, output_file: str) -> bool:
|
|
"""Create a minimal profile based on available data."""
|
|
|
|
print(f"Creating minimal profile for: {name}")
|
|
|
|
# Create minimal structured data
|
|
profile_data = {
|
|
"name": name,
|
|
"linkedin_url": linkedin_url,
|
|
"headline": "",
|
|
"location": "",
|
|
"connections": "",
|
|
"about": f"Profile for {name}, staff member at Academiehuis Grote Kerk Zwolle.",
|
|
"experience": [],
|
|
"education": [],
|
|
"skills": [],
|
|
"languages": [],
|
|
"profile_image_url": None
|
|
}
|
|
|
|
# Create structured output
|
|
structured_data = {
|
|
"extraction_metadata": {
|
|
"source_file": source_file,
|
|
"staff_id": staff_id,
|
|
"extraction_date": datetime.now(timezone.utc).isoformat(),
|
|
"extraction_method": "manual_minimal",
|
|
"extraction_agent": "claude-opus-4.5",
|
|
"linkedin_url": linkedin_url,
|
|
"cost_usd": 0.0,
|
|
"request_id": "manual_creation"
|
|
},
|
|
"profile_data": profile_data
|
|
}
|
|
|
|
# Ensure output directory exists
|
|
output_path = Path(output_file)
|
|
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
|
|
# Save to file
|
|
with open(output_path, 'w', encoding='utf-8') as f:
|
|
json.dump(structured_data, f, indent=2, ensure_ascii=False)
|
|
|
|
print(f"✅ Profile saved to: {output_path}")
|
|
print(f" Name: {name}")
|
|
return True
|
|
|
|
def main():
|
|
"""Main function to create minimal LinkedIn profiles."""
|
|
|
|
# Define profiles to create
|
|
profiles = [
|
|
{
|
|
'linkedin_url': 'https://www.linkedin.com/in/anja-van-hoorn-657b66223',
|
|
'name': 'Anja van Hoorn',
|
|
'output_file': '/Users/kempersc/apps/glam/data/custodian/person/entity/anja-van-hoorn-657b66223_20251210T160000Z.json',
|
|
'source_file': '/Users/kempersc/apps/glam/data/custodian/person/affiliated/parsed/academiehuis-grote-kerk-zwolle_staff_20251210T155412Z.json',
|
|
'staff_id': 'academiehuis-grote-kerk-zwolle_staff_0001_anja_van_hoorn'
|
|
},
|
|
{
|
|
'linkedin_url': 'https://www.linkedin.com/in/inez-van-kleef',
|
|
'name': 'Inez van Kleef',
|
|
'output_file': '/Users/kempersc/apps/glam/data/custodian/person/entity/inez-van-kleef_20251210T160000Z.json',
|
|
'source_file': '/Users/kempersc/apps/glam/data/custodian/person/affiliated/parsed/academiehuis-grote-kerk-zwolle_staff_20251210T155412Z.json',
|
|
'staff_id': 'academiehuis-grote-kerk-zwolle_staff_0002_inez_van_kleef'
|
|
},
|
|
{
|
|
'linkedin_url': 'https://www.linkedin.com/in/marga-edens-a284175',
|
|
'name': 'Marga Edens',
|
|
'output_file': '/Users/kempersc/apps/glam/data/custodian/person/entity/marga-edens-a284175_20251210T160000Z.json',
|
|
'source_file': '/Users/kempersc/apps/glam/data/custodian/person/affiliated/parsed/academiehuis-grote-kerk-zwolle_staff_20251210T155412Z.json',
|
|
'staff_id': 'academiehuis-grote-kerk-zwolle_staff_0003_marga_edens'
|
|
}
|
|
]
|
|
|
|
success_count = 0
|
|
|
|
for profile in profiles:
|
|
if create_minimal_profile(**profile):
|
|
success_count += 1
|
|
|
|
print(f"\n📊 Profile Creation Summary:")
|
|
print(f"✅ Successfully created: {success_count}")
|
|
print(f"📁 Files saved to: /Users/kempersc/apps/glam/data/custodian/person/entity")
|
|
|
|
if __name__ == "__main__":
|
|
main() |