This commit is contained in:
baiqwerdvd 2024-09-06 02:43:03 +08:00
parent 5e57113f2d
commit 0b313a1c3f
No known key found for this signature in database
GPG Key ID: 7717E46E1797411A
40 changed files with 182 additions and 203 deletions

View File

@ -1,15 +1,15 @@
from typing import Dict, Union from typing import Dict, Union
from msgspec import convert
from httpx import AsyncClient from httpx import AsyncClient
from msgspec import convert
from ..utils import _HEADER
from .model import ( from .model import (
HakushHsrCharacter, HakushHsrCharacter,
HakushHsrLightcone,
HakushHsrCharacterIndex, HakushHsrCharacterIndex,
HakushHsrLightcone,
HakushHsrLightconeIndex, HakushHsrLightconeIndex,
) )
from ..utils import _HEADER
async def get_character_data( async def get_character_data(

View File

@ -1,12 +1,10 @@
from __future__ import annotations
from pathlib import Path from pathlib import Path
from msgspec import convert
from httpx import AsyncClient from httpx import AsyncClient
from msgspec import convert
from ..utils import _HEADER
from .models import MihomoData from .models import MihomoData
from ..utils import _HEADER
from ....utils.resource.RESOURCE_PATH import PLAYER_PATH from ....utils.resource.RESOURCE_PATH import PLAYER_PATH

View File

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Union, Optional from typing import Any, Dict, List, Optional, Union
from msgspec import Struct from msgspec import Struct

View File

@ -1,8 +1,5 @@
import re import re
from .draw_abyss_card import draw_abyss_img
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
@ -10,6 +7,9 @@ from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.error_reply import UID_HINT from gsuid_core.utils.error_reply import UID_HINT
from .draw_abyss_card import draw_abyss_img
from ..utils.sr_prefix import PREFIX
sv_srabyss = SV("sr查询深渊") sv_srabyss = SV("sr查询深渊")

View File

@ -1,6 +1,15 @@
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Union from typing import Any, Dict, Union
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
from .utils import get_icon from .utils import get_icon
from ..sruid_utils.api.mys.models import AbyssAvatar from ..sruid_utils.api.mys.models import AbyssAvatar
from ..utils.fonts.starrail_fonts import ( from ..utils.fonts.starrail_fonts import (
@ -12,15 +21,6 @@ from ..utils.fonts.starrail_fonts import (
) )
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
TEXT_PATH = Path(__file__).parent / "texture2D" TEXT_PATH = Path(__file__).parent / "texture2D"
white_color = (255, 255, 255) white_color = (255, 255, 255)
gray_color = (175, 175, 175) gray_color = (175, 175, 175)

View File

@ -1,8 +1,5 @@
import re import re
from .draw_abyss_card import draw_abyss_img
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
@ -10,6 +7,9 @@ from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.error_reply import UID_HINT from gsuid_core.utils.error_reply import UID_HINT
from .draw_abyss_card import draw_abyss_img
from ..utils.sr_prefix import PREFIX
sv_abyss_boss = SV("sr查询末日幻影") sv_abyss_boss = SV("sr查询末日幻影")

View File

@ -1,6 +1,15 @@
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Union from typing import Any, Dict, Union
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
from .utils import get_icon from .utils import get_icon
from ..sruid_utils.api.mys.models import AbyssAvatar from ..sruid_utils.api.mys.models import AbyssAvatar
from ..utils.fonts.starrail_fonts import ( from ..utils.fonts.starrail_fonts import (
@ -12,15 +21,6 @@ from ..utils.fonts.starrail_fonts import (
) )
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
TEXT_PATH = Path(__file__).parent / "texture2D" TEXT_PATH = Path(__file__).parent / "texture2D"
white_color = (255, 255, 255) white_color = (255, 255, 255)
gray_color = (175, 175, 175) gray_color = (175, 175, 175)

View File

@ -1,8 +1,5 @@
import re import re
from .draw_abyss_card import draw_abyss_img
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
@ -10,6 +7,9 @@ from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.error_reply import UID_HINT from gsuid_core.utils.error_reply import UID_HINT
from .draw_abyss_card import draw_abyss_img
from ..utils.sr_prefix import PREFIX
sv_abyss_story = SV("sr查询虚构叙事") sv_abyss_story = SV("sr查询虚构叙事")

View File

@ -1,6 +1,15 @@
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Union from typing import Any, Dict, Union
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
from .utils import get_icon from .utils import get_icon
from ..sruid_utils.api.mys.models import AbyssAvatar from ..sruid_utils.api.mys.models import AbyssAvatar
from ..utils.fonts.starrail_fonts import ( from ..utils.fonts.starrail_fonts import (
@ -12,15 +21,6 @@ from ..utils.fonts.starrail_fonts import (
) )
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
TEXT_PATH = Path(__file__).parent / "texture2D" TEXT_PATH = Path(__file__).parent / "texture2D"
white_color = (255, 255, 255) white_color = (255, 255, 255)
gray_color = (175, 175, 175) gray_color = (175, 175, 175)

View File

@ -1,5 +1,10 @@
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from gsuid_core.sv import SV
from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.error_reply import get_error
from ..utils.error_reply import UID_HINT from ..utils.error_reply import UID_HINT
from ..utils.map.name_covert import ( from ..utils.map.name_covert import (
alias_to_char_name, alias_to_char_name,
@ -8,11 +13,6 @@ from ..utils.map.name_covert import (
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from ..utils.sr_prefix import PREFIX from ..utils.sr_prefix import PREFIX
from gsuid_core.sv import SV
from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.error_reply import get_error
if TYPE_CHECKING: if TYPE_CHECKING:
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event

View File

@ -2,12 +2,6 @@ from pathlib import Path
import re import re
from typing import Tuple, cast from typing import Tuple, cast
from .get_char_img import draw_char_info_img
from .to_card import api_to_card
from ..utils.error_reply import UID_HINT
from ..utils.resource.RESOURCE_PATH import TEMP_PATH
from ..utils.sr_prefix import PREFIX
from PIL import Image from PIL import Image
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.message_models import Button from gsuid_core.message_models import Button
@ -18,6 +12,12 @@ from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.image.convert import convert_img from gsuid_core.utils.image.convert import convert_img
from starrail_damage_cal.map.SR_MAP_PATH import avatarId2Name from starrail_damage_cal.map.SR_MAP_PATH import avatarId2Name
from .get_char_img import draw_char_info_img
from .to_card import api_to_card
from ..utils.error_reply import UID_HINT
from ..utils.resource.RESOURCE_PATH import TEMP_PATH
from ..utils.sr_prefix import PREFIX
sv_char_info_config = SV("sr面板设置", pm=2) sv_char_info_config = SV("sr面板设置", pm=2)
sv_get_char_info = SV("sr面板查询", priority=10) sv_get_char_info = SV("sr面板查询", priority=10)
sv_get_sr_original_pic = SV("sr查看面板原图", priority=5) sv_get_sr_original_pic = SV("sr查看面板原图", priority=5)

View File

@ -1,33 +1,20 @@
import copy import copy
import json import json
import math import math
import textwrap
from pathlib import Path from pathlib import Path
import textwrap
from typing import Dict, Union from typing import Dict, Union
from PIL import Image, ImageDraw from PIL import Image, ImageDraw
from gsuid_core.logger import logger from gsuid_core.logger import logger
from starrail_damage_cal.to_data import api_to_dict
from gsuid_core.utils.image.convert import convert_img from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import draw_text_by_line from gsuid_core.utils.image.image_tools import draw_text_by_line
from starrail_damage_cal.cal_damage import cal_info, cal_char_info from starrail_damage_cal.cal_damage import cal_char_info, cal_info
from starrail_damage_cal.to_data import api_to_dict
from ..utils.error_reply import CHAR_HINT from ..utils.error_reply import CHAR_HINT
from ..utils.fonts.first_world import fw_font_28
from ..utils.excel.read_excel import light_cone_ranks from ..utils.excel.read_excel import light_cone_ranks
from ..utils.map.name_covert import name_to_avatar_id, alias_to_char_name from ..utils.fonts.first_world import fw_font_28
from ..utils.map.SR_MAP_PATH import (
RelicId2Rarity,
AvatarRelicScore,
avatarId2Name,
)
from ..utils.resource.RESOURCE_PATH import (
RELIC_PATH,
SKILL_PATH,
PLAYER_PATH,
WEAPON_PATH,
CHAR_PORTRAIT_PATH,
)
from ..utils.fonts.starrail_fonts import ( from ..utils.fonts.starrail_fonts import (
sr_font_18, sr_font_18,
sr_font_20, sr_font_20,
@ -38,6 +25,19 @@ from ..utils.fonts.starrail_fonts import (
sr_font_34, sr_font_34,
sr_font_38, sr_font_38,
) )
from ..utils.map.SR_MAP_PATH import (
AvatarRelicScore,
RelicId2Rarity,
avatarId2Name,
)
from ..utils.map.name_covert import alias_to_char_name, name_to_avatar_id
from ..utils.resource.RESOURCE_PATH import (
CHAR_PORTRAIT_PATH,
PLAYER_PATH,
RELIC_PATH,
SKILL_PATH,
WEAPON_PATH,
)
Excel_path = Path(__file__).parent Excel_path = Path(__file__).parent
with Path.open(Excel_path / "Excel" / "SkillData.json", encoding="utf-8") as f: with Path.open(Excel_path / "Excel" / "SkillData.json", encoding="utf-8") as f:

View File

@ -3,6 +3,13 @@ from pathlib import Path
import re import re
from typing import Dict, Optional, Tuple, Union from typing import Dict, Optional, Tuple, Union
from gsuid_core.logger import logger
from starrail_damage_cal.excel.model import (
AvatarPromotionConfig,
EquipmentPromotionConfig,
)
from starrail_damage_cal.to_data import api_to_dict
from .draw_char_img import draw_char_img from .draw_char_img import draw_char_img
from ..utils.error_reply import CHAR_HINT from ..utils.error_reply import CHAR_HINT
from ..utils.map.SR_MAP_PATH import ( from ..utils.map.SR_MAP_PATH import (
@ -28,13 +35,6 @@ from ..utils.map.name_covert import (
) )
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
from gsuid_core.logger import logger
from starrail_damage_cal.excel.model import (
AvatarPromotionConfig,
EquipmentPromotionConfig,
)
from starrail_damage_cal.to_data import api_to_dict
WEAPON_TO_INT = { WEAPON_TO_INT = {
"": 1, "": 1,
"": 2, "": 2,

View File

@ -3,15 +3,15 @@ from pathlib import Path
from typing import Dict, List, Tuple, Union from typing import Dict, List, Tuple, Union
from PIL import Image, ImageDraw from PIL import Image, ImageDraw
from starrail_damage_cal.to_data import api_to_dict
from gsuid_core.utils.image.convert import convert_img from gsuid_core.utils.image.convert import convert_img
from starrail_damage_cal.map.SR_MAP_PATH import avatarId2Name
from gsuid_core.utils.image.image_tools import crop_center_img from gsuid_core.utils.image.image_tools import crop_center_img
from starrail_damage_cal.map.SR_MAP_PATH import avatarId2Name
from starrail_damage_cal.to_data import api_to_dict
from ..utils.fonts.first_world import fw_font_28 from ..utils.fonts.first_world import fw_font_28
from ..utils.map.name_covert import avatar_id_to_char_star
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH, CHAR_PREVIEW_PATH
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_58 from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_58
from ..utils.map.name_covert import avatar_id_to_char_star
from ..utils.resource.RESOURCE_PATH import CHAR_PREVIEW_PATH, PLAYER_PATH
half_color = (255, 255, 255, 120) half_color = (255, 255, 255, 120)
first_color = (29, 29, 29) first_color = (29, 29, 29)

View File

@ -1,12 +1,12 @@
from .set_config import set_config_func
from ..starrailuid_config.sr_config import srconfig
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.logger import logger from gsuid_core.logger import logger
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from .set_config import set_config_func
from ..starrailuid_config.sr_config import srconfig
PREFIX = srconfig.get_config("StarRailPrefix").data PREFIX = srconfig.get_config("StarRailPrefix").data
sv_self_config = SV("星穹铁道配置") sv_self_config = SV("星穹铁道配置")

View File

@ -2,10 +2,10 @@ from typing import Dict
from gsuid_core.utils.plugins_config.models import ( from gsuid_core.utils.plugins_config.models import (
GSC, GSC,
GsStrConfig,
GsBoolConfig, GsBoolConfig,
GsListStrConfig,
GsIntConfig, GsIntConfig,
GsListStrConfig,
GsStrConfig,
) )
CONIFG_DEFAULT: Dict[str, GSC] = { CONIFG_DEFAULT: Dict[str, GSC] = {

View File

@ -1,14 +1,14 @@
from .draw_gachalogs import draw_gachalogs_img
from .get_gachalogs import save_gachalogs
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
from gsuid_core.utils.database.api import get_uid from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from .draw_gachalogs import draw_gachalogs_img
from .get_gachalogs import save_gachalogs
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
sv_gacha_log = SV("sr抽卡记录") sv_gacha_log = SV("sr抽卡记录")
sv_get_gachalog_by_link = SV("sr导入抽卡链接", area="DIRECT") sv_get_gachalog_by_link = SV("sr导入抽卡链接", area="DIRECT")

View File

@ -4,6 +4,15 @@ import json
from pathlib import Path from pathlib import Path
from typing import List, Tuple, Union from typing import List, Tuple, Union
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_color_bg,
get_qq_avatar,
)
from ..utils.fonts.starrail_fonts import ( from ..utils.fonts.starrail_fonts import (
sr_font_20, sr_font_20,
sr_font_24, sr_font_24,
@ -18,15 +27,6 @@ from ..utils.resource.RESOURCE_PATH import (
WEAPON_PATH, WEAPON_PATH,
) )
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_color_bg,
get_qq_avatar,
)
TEXT_PATH = Path(__file__).parent / "texture2d" TEXT_PATH = Path(__file__).parent / "texture2d"
EMO_PATH = Path(__file__).parent / "texture2d" / "emo" EMO_PATH = Path(__file__).parent / "texture2d" / "emo"

View File

@ -1,15 +1,15 @@
import json
import asyncio import asyncio
from pathlib import Path
from urllib import parse
from datetime import datetime from datetime import datetime
import json
from pathlib import Path
from typing import Dict, List, Optional from typing import Dict, List, Optional
from urllib import parse
import msgspec import msgspec
from ..sruid_utils.api.mys.models import SingleGachaLog
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
from ..sruid_utils.api.mys.models import SingleGachaLog
gacha_type_meta_data = { gacha_type_meta_data = {
"群星跃迁": ["1"], "群星跃迁": ["1"],

View File

@ -1,7 +1,7 @@
from gsuid_core.sv import SV
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event
from gsuid_core.logger import logger from gsuid_core.logger import logger
from gsuid_core.models import Event
from gsuid_core.sv import SV
from .get_help import get_core_help from .get_help import get_core_help
from ..utils.sr_prefix import PREFIX from ..utils.sr_prefix import PREFIX

View File

@ -1,14 +1,14 @@
from pathlib import Path from pathlib import Path
from typing import Dict, Union, Optional from typing import Dict, Optional, Union
import aiofiles
from PIL import Image from PIL import Image
from msgspec import json as msgjson import aiofiles
from gsuid_core.help.model import PluginHelp
from gsuid_core.help.draw_plugin_help import get_help from gsuid_core.help.draw_plugin_help import get_help
from gsuid_core.help.model import PluginHelp
from msgspec import json as msgjson
from ..version import StarRail_version
from ..utils.fonts.starrail_fonts import starrail_font_origin from ..utils.fonts.starrail_fonts import starrail_font_origin
from ..version import StarRail_version
TEXT_PATH = Path(__file__).parent / "texture2d" TEXT_PATH = Path(__file__).parent / "texture2d"
HELP_DATA = Path(__file__).parent / "Help.json" HELP_DATA = Path(__file__).parent / "Help.json"

View File

@ -1,14 +1,14 @@
from .draw_note_card import draw_note_img
from .note_text import award
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
from gsuid_core.utils.database.api import get_uid from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from .draw_note_card import draw_note_img
from .note_text import award
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
sv_get_monthly_data = SV("sr查询月历") sv_get_monthly_data = SV("sr查询月历")

View File

@ -1,10 +1,10 @@
from gsuid_core.sv import SV
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event
from gsuid_core.logger import logger from gsuid_core.logger import logger
from gsuid_core.models import Event
from gsuid_core.sv import SV
from ..utils.sr_prefix import PREFIX
from ..utils.resource.download_from_cos import check_use from ..utils.resource.download_from_cos import check_use
from ..utils.sr_prefix import PREFIX
sv_sr_download_config = SV("sr下载资源", pm=1) sv_sr_download_config = SV("sr下载资源", pm=1)

View File

@ -1,8 +1,5 @@
import re import re
from .draw_rogue_card import draw_rogue_img, draw_rogue_locust_img
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
@ -10,6 +7,9 @@ from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.error_reply import UID_HINT from gsuid_core.utils.error_reply import UID_HINT
from .draw_rogue_card import draw_rogue_img, draw_rogue_locust_img
from ..utils.sr_prefix import PREFIX
sv_srabyss = SV("sr查询模拟宇宙") sv_srabyss = SV("sr查询模拟宇宙")
sv_srabyss_locust = SV("sr查询寰宇蝗灾") sv_srabyss_locust = SV("sr查询寰宇蝗灾")

View File

@ -2,6 +2,15 @@ import math
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, List, Optional, Union
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
from .utils import get_icon from .utils import get_icon
from ..sruid_utils.api.mys.models import ( from ..sruid_utils.api.mys.models import (
LocustBlocks, LocustBlocks,
@ -17,15 +26,6 @@ from ..utils.fonts.starrail_fonts import (
) )
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
TEXT_PATH = Path(__file__).parent / "texture2D" TEXT_PATH = Path(__file__).parent / "texture2D"
white_color = (255, 255, 255) white_color = (255, 255, 255)
gray_color = (175, 175, 175) gray_color = (175, 175, 175)

View File

@ -1,9 +1,5 @@
import re import re
from .draw_roleinfo_card import get_detail_img, get_role_img
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.logger import logger from gsuid_core.logger import logger
from gsuid_core.models import Event from gsuid_core.models import Event
@ -11,6 +7,10 @@ from gsuid_core.sv import SV
from gsuid_core.utils.database.api import get_uid from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from .draw_roleinfo_card import get_detail_img, get_role_img
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
sv_get_info = SV("sr查询信息") sv_get_info = SV("sr查询信息")

View File

@ -2,6 +2,15 @@ import asyncio
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, List, Optional, Union
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
from .utils import get_icon, wrap_list from .utils import get_icon, wrap_list
from ..sruid_utils.api.mys.models import ( from ..sruid_utils.api.mys.models import (
AvatarDetail, AvatarDetail,
@ -20,15 +29,6 @@ from ..utils.fonts.starrail_fonts import (
) )
from ..utils.mys_api import mys_api from ..utils.mys_api import mys_api
from PIL import Image, ImageDraw
from gsuid_core.logger import logger
from gsuid_core.utils.error_reply import get_error
from gsuid_core.utils.image.convert import convert_img
from gsuid_core.utils.image.image_tools import (
draw_pic_with_ring,
get_qq_avatar,
)
TEXT_PATH = Path(__file__).parent / "texture2D" TEXT_PATH = Path(__file__).parent / "texture2D"
bg1 = Image.open(TEXT_PATH / "bg1.png") bg1 = Image.open(TEXT_PATH / "bg1.png")

View File

@ -1,6 +1,6 @@
from io import BytesIO from io import BytesIO
from pathlib import Path from pathlib import Path
from typing import List, TypeVar, Generator from typing import Generator, List, TypeVar
from PIL import Image from PIL import Image
from aiohttp import ClientSession from aiohttp import ClientSession

View File

@ -1,7 +1,3 @@
from ..starrailuid_config.sr_config import srconfig
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
from gsuid_core.aps import scheduler from gsuid_core.aps import scheduler
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.logger import logger from gsuid_core.logger import logger
@ -11,6 +7,10 @@ from gsuid_core.utils.boardcast.send_msg import send_board_cast_msg
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from gsuid_core.utils.sign.sign import daily_sign, sign_in from gsuid_core.utils.sign.sign import daily_sign, sign_in
from ..starrailuid_config.sr_config import srconfig
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
SIGN_TIME = srconfig.get_config("SignTime").data SIGN_TIME = srconfig.get_config("SignTime").data
IS_REPORT = srconfig.get_config("PrivateSignReport").data IS_REPORT = srconfig.get_config("PrivateSignReport").data

View File

@ -1,11 +1,5 @@
import asyncio import asyncio
from .draw_stamina_card import get_stamina_img
from .notice import get_notice_list
from .stamina_text import get_stamina_text
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
from gsuid_core.aps import scheduler from gsuid_core.aps import scheduler
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.gss import gss from gsuid_core.gss import gss
@ -16,6 +10,12 @@ from gsuid_core.sv import SV
from gsuid_core.utils.database.api import get_uid from gsuid_core.utils.database.api import get_uid
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from .draw_stamina_card import get_stamina_img
from .notice import get_notice_list
from .stamina_text import get_stamina_text
from ..utils.error_reply import UID_HINT
from ..utils.sr_prefix import PREFIX
sv_get_stamina = SV("sr查询体力") sv_get_stamina = SV("sr查询体力")
sv_get_stamina_admin = SV("sr强制推送", pm=1) sv_get_stamina_admin = SV("sr强制推送", pm=1)

View File

@ -3,9 +3,9 @@ from gsuid_core.models import Event
from gsuid_core.sv import SV from gsuid_core.sv import SV
from gsuid_core.utils.database.models import GsBind from gsuid_core.utils.database.models import GsBind
from .draw_user_card import get_user_card
from ..utils.message import send_diff_msg from ..utils.message import send_diff_msg
from ..utils.sr_prefix import PREFIX from ..utils.sr_prefix import PREFIX
from .draw_user_card import get_user_card
sv_user_config = SV("sr用户管理", pm=2) sv_user_config = SV("sr用户管理", pm=2)
sv_user_info = SV("sr用户信息") sv_user_info = SV("sr用户信息")

View File

@ -1,23 +1,23 @@
import re import re
from gsuid_core.sv import SV
from gsuid_core.bot import Bot from gsuid_core.bot import Bot
from gsuid_core.models import Event from gsuid_core.models import Event
from gsuid_core.sv import SV
from gsuid_core.utils.image.convert import convert_img from gsuid_core.utils.image.convert import convert_img
from ..utils.map.name_covert import ( from ..utils.map.name_covert import (
name_to_avatar_id,
name_to_weapon_id,
alias_to_char_name, alias_to_char_name,
name_to_avatar_id,
name_to_relic_set_id, name_to_relic_set_id,
name_to_weapon_id,
) )
from ..utils.resource.RESOURCE_PATH import ( from ..utils.resource.RESOURCE_PATH import (
WIKI_ROLE_PATH,
WIKI_RELIC_PATH,
GUIDE_CHARACTER_PATH, GUIDE_CHARACTER_PATH,
WIKI_LIGHT_CONE_PATH,
GUIDE_LIGHT_CONE_PATH, GUIDE_LIGHT_CONE_PATH,
WIKI_LIGHT_CONE_PATH,
WIKI_MATERIAL_FOR_ROLE, WIKI_MATERIAL_FOR_ROLE,
WIKI_RELIC_PATH,
WIKI_ROLE_PATH,
) )
sv_sr_wiki = SV("星铁WIKI") sv_sr_wiki = SV("星铁WIKI")

View File

@ -1,10 +0,0 @@
from gsuid_core.utils.database.api import DBSqla
class SRDBSqla(DBSqla):
def __init__(self) -> None:
super().__init__(is_sr=True)
# srdbsqla = SRDBSqla()
# get_sqla = srdbsqla.get_sqla

View File

@ -1,4 +1,6 @@
from typing import Dict, List, Union from typing import List, Union
from msgspec import Struct, convert
from .read_excel import ( from .read_excel import (
AvatarPromotion, AvatarPromotion,
@ -7,8 +9,6 @@ from .read_excel import (
RelicSubAffix, RelicSubAffix,
) )
from msgspec import Struct, convert
class PromotionCost(Struct): class PromotionCost(Struct):
ItemID: int ItemID: int
@ -71,22 +71,6 @@ class SingleRelicSubAffix(Struct):
StepNum: int StepNum: int
# class AvatarPromotionConfigModel(Struct):
# Avatar: List[Dict[str, SingleAvatarPromotion]]
# class EquipmentPromotionConfigModel(Struct):
# Equipment: List[Dict[str, SingleEquipmentPromotion]]
# class RelicMainAffixConfigModel(Struct):
# Relic: List[Dict[str, SingleRelicMainAffix]]
# class RelicSubAffixConfigModel(Struct):
# Relic: Dict[str, Dict[str, SingleRelicSubAffix]]
AvatarPromotionConfig = convert(AvatarPromotion, List[SingleAvatarPromotion]) AvatarPromotionConfig = convert(AvatarPromotion, List[SingleAvatarPromotion])
EquipmentPromotionConfig = convert(EquipmentPromotion, List[SingleEquipmentPromotion]) EquipmentPromotionConfig = convert(EquipmentPromotion, List[SingleEquipmentPromotion])
RelicMainAffixConfig = convert(RelicMainAffix, List[SingleRelicMainAffix]) RelicMainAffixConfig = convert(RelicMainAffix, List[SingleRelicMainAffix])

View File

@ -1,5 +1,5 @@
from pathlib import Path from pathlib import Path
from typing import Union, Optional from typing import Optional, Union
from PIL import Image from PIL import Image
from gsuid_core.utils.image.image_tools import TEXT_PATH, CustomizeImage from gsuid_core.utils.image.image_tools import TEXT_PATH, CustomizeImage

View File

@ -1,11 +1,10 @@
import json
from pathlib import Path from pathlib import Path
from typing import Dict, List, Optional, TypedDict, Union from typing import Dict, List, TypedDict, Union
from msgspec import Struct, json as msgjson
from ...version import StarRail_version from ...version import StarRail_version
from msgspec import Struct, convert, json as msgjson
class RelicSetStatusAdd(Struct): class RelicSetStatusAdd(Struct):
Property: str Property: str

View File

@ -1,7 +1,7 @@
from .SR_MAP_PATH import ( from .SR_MAP_PATH import (
SetId2Name,
EquipmentID2Name,
EquipmentID2EnName, EquipmentID2EnName,
EquipmentID2Name,
SetId2Name,
alias_data, alias_data,
avatarId2Name, avatarId2Name,
avatarId2Rarity, avatarId2Rarity,

View File

@ -1,5 +1,5 @@
import sys
from pathlib import Path from pathlib import Path
import sys
from gsuid_core.data_store import get_res_path from gsuid_core.data_store import get_res_path

View File

@ -1,3 +1,5 @@
from gsuid_core.utils.download_resource.download_core import download_all_file
from .RESOURCE_PATH import ( from .RESOURCE_PATH import (
CHAR_ICON_PATH, CHAR_ICON_PATH,
CHAR_PORTRAIT_PATH, CHAR_PORTRAIT_PATH,
@ -15,8 +17,6 @@ from .RESOURCE_PATH import (
WIKI_ROLE_PATH, WIKI_ROLE_PATH,
) )
from gsuid_core.utils.download_resource.download_core import download_all_file
async def check_use(): async def check_use():
await download_all_file( await download_all_file(

View File

@ -93,6 +93,14 @@ extra-standard-library = ["typing_extensions"]
combine-as-imports = true combine-as-imports = true
order-by-type = true order-by-type = true
relative-imports-order = "closest-to-furthest" relative-imports-order = "closest-to-furthest"
section-order = [
"future",
"standard-library",
"first-party",
"third-party",
"local-folder",
]
[tool.pdm] [tool.pdm]
[tool.pdm.build] [tool.pdm.build]