Universal copy tool with wizard + profile mode only.
whl-copy: interactive wizard (Source -> Destination -> Filter -> Preview -> Execute)whl-copy --fast: use last.whl_copy_state.jsonplan and run without promptswhl-copy --profile <name>: run a named saved profile directly
whl_copy/
main.py # wizard-only CLI entry
wizard.py # Wizard orchestration pipeline
presets.yml # Preset/custom profile templates (YAML)
config.yml # Runtime configuration
core/
models.py # Profile / State models
profile_store.py # Preset/profile YAML store
state_store.py # Local persistent state read/write
modules/
address_discovery.py # Pluggable storage detectors (disk/usb/ssh/bos/custom)
filters.py # Path and rule filters
scanner.py # Data scan helpers
local_transfer.py # Local copy executor
rsync_transfer.py # Remote copy executor
checksum.py # Verification helpers
utils/
logger.py
time_utils.py
tests/
- Source Selection
- source is local working directory only
- default to last source or current working directory
- Destination Selection
- scan mounted disks / USB / remote SSH / BOS / custom endpoints
- choose destination device and save directory
- Filter Pipeline
- choose preset (
当天数据,近1小时抓包,全量配置) or自定义过滤 - custom filter type/pattern comes from YAML templates
- time range (
近1小时,今天,不限) and size (1K,1M,1G,不限) - preview matched files and estimated total size
- choose preset (
- Execution
- ask
是否保存配置? (Y/n)and save as named profile - confirm with
Proceed with copy? (Y/n) - execute copy, print size and estimated time, then progress bar
- remote destination uses scp-like address
user@host:/path(only destination address needed)
- ask
- Template config: whl_copy/presets.yml
filter_types,presets,named_profiles
- History state:
~/.whl_copy_state.jsonlast_source,last_dest,last_filter_type,last_plan
- Preferred:
questionary(better menu/confirm/text UX) - Fallback: built-in
input/printifquestionaryis not installed
pip install -e .
whl-copy --help
whl-copypython -m whl_copy.main
python -m whl_copy.main --fast
python -m whl_copy.main --profile 当天日志方案