feat: 添加资产变动确认卡片和Excel图片解析功能
- 新增 `send_asset_confirmation_card` 工具,用于发送资产变动确认卡片 - 新增 `upload_image_by_excel` 工具,支持从Excel中根据image_key定位并上传图片 - 在file-tools中添加 `excel_image_key_to_temp_file` 和 `upload_file_to_minio` 工具 - 新增配置文件管理和MinIO集成支持 - 更新项目依赖版本,添加openpyxl和minio库
This commit is contained in:
@@ -20,15 +20,19 @@ def main() -> None:
|
||||
if not os.getenv("app_id") or not os.getenv("app_secret"):
|
||||
raise RuntimeError("missing app_id or app_secret")
|
||||
from lzwcai_lark_mcp.main import LarkMcpServer
|
||||
from lzwcai_lark_mcp.tools import send_card_message
|
||||
from lzwcai_lark_mcp.tools import send_asset_confirmation_card
|
||||
|
||||
async def _run() -> None:
|
||||
server = LarkMcpServer()
|
||||
await server.ensure_token()
|
||||
image_key = "img_v3_02uq_d48b3ee1-0f89-44a3-80cd-a5afa4f8c39g"
|
||||
receiver_id = "843ga2gb"
|
||||
person_id = receiver_id
|
||||
result = send_card_message(server.tenant_access_token or "", receiver_id, person_id, image_key)
|
||||
user_id = "843ga2gb"
|
||||
result = send_asset_confirmation_card(
|
||||
server.tenant_access_token or "",
|
||||
user_id,
|
||||
"2026-02-13 10:30:00",
|
||||
["华为i手机"],
|
||||
["红米手机"]
|
||||
)
|
||||
print(result)
|
||||
|
||||
asyncio.run(_run())
|
||||
|
||||
Reference in New Issue
Block a user