diff --git a/brands/huawei_cn.md b/brands/huawei_cn.md index b222be4..e24134c 100644 --- a/brands/huawei_cn.md +++ b/brands/huawei_cn.md @@ -1659,7 +1659,7 @@ `HEGE-550X`: 华为智慧屏 B7-510 -**华为小精灵学习智慧屏(Pad):** +**华为小精灵学习智慧屏:** `BLM-00`: 华为小精灵学习智慧屏 diff --git a/scripts/gen_csv.py b/scripts/gen_csv.py index 24b03d9..94f50cc 100644 --- a/scripts/gen_csv.py +++ b/scripts/gen_csv.py @@ -12,8 +12,9 @@ import re import traceback import pandas as pd from typing import Optional, List +from os.path import dirname, abspath -source_dir = r'../brands' +source_dir = os.path.join(dirname(dirname(abspath(__file__))), 'brands') device_type: Optional[str] = None # 设备类型:手机,电视,手环 root_brand: Optional[str] = None # 品牌代码 @@ -32,13 +33,14 @@ _re_non_word = re.compile(r'[\W_]+') _re_model_ver = re.compile(r'^`(([^`]+)`\s*)+:\s*') _re_model_item = re.compile(r'`([^`]+)`') # 匹配设备类型的正则 -_re_device_type = re.compile(r'(手机|手表|平板|电视主机|盒子|(智能)?电视|智慧屏|笔记本电脑|设备|Mobile|Phone|Pad|Pod|Tablet|Watch|Device|\bTV\b)') +_re_device_type = re.compile(r'(手机|手表|平板|电视主机|盒子|(智能)?电视|笔记本电脑|设备|Mobile|Phone|Pad|Pod|Tablet|Watch|Device|\bTV\b|学习智慧屏|智慧屏)') _device_map = dict( 手机='mob', mobile='mob', phone='mob', 电视='tv', 智能电视='tv', + 学习智慧屏='pad', 智慧屏='tv', 设备='device', 手表='watch', diff --git a/scripts/models.csv b/scripts/models.csv index 6c8a173..2c1065a 100644 --- a/scripts/models.csv +++ b/scripts/models.csv @@ -2208,7 +2208,7 @@ HD55KANY,tv,huawei,华为,,,华为智慧屏 B 系列,#5-510 HD65KANY,tv,huawei,华为,,,华为智慧屏 B 系列,#5-610 HEGE-550AX,tv,huawei,华为,,,华为智慧屏 B 系列,#7-500 HEGE-550X,tv,huawei,华为,,,华为智慧屏 B 系列,#7-510 -BLM-00,tv,huawei,华为,,,华为小精灵学习智慧屏(Pad),# +BLM-00,pad,huawei,华为,,,华为小精灵学习智慧屏,# HUAWEI U9500,mob,huawei,华为,,,华为 Ascend D1,# HUAWEI U9500E,mob,huawei,华为,,,华为 Ascend D1,#XL HUAWEI U9510,mob,huawei,华为,,,华为 Ascend D1,#四核