201 lines
9.7 KiB
Python
201 lines
9.7 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Update repair keywords with comprehensive list from motherboardrepair.ca
|
|
|
|
This script updates our repair_keywords.json with keywords extracted from
|
|
the motherboard repair website's configuration files.
|
|
"""
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
def update_keywords_from_website():
|
|
"""Update keywords with comprehensive website data"""
|
|
|
|
# Keywords extracted from motherboardrepair.ca sst.yml and keywords.csv
|
|
website_keywords = {
|
|
"iphone_repairs": {
|
|
"name": "iPhone Repair Requests",
|
|
"description": "Most common iPhone repair requests from website",
|
|
"devices": ["iPhone", "iPhone 12", "iPhone 13", "iPhone 14", "iPhone 15"],
|
|
"problems": [
|
|
"iPhone logic board repair", "iPhone motherboard repair", "iPhone no power",
|
|
"iPhone boot loop", "iPhone not charging", "micro-soldering repairs",
|
|
"nanosoldering", "iPhone screen broken", "iPhone water damage",
|
|
"iPhone repair", "iPhone fix", "iPhone not working"
|
|
]
|
|
},
|
|
"macbook_repairs": {
|
|
"name": "MacBook Repair Requests",
|
|
"description": "MacBook hardware repair needs from website",
|
|
"devices": ["MacBook", "MacBook Pro", "MacBook Air"],
|
|
"problems": [
|
|
"MacBook logic board repair", "MacBook motherboard repair", "MacBook no power",
|
|
"MacBook liquid damage", "MacBook not charging", "MacBook screen broken",
|
|
"MacBook keyboard", "MacBook repair", "MacBook fix", "MacBook not working",
|
|
"MacBook won't turn on"
|
|
]
|
|
},
|
|
"ipad_repairs": {
|
|
"name": "iPad Repair Requests",
|
|
"description": "iPad repair and maintenance from website",
|
|
"devices": ["iPad", "iPad Pro", "iPad Air", "iPad mini"],
|
|
"problems": [
|
|
"iPad logic board repair", "iPad motherboard repair", "iPad no power",
|
|
"iPad not charging", "iPad backlight repair", "iPad screen broken",
|
|
"iPad repair", "iPad fix", "iPad not working"
|
|
]
|
|
},
|
|
"laptop_repairs": {
|
|
"name": "Laptop Repair Requests",
|
|
"description": "General laptop repair discussions from website",
|
|
"devices": ["laptop", "computer", "notebook", "gaming laptop"],
|
|
"problems": [
|
|
"laptop motherboard repair", "logic board repair", "gaming laptop repair",
|
|
"no power laptop", "liquid damage repair", "charging port repair",
|
|
"laptop repair", "laptop fix", "laptop not working", "laptop screen broken",
|
|
"laptop keyboard", "laptop won't turn on"
|
|
]
|
|
},
|
|
"android_repairs": {
|
|
"name": "Android Device Repairs",
|
|
"description": "Android/Samsung device repair needs from website",
|
|
"devices": ["Samsung", "Samsung Galaxy", "Galaxy", "Android", "Google Pixel"],
|
|
"problems": [
|
|
"Samsung logic board repair", "Samsung motherboard repair", "Galaxy no power",
|
|
"Samsung boot loop", "Samsung not charging", "Android logic board repair",
|
|
"Google Pixel repair", "Android no power", "Android boot loop",
|
|
"Samsung repair", "Android repair", "Galaxy repair"
|
|
]
|
|
},
|
|
"console_repairs": {
|
|
"name": "Gaming Console Repairs",
|
|
"description": "Console repair and maintenance from website",
|
|
"devices": ["PS5", "PS4", "Xbox", "Nintendo Switch", "PlayStation"],
|
|
"problems": [
|
|
"PlayStation repair", "PS5 repair", "PS4 repair", "HDMI port replacement",
|
|
"PlayStation disc drive repair", "Xbox repair", "Nintendo Switch repair",
|
|
"Joy-Con drift fix", "Switch screen replacement", "gaming console fix",
|
|
"console repair", "PlayStation", "Xbox"
|
|
]
|
|
},
|
|
"gpu_repairs": {
|
|
"name": "GPU/Graphics Card Repairs",
|
|
"description": "Graphics card and GPU repair needs from website",
|
|
"devices": ["GPU", "graphics card", "NVIDIA", "RTX", "GTX"],
|
|
"problems": [
|
|
"GPU repair", "graphics card repair", "NVIDIA repair", "RTX repair",
|
|
"GTX repair", "GPU refurbishing", "expert nvidia", "nvidia gpu"
|
|
]
|
|
},
|
|
"data_recovery": {
|
|
"name": "Data Recovery Requests",
|
|
"description": "Data recovery and storage repair from website",
|
|
"devices": [],
|
|
"problems": [
|
|
"data recovery", "phone data recovery", "SSD recovery", "hard drive data recovery",
|
|
"NVMe recovery", "mechanical failure recovery", "firmware recovery",
|
|
"chip-off", "JTAG", "nanosoldering", "data extraction",
|
|
"non-functional devices", "recover data", "lost files", "hard drive recovery"
|
|
]
|
|
},
|
|
"general_repairs": {
|
|
"name": "General Repair Services",
|
|
"description": "General repair service requests from website",
|
|
"devices": [],
|
|
"problems": [
|
|
"electronics repair services", "console repair", "MacBook repair",
|
|
"data recovery", "microsoldering", "nanosoldering", "laptop repair",
|
|
"iPhone repair", "motherboard repair", "repair service", "professional repair",
|
|
"looking for repair", "need repair", "repair shop", "local repair"
|
|
]
|
|
},
|
|
"screen_damage": {
|
|
"name": "Screen/Display Damage",
|
|
"description": "Broken or damaged screens/displays from website",
|
|
"devices": ["iPhone", "iPad", "MacBook", "laptop", "computer", "Samsung", "Android"],
|
|
"problems": [
|
|
"screen broken", "cracked screen", "display damaged", "screen replacement",
|
|
"touch screen not working", "screen refurbishment", "LCD glass replacement",
|
|
"screen glass repair", "damaged glass"
|
|
]
|
|
},
|
|
"power_issues": {
|
|
"name": "Power/Charging Issues",
|
|
"description": "Devices with power or charging problems from website",
|
|
"devices": ["iPhone", "iPad", "MacBook", "laptop", "computer", "Samsung", "Android", "PS5", "PS4", "Xbox"],
|
|
"problems": [
|
|
"won't turn on", "no power", "dead", "not starting", "bricked",
|
|
"won't boot", "boot failure", "power button", "won't charge",
|
|
"not charging", "charging port broken", "battery dead"
|
|
]
|
|
},
|
|
"water_liquid_damage": {
|
|
"name": "Water/Liquid Damage",
|
|
"description": "Devices damaged by water or liquid from website",
|
|
"devices": ["iPhone", "iPad", "MacBook", "laptop", "computer", "Samsung", "Android"],
|
|
"problems": [
|
|
"water damage", "spilled", "liquid damage", "got wet", "water damaged",
|
|
"liquid spilled", "motherboard repair"
|
|
]
|
|
},
|
|
"hdmi_issues": {
|
|
"name": "HDMI Port Issues",
|
|
"description": "HDMI port repair and replacement from website",
|
|
"devices": ["PS5", "Xbox", "graphics card", "laptop", "computer"],
|
|
"problems": [
|
|
"HDMI port repair", "PS5 HDMI replacement", "Xbox HDMI port fix",
|
|
"graphics card HDMI repair", "laptop HDMI port", "HDMI not working"
|
|
]
|
|
},
|
|
"key_fob_repairs": {
|
|
"name": "Key Fob Repairs",
|
|
"description": "Car key fob repair and maintenance from website",
|
|
"devices": [],
|
|
"problems": [
|
|
"key fob repair", "car key remote repair", "key fob microsoldering",
|
|
"key fob battery contacts", "button pad repair", "fob repairs"
|
|
]
|
|
}
|
|
}
|
|
|
|
# Additional keywords from the CSV file
|
|
csv_keywords = [
|
|
"motherboard repair", "MRC", "microsoldering", "nanosoldering", "console repair",
|
|
"logic board repair", "MacBook repair", "iPhone repair", "iPad repair", "laptop repair",
|
|
"data recovery", "graphics card repair", "GPU repair", "electronics repair",
|
|
"professional repair", "microsoldering services", "nanosoldering services",
|
|
"Nintendo Switch repair", "PlayStation repair", "Xbox repair", "SSD recovery",
|
|
"HDMI port repair", "hard drive recovery", "repair service", "professional microsoldering",
|
|
"professional nanosoldering", "gaming laptop repair", "phone data recovery"
|
|
]
|
|
|
|
# Create the updated keywords structure
|
|
keywords_data = {
|
|
"description": "Comprehensive repair keywords extracted from motherboardrepair.ca website",
|
|
"version": "2.0",
|
|
"source": "motherboardrepair.ca sst.yml and keywords.csv",
|
|
"last_updated": "2026-01-19",
|
|
"categories": website_keywords,
|
|
"additional_keywords": {
|
|
"urgency_indicators": ["emergency", "urgent", "help needed", "asap", "quick", "fast"],
|
|
"location_indicators": ["local", "near me", "in my area", "downtown", "nearby"],
|
|
"service_types": ["diagnostics", "diagnostic", "troubleshooting", "microsolder", "component repair", "board repair"]
|
|
},
|
|
"raw_csv_keywords": csv_keywords
|
|
}
|
|
|
|
# Save to our data directory
|
|
output_path = Path("data/repair_keywords.json")
|
|
with open(output_path, 'w', encoding='utf-8') as f:
|
|
json.dump(keywords_data, f, indent=2, ensure_ascii=False)
|
|
|
|
print("✅ Updated repair_keywords.json with comprehensive website keywords")
|
|
print(f"📊 Categories: {len(website_keywords)}")
|
|
print(f"📝 Total keywords: {sum(len(cat.get('problems', [])) for cat in website_keywords.values()) + len(csv_keywords)}")
|
|
|
|
def main():
|
|
update_keywords_from_website()
|
|
|
|
if __name__ == "__main__":
|
|
main() |