Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
fix, dep
Browse files Browse the repository at this point in the history
  • Loading branch information
cxzlw committed May 18, 2023
1 parent 8dac3e7 commit 2bc79bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ test_sources = [
]

requires = [
"git+https://github.com/cxzlw/zhihuDecrypt"
]
test_requires = [
"pytest",
Expand Down Expand Up @@ -163,7 +164,7 @@ readme = "README.md"
python = ">=3.11,<3.12"
toga = "^0.3.1"
briefcase = "^0.3.14"
zhihudecrypt = {git = "https://github.com/cxzlw/zhihuDecrypt"}
zhihudecrypt = { git = "https://github.com/cxzlw/zhihuDecrypt" }

[build-system]
requires = ["poetry-core"]
Expand Down
8 changes: 4 additions & 4 deletions src/zhihuDecryptApp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging

import toga
import zhihuDecrypt
from zhihuDecrypt import consts
import zhihudecrypt
from zhihudecrypt import consts
from toga.style import Pack
from toga.style.pack import COLUMN, ROW

Expand Down Expand Up @@ -86,13 +86,13 @@ def on_decrypt_clicked(self, _):
logging.info("解密中")
if method == "auto":
logging.info("加密情况设为auto, 正在自动检测")
probability = zhihuDecrypt.detect_encrypt_method_probability(passage)
probability = zhihudecrypt.detect_encrypt_method_probability(passage)
logging.info("各情况概率: ")
for k, v in probability.items():
logging.info(f"{k}: {round(v * 10000) / 100}%")
method = max(probability, key=lambda x: probability[x])
logging.info(f"检测结果为: {method}")
self.passage_text.value = zhihuDecrypt.decrypt(passage, method)
self.passage_text.value = zhihudecrypt.decrypt(passage, method)
logging.info("解密完成")


Expand Down

0 comments on commit 2bc79bf

Please sign in to comment.