mirror of
https://github.com/Mas0nShi/typoraCracker.git
synced 2023-07-10 13:41:20 +08:00
adds test unit
This commit is contained in:
@@ -17,4 +17,9 @@ DOWNLOAD_LINK = {
|
||||
"x64": "https://download.typora.io/linux/Typora-linux-x64.tar.gz",
|
||||
"arm64": "https://download.typora.io/linux/Typora-linux-arm64.tar.gz",
|
||||
},
|
||||
}
|
||||
|
||||
EXTRACT_ROOT_PATH = {
|
||||
"win": "app",
|
||||
"linux": "bin/Typora-linux-x64"
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
@Desc: It's all about getting better.
|
||||
"""
|
||||
from loguru import logger as log
|
||||
from config import DOWNLOAD_LINK
|
||||
from config import DOWNLOAD_LINK, EXTRACT_ROOT_PATH
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
@@ -70,21 +70,21 @@ def win_x64_run():
|
||||
from win.x64 import analysis
|
||||
dirs = os.path.join(BASE_DIR, "win/x64")
|
||||
url = DOWNLOAD_LINK["win"]["x64"]
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path="app")
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path=EXTRACT_ROOT_PATH["win"])
|
||||
|
||||
|
||||
def win_x86_run():
|
||||
from win.x86 import analysis
|
||||
dirs = os.path.join(BASE_DIR, "win/x86")
|
||||
url = DOWNLOAD_LINK["win"]["x86"]
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path="app")
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path=EXTRACT_ROOT_PATH["win"])
|
||||
|
||||
|
||||
def linux_x64_run():
|
||||
from linux.x64 import analysis
|
||||
dirs = os.path.join(BASE_DIR, "linux/x64")
|
||||
url = DOWNLOAD_LINK["linux"]["x64"]
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path="bin/Typora-linux-x64")
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path=EXTRACT_ROOT_PATH["linux"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user