mirror of
https://github.com/ikunshare/Onekey.git
synced 2026-01-15 09:33:06 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c88a769a4 | ||
|
|
5fb2ed26bd | ||
|
|
1a36dc507c |
@@ -13,6 +13,10 @@
|
||||
## Onekey
|
||||
Onekey Steam Depot Manifest Downloader
|
||||
|
||||
## 先让我挂些人
|
||||
- 沧海颐粟,早期倒卖大手子,现在不知道跑哪了,通过一点手段查到在景德镇
|
||||
- 玩家资源站,这两个月出现的,也是很嚣张了,B站https://space.bilibili.com/242622952,已被拉黑
|
||||
|
||||
## 使用方法
|
||||
去Releases处下载最新的发布,并且安装好SteamTools或者GreenLuma
|
||||
然后打开Onekey输入App ID即可使用
|
||||
@@ -62,9 +66,10 @@ pip install -r requirements.txt
|
||||
</a>
|
||||
|
||||
## 常见问题解答(FAQ)
|
||||
查看 [FAQ](https://ikunshare.com/d/49) 获取常见问题的解答。
|
||||
查看 [FAQ](https://ikunshare.top/d/49) 获取常见问题的解答。
|
||||
|
||||
## 社区和支持
|
||||
加入我们的社区,参与讨论和支持:
|
||||
- [GitHub Discussions](https://github.com/ikunshare/Onekey/discussions)
|
||||
- [Telegram](https://t.me/ikunshare_qun)
|
||||
- [QQ](https://qm.qq.com/q/NPRVbglteK)
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import os
|
||||
import colorama
|
||||
import logging
|
||||
import logzero
|
||||
from logzero import setup_logger, LogFormatter
|
||||
from .variable import LOG_FILE, DEBUG_MODE
|
||||
try:
|
||||
import os
|
||||
import colorama
|
||||
import logging
|
||||
import logzero
|
||||
from logzero import setup_logger, LogFormatter
|
||||
from .variable import LOG_FILE, DEBUG_MODE
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
import os
|
||||
|
||||
os.system("pause")
|
||||
|
||||
if not os.path.exists(f"./logs"):
|
||||
os.makedirs(f"./logs")
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import time
|
||||
import httpx
|
||||
import sys
|
||||
import winreg
|
||||
import ujson as json
|
||||
from pathlib import Path
|
||||
try:
|
||||
import time
|
||||
import httpx
|
||||
import sys
|
||||
import winreg
|
||||
import ujson as json
|
||||
from pathlib import Path
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
import os
|
||||
|
||||
os.system("pause")
|
||||
|
||||
|
||||
def get_steam_path(config: dict) -> Path:
|
||||
|
||||
52
main.py
52
main.py
@@ -1,22 +1,28 @@
|
||||
import os
|
||||
import sys
|
||||
try:
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
import vdf
|
||||
import time
|
||||
import httpx
|
||||
import asyncio
|
||||
import traceback
|
||||
from typing import Any, Tuple, List, Dict
|
||||
from pathlib import Path
|
||||
from common import log, variable
|
||||
from common.variable import (
|
||||
CLIENT,
|
||||
HEADER,
|
||||
STEAM_PATH,
|
||||
REPO_LIST,
|
||||
)
|
||||
import vdf
|
||||
import time
|
||||
import httpx
|
||||
import asyncio
|
||||
import traceback
|
||||
from typing import Any, Tuple, List, Dict
|
||||
from pathlib import Path
|
||||
from common import log, variable
|
||||
from common.variable import (
|
||||
CLIENT,
|
||||
HEADER,
|
||||
STEAM_PATH,
|
||||
REPO_LIST,
|
||||
)
|
||||
except ImportError as e:
|
||||
import os
|
||||
|
||||
print(e)
|
||||
os.system("pause")
|
||||
|
||||
|
||||
LOCK = asyncio.Lock()
|
||||
@@ -35,9 +41,9 @@ def init() -> None:
|
||||
\_____/ |_| \_| |_____| |_| \_\ |_____| /_/
|
||||
"""
|
||||
LOG.info(banner)
|
||||
LOG.info("作者: ikun0014 | 版本: 1.4.7 | 官网: ikunshare.com")
|
||||
LOG.info("作者: ikun0014 | 版本: 1.4.8 | 官网: ikunshare.top")
|
||||
LOG.info("项目仓库: GitHub: https://github.com/ikunshare/Onekey")
|
||||
LOG.warning("ikunshare.com | 严禁倒卖")
|
||||
LOG.warning("ikunshare.top | 严禁倒卖")
|
||||
LOG.warning("提示: 请确保已安装Windows 10/11并正确配置Steam;SteamTools/GreenLuma")
|
||||
LOG.warning("开梯子必须配置Token, 你的IP我不相信能干净到哪")
|
||||
|
||||
@@ -137,7 +143,7 @@ async def HandleDepotFiles(
|
||||
tree_res = await CLIENT.get(tree_url)
|
||||
tree_res.raise_for_status()
|
||||
|
||||
depot_cache = steam_path / "depotcache"
|
||||
depot_cache = Path(f"{steam_path}/depotcache")
|
||||
depot_cache.mkdir(exist_ok=True)
|
||||
|
||||
LOG.info(f"当前选择清单仓库: https://github.com/{selected_repo}")
|
||||
@@ -246,7 +252,7 @@ def SetupUnlock(
|
||||
|
||||
|
||||
def SetupTools(depot_data: List[Tuple[str, str]], app_id: str, depot_map: Dict) -> bool:
|
||||
st_path = STEAM_PATH / "config" / "stplug-in"
|
||||
st_path = Path(f"{STEAM_PATH}/config/stplug-in")
|
||||
st_path.mkdir(exist_ok=True)
|
||||
|
||||
choice = input(
|
||||
@@ -274,7 +280,7 @@ def SetupTools(depot_data: List[Tuple[str, str]], app_id: str, depot_map: Dict)
|
||||
|
||||
|
||||
def SetupGreenLuma(depot_data: List[Tuple[str, str]]) -> bool:
|
||||
applist_dir = STEAM_PATH / "AppList"
|
||||
applist_dir = Path(f"{STEAM_PATH}/AppList")
|
||||
applist_dir.mkdir(exist_ok=True)
|
||||
|
||||
for f in applist_dir.glob("*.txt"):
|
||||
@@ -283,7 +289,7 @@ def SetupGreenLuma(depot_data: List[Tuple[str, str]]) -> bool:
|
||||
for idx, (d_id, _) in enumerate(depot_data, 1):
|
||||
(applist_dir / f"{idx}.txt").write_text(str(d_id))
|
||||
|
||||
config_path = STEAM_PATH / "config" / "config.vdf"
|
||||
config_path = Path(f"{STEAM_PATH}/config/config.vdf")
|
||||
with open(config_path, "r+") as f:
|
||||
content = vdf.loads(f.read())
|
||||
content.setdefault("depots", {}).update(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "onekey",
|
||||
"version": "1.4.7",
|
||||
"version": "1.4.8",
|
||||
"description": "一个Steam仓库清单下载器",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user