From b9dc1d12de36c92e583deda8ba102821721b3ff8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?=
<101191390+HIllya51@users.noreply.github.com>
Date: Thu, 30 May 2024 17:58:45 +0800
Subject: [PATCH] remove
---
.../LunaTranslator/cishu/yomichan.py | 42 -------------------
.../files/defaultconfig/config.json | 30 -------------
2 files changed, 72 deletions(-)
delete mode 100644 LunaTranslator/LunaTranslator/cishu/yomichan.py
diff --git a/LunaTranslator/LunaTranslator/cishu/yomichan.py b/LunaTranslator/LunaTranslator/cishu/yomichan.py
deleted file mode 100644
index 88f0d035..00000000
--- a/LunaTranslator/LunaTranslator/cishu/yomichan.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import os
-import requests
-from urllib.parse import quote
-import re, json
-from myutils.proxy import getproxy
-from cishu.cishubase import cishubase
-
-
-class yomichan(cishubase):
- def init(self):
- self.sql = None
-
- path = self.config["path"]
- self.datas = []
- for f in os.listdir(path):
- if f.startswith("term_bank_") and f.endswith(".json"):
- with open(os.path.join(path, f), "r", encoding="utf8") as ff:
- self.datas += json.loads(ff.read())
-
- def search(self, word):
- results = []
- diss = {}
- import winsharedutils
-
- for item in self.datas:
- dis = winsharedutils.distance(item[0], word)
- if dis <= self.config["distance"]:
- results.append(item)
- diss[item[0]] = dis
- if len(results) == 0:
- return
- results = sorted(results, key=lambda x: diss[x[0]])
-
- html = ""
- for item in results:
- word = item[0]
- hira = item[1]
- explain = item[5][0].replace("\n", "
")
- html += f'