lightpdf-aipdf-mcp 0.1.112__py3-none-any.whl → 0.1.114__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/create_pdf.py +1 -1
- lightpdf_aipdf_mcp/editor.py +3 -1
- lightpdf_aipdf_mcp/server.py +1 -7
- {lightpdf_aipdf_mcp-0.1.112.dist-info → lightpdf_aipdf_mcp-0.1.114.dist-info}/METADATA +1 -1
- lightpdf_aipdf_mcp-0.1.114.dist-info/RECORD +11 -0
- lightpdf_aipdf_mcp-0.1.112.dist-info/RECORD +0 -11
- {lightpdf_aipdf_mcp-0.1.112.dist-info → lightpdf_aipdf_mcp-0.1.114.dist-info}/WHEEL +0 -0
- {lightpdf_aipdf_mcp-0.1.112.dist-info → lightpdf_aipdf_mcp-0.1.114.dist-info}/entry_points.txt +0 -0
lightpdf_aipdf_mcp/create_pdf.py
CHANGED
@@ -57,6 +57,6 @@ async def create_pdf_from_latex(latex_code: str, output_path: Optional[str] = No
|
|
57
57
|
os.remove(path)
|
58
58
|
except Exception:
|
59
59
|
pass
|
60
|
-
timer = threading.Timer(
|
60
|
+
timer = threading.Timer(300, delayed_remove, args=(tex_path,))
|
61
61
|
timer.daemon = True
|
62
62
|
timer.start()
|
lightpdf_aipdf_mcp/editor.py
CHANGED
@@ -235,7 +235,7 @@ class Editor(BaseApiClient):
|
|
235
235
|
# 调用edit_pdf方法处理API请求
|
236
236
|
return await self.edit_pdf(file_path, EditType.COMPRESS, extra_params, password, original_name)
|
237
237
|
|
238
|
-
async def encrypt_pdf(self, file_path: str, password: str, original_password: Optional[str] = None, original_name: Optional[str] = None) -> EditResult:
|
238
|
+
async def encrypt_pdf(self, file_path: str, password: str, original_password: Optional[str] = None, provider: Optional[str] = None, original_name: Optional[str] = None) -> EditResult:
|
239
239
|
"""加密PDF文件
|
240
240
|
|
241
241
|
Args:
|
@@ -260,6 +260,8 @@ class Editor(BaseApiClient):
|
|
260
260
|
extra_params = {
|
261
261
|
"password": password # 新密码
|
262
262
|
}
|
263
|
+
if provider:
|
264
|
+
extra_params["provider"] = provider
|
263
265
|
|
264
266
|
# 记录操作描述
|
265
267
|
await self._log_operation("加密PDF文件")
|
lightpdf_aipdf_mcp/server.py
CHANGED
@@ -184,6 +184,7 @@ async def process_edit_file(
|
|
184
184
|
return await editor.encrypt_pdf(
|
185
185
|
file_path=file_path,
|
186
186
|
password=extra_params.get("password", ""),
|
187
|
+
provider=extra_params.get("provider", ""),
|
187
188
|
original_password=password,
|
188
189
|
original_name=original_name
|
189
190
|
)
|
@@ -1315,16 +1316,9 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
|
|
1315
1316
|
# 其他参数正常处理
|
1316
1317
|
operation_config["extra_params"][key] = arguments.get(key, DEFAULTS.get(key, ""))
|
1317
1318
|
|
1318
|
-
# 对于protect_pdf工具,需要处理新密码
|
1319
|
-
if name == "protect_pdf" and "password" in arguments:
|
1320
|
-
operation_config["extra_params"]["password"] = arguments.get("password")
|
1321
|
-
|
1322
1319
|
# restrict_printing工具自动加provider参数
|
1323
1320
|
if name == "restrict_printing":
|
1324
1321
|
operation_config["extra_params"]["provider"] = "printpermission"
|
1325
|
-
# 确保password参数传递,与protect_pdf一致
|
1326
|
-
if "password" in arguments:
|
1327
|
-
operation_config["extra_params"]["password"] = arguments["password"]
|
1328
1322
|
|
1329
1323
|
# 特殊处理merge_pdfs工具
|
1330
1324
|
if name == "merge_pdfs":
|
@@ -0,0 +1,11 @@
|
|
1
|
+
lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
|
2
|
+
lightpdf_aipdf_mcp/common.py,sha256=PhTf7Zg6mEgn1rTmJDHotXp-4xb2gWFf-Dy_t25qNdY,6660
|
3
|
+
lightpdf_aipdf_mcp/converter.py,sha256=1SQcPTKXbf6UKqC1zJ4Vi-k7GxGTtPiVKyhGYAvK7DY,16299
|
4
|
+
lightpdf_aipdf_mcp/create_pdf.py,sha256=oALIhOBo60D3Gu_li7d7FF0COhFfSTM-BJpc63r9iAs,2465
|
5
|
+
lightpdf_aipdf_mcp/editor.py,sha256=Ph_ZZNkDrsSMGarS8I625lgt0mEDOxr4AfDoSiG9Rvc,30000
|
6
|
+
lightpdf_aipdf_mcp/server.py,sha256=CS9oEY1fd8ZXtsi1nNraNjMxj_fe6316huL8SjqrW4s,64997
|
7
|
+
lightpdf_aipdf_mcp/translator.py,sha256=NbFDz-mZSD4qCNQVyV0W_0x6xXwbqs_7FiBU13JAxZs,4243
|
8
|
+
lightpdf_aipdf_mcp-0.1.114.dist-info/METADATA,sha256=no8vn4LbutHZdWoV3eFKdWaBpdcl4lCg_ePTnqmmPo0,8120
|
9
|
+
lightpdf_aipdf_mcp-0.1.114.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
lightpdf_aipdf_mcp-0.1.114.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
|
11
|
+
lightpdf_aipdf_mcp-0.1.114.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
|
2
|
-
lightpdf_aipdf_mcp/common.py,sha256=PhTf7Zg6mEgn1rTmJDHotXp-4xb2gWFf-Dy_t25qNdY,6660
|
3
|
-
lightpdf_aipdf_mcp/converter.py,sha256=1SQcPTKXbf6UKqC1zJ4Vi-k7GxGTtPiVKyhGYAvK7DY,16299
|
4
|
-
lightpdf_aipdf_mcp/create_pdf.py,sha256=9E8lD3XCUID9nYDV1HN1OkWgV_r4KqPleX99cKYrZ_0,2465
|
5
|
-
lightpdf_aipdf_mcp/editor.py,sha256=vPaahaAV6pDZi_eheRGSgHzfZxc6ZqQyxHDgsNfdgjQ,29899
|
6
|
-
lightpdf_aipdf_mcp/server.py,sha256=lqYJg7u0XBx4U1O2eqXCTbuVcMmbctRSttVWAll-ru0,65373
|
7
|
-
lightpdf_aipdf_mcp/translator.py,sha256=NbFDz-mZSD4qCNQVyV0W_0x6xXwbqs_7FiBU13JAxZs,4243
|
8
|
-
lightpdf_aipdf_mcp-0.1.112.dist-info/METADATA,sha256=rFYGoJB-v1nnbzLbWk4CGRb-dt7cr2R3h5Drtwj3Znk,8120
|
9
|
-
lightpdf_aipdf_mcp-0.1.112.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
-
lightpdf_aipdf_mcp-0.1.112.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
|
11
|
-
lightpdf_aipdf_mcp-0.1.112.dist-info/RECORD,,
|
File without changes
|
{lightpdf_aipdf_mcp-0.1.112.dist-info → lightpdf_aipdf_mcp-0.1.114.dist-info}/entry_points.txt
RENAMED
File without changes
|