lightpdf-aipdf-mcp 0.1.56__py3-none-any.whl → 0.1.58__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -375,7 +375,7 @@ class Editor(BaseApiClient):
375
375
 
376
376
  # 构建API参数,按照固定格式传递
377
377
  extra_params = {
378
- "pages": [{"content": "autocrop", "range": 1, "size": ""}]
378
+ "pages": [{"url": "oss://autocrop", "oss_file": ""}]
379
379
  }
380
380
 
381
381
  # 调用edit_pdf方法处理API请求
@@ -58,16 +58,20 @@ def generate_result_report(
58
58
  if result.success:
59
59
  # 添加成功的文件信息
60
60
  report_obj["success_files"].append({
61
- "file_path": result.file_path,
62
- "original_name": result.original_name,
63
- "download_url": result.download_url
61
+ "download_url": result.download_url,
62
+ "original_info": {
63
+ "path": result.file_path,
64
+ "name": result.original_name,
65
+ }
64
66
  })
65
67
  else:
66
68
  # 添加失败的文件信息
67
69
  report_obj["failed_files"].append({
68
- "file_path": result.file_path,
69
- "original_name": result.original_name,
70
- "error_message": result.error_message
70
+ "error_message": result.error_message,
71
+ "original_info": {
72
+ "path": result.file_path,
73
+ "name": result.original_name,
74
+ }
71
75
  })
72
76
 
73
77
  # 返回JSON字符串
@@ -93,8 +97,8 @@ async def process_batch_files(
93
97
  if len(file_objects) > 1 and operation_desc:
94
98
  await logger.log("info", f"开始批量{operation_desc},共 {len(file_objects)} 个文件")
95
99
 
96
- # 并发处理文件,限制并发数为5
97
- semaphore = asyncio.Semaphore(5)
100
+ # 并发处理文件,限制并发数为2
101
+ semaphore = asyncio.Semaphore(2)
98
102
 
99
103
  async def process_with_semaphore(file_obj: Dict[str, str]) -> T:
100
104
  async with semaphore:
@@ -268,7 +272,8 @@ async def process_tool_call(
268
272
  "compress": "压缩",
269
273
  "split": "拆分",
270
274
  "merge": "合并",
271
- "rotate": "旋转"
275
+ "rotate": "旋转",
276
+ "remove_margin": "去除白边"
272
277
  }
273
278
  operation_desc = f"PDF{edit_map.get(edit_type, edit_type)}"
274
279
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightpdf-aipdf-mcp
3
- Version: 0.1.56
3
+ Version: 0.1.58
4
4
  Summary: MCP Server for LightPDF AI-PDF
5
5
  Author: LightPDF Team
6
6
  License: Proprietary
@@ -0,0 +1,9 @@
1
+ lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
2
+ lightpdf_aipdf_mcp/common.py,sha256=-7LU6gm-As_F8Ly68ssy15Vc9Zt_eNSnvDLEtVZDwlI,6633
3
+ lightpdf_aipdf_mcp/converter.py,sha256=d90pNUT8pQn93u1fJSlu4f2KyLDzhOdTrqyBkSTRFBE,14450
4
+ lightpdf_aipdf_mcp/editor.py,sha256=fGzIiAp48uTXBBKWWlHcGT0nwgZQBpjvrsxSf6Ockk4,24730
5
+ lightpdf_aipdf_mcp/server.py,sha256=E9F2aE52R2ZPdLyFdZJ02-dXrmE_VpAHk64J6qSd8KI,43447
6
+ lightpdf_aipdf_mcp-0.1.58.dist-info/METADATA,sha256=EyhD4kqvzK_a8S1fjB2_9r37U4dmAXcXlQizuYbXs3k,7826
7
+ lightpdf_aipdf_mcp-0.1.58.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ lightpdf_aipdf_mcp-0.1.58.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
9
+ lightpdf_aipdf_mcp-0.1.58.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
2
- lightpdf_aipdf_mcp/common.py,sha256=-7LU6gm-As_F8Ly68ssy15Vc9Zt_eNSnvDLEtVZDwlI,6633
3
- lightpdf_aipdf_mcp/converter.py,sha256=d90pNUT8pQn93u1fJSlu4f2KyLDzhOdTrqyBkSTRFBE,14450
4
- lightpdf_aipdf_mcp/editor.py,sha256=Lf0KYviNtuuDg1DGzlmvxhXD-igzCkQG25NA7iUkGSs,24736
5
- lightpdf_aipdf_mcp/server.py,sha256=57oQ2wBOF6ajJs67q41w3MNjrIiYaOf3Z_LJ17OC7Ag,43306
6
- lightpdf_aipdf_mcp-0.1.56.dist-info/METADATA,sha256=ILLjZYnIeGu8V4AvSAfDivShy8I-wbMs4aHNjA3Npik,7826
7
- lightpdf_aipdf_mcp-0.1.56.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- lightpdf_aipdf_mcp-0.1.56.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
9
- lightpdf_aipdf_mcp-0.1.56.dist-info/RECORD,,