Include link to EveryMac search

Addresses issue #34
This commit is contained in:
2Shirt 2023-09-23 15:51:37 -07:00
parent f6fa922bb3
commit eacbb885b3
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -18,6 +18,7 @@ from wk.ui import ansi
# STATIC VARIABLES
LOG = logging.getLogger(__name__)
EVERYMAC_URL = 'https://everymac.com/ultimate-mac-lookup/?search_keywords='
@dataclass(slots=True)
@ -162,9 +163,13 @@ class System:
return report
# Get details
report.append(f'Vendor: {get_dmi_info_linux("sys_vendor")}')
vendor = get_dmi_info_linux("sys_vendor")
serial = get_dmi_info_linux("product_serial")
report.append(f'Vendor: {vendor}')
report.append(f'Name: {get_dmi_info_linux("product_name")}')
report.append(f'Serial: {get_dmi_info_linux("product_serial")}')
report.append(f'Serial: {serial}')
if 'apple' in vendor.lower():
report.append(f'{EVERYMAC_URL}{serial}')
# Done
return report