damon-devtools 1.0.0__tar.gz → 1.0.1__tar.gz
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.
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/PKG-INFO +1 -1
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/damon_devtools.egg-info/PKG-INFO +1 -1
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/archiver/cli.py +1 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/archiver/core.py +13 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/archiver/models.py +1 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/pyproject.toml +1 -1
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/README.md +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/damon_devtools.egg-info/SOURCES.txt +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/damon_devtools.egg-info/dependency_links.txt +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/damon_devtools.egg-info/entry_points.txt +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/damon_devtools.egg-info/requires.txt +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/damon_devtools.egg-info/top_level.txt +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/launcher.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/apkpull/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/apkpull/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/apkpull/core.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/apkpull/models.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/apkpull/ui.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/archiver/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/archiver/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/game-resources-extrator/extract_resources.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/portkill/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/portkill/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/portkill/core.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/portkill/models.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/portkill/ui.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/qrcode/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/qrcode/core.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/qrcode/ui.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/removebg/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/removebg/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/removebg/cli.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/removebg/core.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/url2md/__init__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/url2md/__main__.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/url2md/cli.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/tools/url2md/core.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/devtools/types.py +0 -0
- {damon_devtools-1.0.0 → damon_devtools-1.0.1}/setup.cfg +0 -0
|
@@ -126,6 +126,12 @@ def load_config(path: Path) -> list[ArchiveEntry]:
|
|
|
126
126
|
f"{path}: archives[{i}].type must be 'zip' or 'normal', got {type_!r}"
|
|
127
127
|
)
|
|
128
128
|
|
|
129
|
+
remove_if_restored = raw.get("removeIfRestored", False)
|
|
130
|
+
if not isinstance(remove_if_restored, bool):
|
|
131
|
+
raise ConfigError(
|
|
132
|
+
f"{path}: archives[{i}].removeIfRestored must be a boolean"
|
|
133
|
+
)
|
|
134
|
+
|
|
129
135
|
local = Path(raw["local"])
|
|
130
136
|
remote = Path(raw["remote"])
|
|
131
137
|
if local.is_absolute():
|
|
@@ -180,6 +186,7 @@ def load_config(path: Path) -> list[ArchiveEntry]:
|
|
|
180
186
|
local=local,
|
|
181
187
|
remote=remote,
|
|
182
188
|
type=type_,
|
|
189
|
+
remove_if_restored=remove_if_restored,
|
|
183
190
|
include=include,
|
|
184
191
|
exclude=exclude,
|
|
185
192
|
archive=archive_cfg,
|
|
@@ -855,6 +862,9 @@ def restore_one(
|
|
|
855
862
|
_emit(f"Extracted {extracted} entries")
|
|
856
863
|
except OSError as e:
|
|
857
864
|
raise ArchiveIOError(f"failed to extract {candidate}: {e}") from e
|
|
865
|
+
if entry.remove_if_restored and not keep_in_remote:
|
|
866
|
+
_emit(f"Removing restored archive {candidate}")
|
|
867
|
+
_cleanup_tree(candidate, on_progress)
|
|
858
868
|
touched_remotes.add(entry.remote)
|
|
859
869
|
else:
|
|
860
870
|
# ``_find_candidates`` returns the matching directory. The data
|
|
@@ -884,6 +894,9 @@ def restore_one(
|
|
|
884
894
|
except OSError as e:
|
|
885
895
|
raise ArchiveIOError(f"failed to move {source}: {e}") from e
|
|
886
896
|
restored.append(dest_root)
|
|
897
|
+
if entry.remove_if_restored and not keep_in_remote:
|
|
898
|
+
_emit(f"Removing restored archive {candidate}")
|
|
899
|
+
_cleanup_tree(candidate, on_progress)
|
|
887
900
|
touched_remotes.add(entry.remote)
|
|
888
901
|
|
|
889
902
|
# Fallback pass: for each entry that had no _find_candidates hit, try the
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|