lightpdf-aipdf-mcp 0.1.57__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.
- lightpdf_aipdf_mcp/editor.py +1 -1
- lightpdf_aipdf_mcp/server.py +14 -9
- {lightpdf_aipdf_mcp-0.1.57.dist-info → lightpdf_aipdf_mcp-0.1.58.dist-info}/METADATA +1 -1
- lightpdf_aipdf_mcp-0.1.58.dist-info/RECORD +9 -0
- lightpdf_aipdf_mcp-0.1.57.dist-info/RECORD +0 -9
- {lightpdf_aipdf_mcp-0.1.57.dist-info → lightpdf_aipdf_mcp-0.1.58.dist-info}/WHEEL +0 -0
- {lightpdf_aipdf_mcp-0.1.57.dist-info → lightpdf_aipdf_mcp-0.1.58.dist-info}/entry_points.txt +0 -0
lightpdf_aipdf_mcp/editor.py
CHANGED
lightpdf_aipdf_mcp/server.py
CHANGED
@@ -58,16 +58,20 @@ def generate_result_report(
|
|
58
58
|
if result.success:
|
59
59
|
# 添加成功的文件信息
|
60
60
|
report_obj["success_files"].append({
|
61
|
-
"
|
62
|
-
"
|
63
|
-
|
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
|
-
"
|
69
|
-
"
|
70
|
-
|
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
|
-
# 并发处理文件,限制并发数为
|
97
|
-
semaphore = asyncio.Semaphore(
|
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
|
|
@@ -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=krnbUnILN3v5fbepsx88thoQkpmkYHXkhHTiIwC8-a0,24727
|
5
|
-
lightpdf_aipdf_mcp/server.py,sha256=57oQ2wBOF6ajJs67q41w3MNjrIiYaOf3Z_LJ17OC7Ag,43306
|
6
|
-
lightpdf_aipdf_mcp-0.1.57.dist-info/METADATA,sha256=cebBp7rWZ834MRE8Dz7SI9cHwyYLOEkCBAMdoPKgtR4,7826
|
7
|
-
lightpdf_aipdf_mcp-0.1.57.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
-
lightpdf_aipdf_mcp-0.1.57.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
|
9
|
-
lightpdf_aipdf_mcp-0.1.57.dist-info/RECORD,,
|
File without changes
|
{lightpdf_aipdf_mcp-0.1.57.dist-info → lightpdf_aipdf_mcp-0.1.58.dist-info}/entry_points.txt
RENAMED
File without changes
|