mirror of
https://github.com/Mas0nShi/typoraCracker.git
synced 2023-07-10 13:41:20 +08:00
dev commits.
This commit is contained in:
@@ -9,4 +9,4 @@ if __name__ == '__main__':
|
||||
download_file(DOWNLOAD_URL, download_path)
|
||||
extract_file(download_path, BASE_DIR)
|
||||
version = get_version(BASE_DIR)
|
||||
log.info(f"the latest version: {version}")
|
||||
print(version+"")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
"""
|
||||
@Author: Mas0n
|
||||
@File: version_download.py
|
||||
@File: patch.py
|
||||
@Time: 2022/4/3 18:36
|
||||
@Desc: It's all about getting better.
|
||||
"""
|
||||
@@ -36,9 +36,7 @@ def get_version(to_path):
|
||||
|
||||
|
||||
def download_file(from_link, to_path):
|
||||
log.info(f"downloading from {from_link}")
|
||||
subprocess.check_call(["wget", from_link, "-O", to_path])
|
||||
log.info("ready extract package")
|
||||
|
||||
|
||||
def extract_file(from_path, to_path):
|
||||
@@ -65,7 +63,9 @@ def win_x64_run():
|
||||
link = DOWNLOAD_LINK["win"]["x64"]
|
||||
|
||||
download_path = os.path.join(basedir, os.path.basename(link))
|
||||
log.info(f"downloading from {link}")
|
||||
download_file(link, download_path)
|
||||
log.info("ready extract package")
|
||||
|
||||
extract_file(download_path, basedir)
|
||||
log.info("preparation stage completed")
|
||||
|
||||
Reference in New Issue
Block a user