bcsfe-wrapper-python 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bcsfe_wrapper/wrapper.py +15 -3
- {bcsfe_wrapper_python-0.1.4.dist-info → bcsfe_wrapper_python-0.1.6.dist-info}/METADATA +1 -1
- {bcsfe_wrapper_python-0.1.4.dist-info → bcsfe_wrapper_python-0.1.6.dist-info}/RECORD +5 -5
- {bcsfe_wrapper_python-0.1.4.dist-info → bcsfe_wrapper_python-0.1.6.dist-info}/WHEEL +0 -0
- {bcsfe_wrapper_python-0.1.4.dist-info → bcsfe_wrapper_python-0.1.6.dist-info}/top_level.txt +0 -0
bcsfe_wrapper/wrapper.py
CHANGED
|
@@ -7,7 +7,7 @@ from bcsfe.cli import edits
|
|
|
7
7
|
|
|
8
8
|
class BCSFEWrapper:
|
|
9
9
|
def __init__(self, save_path_or_data: Union[str, bytes], cc: str = "jp", gv: str = "13.1.0"):
|
|
10
|
-
|
|
10
|
+
self._init_core()
|
|
11
11
|
self.cc = core.CountryCode.from_code(cc)
|
|
12
12
|
self.gv = core.GameVersion.from_string(gv)
|
|
13
13
|
|
|
@@ -19,12 +19,25 @@ class BCSFEWrapper:
|
|
|
19
19
|
self.save_file = core.SaveFile(core.Data(save_path_or_data), cc=self.cc, gv=self.gv)
|
|
20
20
|
self.save_path = None
|
|
21
21
|
|
|
22
|
+
def _init_core(self):
|
|
23
|
+
data_folder = core.Path.get_data_folder()
|
|
24
|
+
core.set_config_path(data_folder.add("config.yaml"))
|
|
25
|
+
core.set_log_path(data_folder.add("log.txt"))
|
|
26
|
+
core.core_data.init_data()
|
|
27
|
+
|
|
28
|
+
# 非対話モードの設定と代替リポジトリの有効化
|
|
29
|
+
core.core_data.config.set(core.ConfigKey.STRICT_UPGRADE, False)
|
|
30
|
+
core.core_data.config.set(core.ConfigKey.UPDATE_TO_BETAS, False)
|
|
31
|
+
# ユーザー入力を求めないようにするフラグ(もしあれば)
|
|
32
|
+
core.print_config_err = False
|
|
33
|
+
|
|
22
34
|
@classmethod
|
|
23
35
|
def from_server(cls, transfer_code: str, confirmation_code: str, cc: str = "jp", gv: str = "13.1.0") -> 'BCSFEWrapper':
|
|
36
|
+
dummy_wrapper = cls(b"", cc=cc, gv=gv) # 初期化のために空で作成
|
|
37
|
+
|
|
24
38
|
country_code = core.CountryCode.from_code(cc)
|
|
25
39
|
game_version = core.GameVersion.from_string(gv)
|
|
26
40
|
|
|
27
|
-
# 正しいメソッド名は from_codes
|
|
28
41
|
server_handler, result = core.ServerHandler.from_codes(
|
|
29
42
|
transfer_code, confirmation_code, country_code, game_version, print=False
|
|
30
43
|
)
|
|
@@ -41,7 +54,6 @@ class BCSFEWrapper:
|
|
|
41
54
|
|
|
42
55
|
def upload_to_server(self) -> Tuple[Optional[str], Optional[str]]:
|
|
43
56
|
handler = core.ServerHandler(self.save_file, print=False)
|
|
44
|
-
# 正しいメソッド名は get_codes
|
|
45
57
|
codes = handler.get_codes()
|
|
46
58
|
if codes:
|
|
47
59
|
return codes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
bcsfe_wrapper/__init__.py,sha256=o2LbyVJjuRV1gap8wDbsv39kEUJM1rt8Lq49u1RYYXA,268
|
|
2
|
-
bcsfe_wrapper/wrapper.py,sha256=
|
|
2
|
+
bcsfe_wrapper/wrapper.py,sha256=4qwHNifO5yzFoxWGISE78reMLHXqmpudf-9uv_rm644,5957
|
|
3
3
|
bcsfe_wrapper/bcsfe/__init__.py,sha256=vCHjSoJq5u684HLQXahhtA64MZWffNHFdhweP7RM0f4,144
|
|
4
4
|
bcsfe_wrapper/bcsfe/__main__.py,sha256=Dam14Fv6L-tRRufIkIRpr69dM0b2ybU1eALJxIw_eFI,2091
|
|
5
5
|
bcsfe_wrapper/bcsfe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -198,7 +198,7 @@ bcsfe_wrapper/bcsfe/files/locales/vi/edits/treasures.properties,sha256=U9uKsF4y0
|
|
|
198
198
|
bcsfe_wrapper/bcsfe/files/locales/vi/edits/user_rank.properties,sha256=FcldhzKM0UmuhmGzI3dGzxstuKcw-t-gkbmKLZT4VKg,603
|
|
199
199
|
bcsfe_wrapper/bcsfe/files/themes/default.json,sha256=w8eqqd9ATIFwUcvOWTdJjyd1T3LGgUm3iVkJhT5wfEo,392
|
|
200
200
|
bcsfe_wrapper/bcsfe/files/themes/discord.json,sha256=W1dtEev6tap_waHOxvSqENDcMRA9jfBvjW7t-ssdGs4,370
|
|
201
|
-
bcsfe_wrapper_python-0.1.
|
|
202
|
-
bcsfe_wrapper_python-0.1.
|
|
203
|
-
bcsfe_wrapper_python-0.1.
|
|
204
|
-
bcsfe_wrapper_python-0.1.
|
|
201
|
+
bcsfe_wrapper_python-0.1.6.dist-info/METADATA,sha256=ETnG8qeArkhkECPrrlfeBIFKfkSdTujpi58_5wueVxY,4326
|
|
202
|
+
bcsfe_wrapper_python-0.1.6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
203
|
+
bcsfe_wrapper_python-0.1.6.dist-info/top_level.txt,sha256=kqyMKpAdNg39_kGGtqsxOSLPIb-qx7R1mQj1hReUsYM,14
|
|
204
|
+
bcsfe_wrapper_python-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|