Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* text=auto eol=lf

*.sh text eol=lf
*.bat text eol=crlf
*.ps1 text eol=lf

*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ contact_links:
- name: Security vulnerability
url: https://github.com/coldsofttech/BatchVault/security/advisories/new
about: Please report security problems privately.
- name: Questions and support
url: https://github.com/coldsofttech/BatchVault/blob/main/SUPPORT.md
about: See how to get help before opening an issue.
32 changes: 0 additions & 32 deletions .github/social-preview.html

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ jobs:

- name: Ruff
run: uv run ruff check .

- name: Mypy
run: uv run mypy
4 changes: 4 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config:
MD013: false # line length
MD033: false # inline HTML
MD041: false # first line heading (templates start with a subheading)
19 changes: 15 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Changelog

All notable changes to this project are documented here.
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.1.1] - 2026-11-14

### Added

- `--resume` for `pack` and `unpack` continues an interrupted run, reusing the files that already finished and checking them first. Also in Python, the GitHub Action and Docker.
- `pack` writes a `BATCHVAULT-README.md` next to the manifest with how the archive was made and the commands to restore it. It never holds a password or key; `--no-readme` turns it off.

### Changed

- Pressing Ctrl+C now stops starting new files instead of working through the whole queue.
- The Python modules were reorganised. `import batchvault as bv`, the command and the GitHub Action work as before, but code that imported internal modules directly must update those imports.

## [0.1.0] - 2026-10-24

First release.

### Added

- Archive many files at once into volumes of a size you choose, and restore them from a manifest, a folder, any single volume or a list.
- Two engines: a built-in one that needs nothing installed (xz, gzip, bzip2 or no compression) and an optional 7-Zip engine.
- Your folder structure is kept: archives mirror the tree and `unpack` recreates it. `list files` remembers the folder you listed, and `--root DIR` overrides where paths start.
Expand All @@ -21,6 +35,3 @@ First release.
- A Python API, a GitHub Action (`coldsofttech/BatchVault@v1`) and Docker images with and without 7-Zip.
- Sensible defaults: `--level auto`, no worker threads (`--jobs 0`) and three retries.
- Requires Python 3.11.4 or later.

[Unreleased]: https://github.com/coldsofttech/BatchVault/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/coldsofttech/BatchVault/releases/tag/v0.1.0
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ uv run pre-commit install

```
uv run ruff check .
uv run mypy
uv run pytest -m "not integration and not e2e" -n auto
uv run pytest -m integration # needs 7-Zip installed; skipped otherwise
uv run pytest -m "e2e and not docker" # optional: end-to-end CLI and package tests
```

CI also runs the Docker and GitHub Action end-to-end tests; see
[docs/testing.md](docs/testing.md).
[docs/development.md](docs/development.md#testing).

- Add or update tests for the behaviour you change.
- Add a one or two line entry to `[Unreleased]` in `CHANGELOG.md`, written for
Expand All @@ -30,5 +31,6 @@ CI also runs the Docker and GitHub Action end-to-end tests; see

## Reporting problems

Use the issue templates. For security problems, see [SECURITY.md](SECURITY.md)
instead of opening a public issue.
Use the issue templates, and see [SUPPORT.md](SUPPORT.md) for where to ask
questions first. For security problems, see [SECURITY.md](SECURITY.md) instead of
opening a public issue.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ Things to know:
one made each file.
- Videos, photos and other already-compressed files do not shrink, whatever the
level. For them use `--format store`. See the
[compression guide](docs/compression.md) for choosing a format and level, and
[compression guide](docs/guides/compression.md) for choosing a format and level, and
for memory use.

## Use

| I want to use BatchVault... | Read |
|---|---|
| in a terminal | [Command line guide](docs/cli.md) |
| in my own Python code | [Python guide](docs/python.md) |
| in a GitHub workflow | [GitHub Action guide](docs/github-action.md) |
| in a container | [Docker guide](docs/docker.md) |
| choosing a format and level | [Compression guide](docs/compression.md) |
| in a terminal | [Command line guide](docs/guides/cli.md) |
| in my own Python code | [Python guide](docs/guides/python.md) |
| in a GitHub workflow | [GitHub Action guide](docs/guides/github-action.md) |
| in a container | [Docker guide](docs/guides/docker.md) |
| choosing a format and level | [Compression guide](docs/guides/compression.md) |

A **source** is an original file; an **archive** is the set of volumes made from
it. `pack` turns sources into archives, `unpack` turns archives back into files.
Expand Down Expand Up @@ -230,7 +230,7 @@ update = true
```

Command-line options always win over the file. See
[docs/configuration.md](docs/configuration.md) for every setting and the
[docs/guides/configuration.md](docs/guides/configuration.md) for every setting and the
environment variables.

## Check your setup
Expand All @@ -257,9 +257,9 @@ logged, and web addresses with credentials in them are masked.
The newest 20 logs are kept. Change the folder with `BATCHVAULT_LOG_DIR`, pick a
file with `--log-file`, or turn logging off with `--no-log`.

## Contributing and security
## Support, contributing and security

Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and
For help, see [SUPPORT.md](SUPPORT.md). Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and
follow the [code of conduct](CODE_OF_CONDUCT.md). To report a vulnerability,
please read [SECURITY.md](SECURITY.md) first and do not open a public issue.
Technical notes live in [docs/architecture.md](docs/architecture.md) and
Expand Down
7 changes: 7 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Support

- **Start with the docs:** the [README](README.md) covers installing and using BatchVault. For more detail see the [command line](docs/guides/cli.md), the [Python API](docs/guides/python.md), [configuration](docs/guides/configuration.md), [compression](docs/guides/compression.md), [Docker](docs/guides/docker.md) and the [GitHub Action](docs/guides/github-action.md).
- **Check your setup:** run `batchvault doctor`. It reports your Python version, whether the xz, gzip and bzip2 libraries and 7-Zip are available, and where logs are kept.
- **Questions and ideas:** use [GitHub Discussions](../../discussions) if enabled, otherwise open an issue with the feature request form.
- **Bugs:** open an issue with the bug report form. Include the BatchVault version (`batchvault --version`), the engine (native or 7-Zip), your operating system and Python version, how you run it (command line, Python, Docker or the GitHub Action), the command or code, and the error output. The newest run log helps too; `batchvault doctor` shows where they are kept. Leave out passwords, key files and private data.
- **Security problems:** see [SECURITY.md](SECURITY.md). Do not open a public issue.
58 changes: 38 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ inputs:
public-key:
description: Public key; unpack and verify then require a valid signature.
default: ""
resume:
description: >-
Continue an interrupted pack or unpack in the output folder. Every
setting comes from the earlier run, so only output, password, sign-key,
public-key and seven-zip are used; the other inputs are ignored.
default: "false"
fail-on-error:
description: Fail the step if any file failed or was skipped.
default: "true"
Expand Down Expand Up @@ -153,6 +159,7 @@ runs:
AGAINST: ${{ inputs.against }}
SEVEN_ZIP: ${{ inputs.seven-zip }}
UPDATE: ${{ inputs.update }}
RESUME: ${{ inputs.resume }}
RETRIES: ${{ inputs.retries }}
ENCRYPT: ${{ inputs.encrypt }}
SIGN_KEY: ${{ inputs.sign-key }}
Expand All @@ -176,34 +183,45 @@ runs:
# with "-" is never read as an option.
args=(--json)
positional=()
[ -n "$JOBS" ] && args+=(--jobs "$JOBS")
# A resumed run takes jobs and retries from the earlier run.
[ "$RESUME" != "true" ] && [ -n "$JOBS" ] && args+=(--jobs "$JOBS")
[ -n "$SEVEN_ZIP" ] && args+=(--7z "$SEVEN_ZIP")

case "$COMMAND" in
pack)
while IFS= read -r line; do [ -n "$line" ] && positional+=("$line"); done <<< "$FILES"
[ -n "$LIST_FILE" ] && args+=(--list "$LIST_FILE")
[ -n "$OUTPUT" ] && args+=(--output "$OUTPUT")
args+=(--engine "$ENGINE" --level "$LEVEL" --volume-size "$VOLUME_SIZE")
[ -n "$FORMAT" ] && args+=(--format "$FORMAT")
[ -n "$MANIFEST" ] && args+=(--manifest "$MANIFEST")
[ -n "$ROOT" ] && args+=(--root "$ROOT")
while IFS= read -r line; do [ -n "$line" ] && args+=(--include "$line"); done <<< "$INCLUDE"
while IFS= read -r line; do [ -n "$line" ] && args+=(--exclude "$line"); done <<< "$EXCLUDE"
[ "$VERIFY" = "true" ] && args+=(--verify)
[ "$FORCE" = "true" ] && args+=(--force)
[ "$UPDATE" = "true" ] && args+=(--update)
[ -n "$RETRIES" ] && args+=(--retries "$RETRIES")
[ "$ENCRYPT" = "true" ] && args+=(--encrypt)
[ -n "$SIGN_KEY" ] && args+=(--sign-key "$SIGN_KEY")
if [ "$RESUME" = "true" ]; then
args+=(--resume)
[ -n "$OUTPUT" ] && args+=(--output "$OUTPUT")
[ -n "$SIGN_KEY" ] && args+=(--sign-key "$SIGN_KEY")
else
while IFS= read -r line; do [ -n "$line" ] && positional+=("$line"); done <<< "$FILES"
[ -n "$LIST_FILE" ] && args+=(--list "$LIST_FILE")
[ -n "$OUTPUT" ] && args+=(--output "$OUTPUT")
args+=(--engine "$ENGINE" --level "$LEVEL" --volume-size "$VOLUME_SIZE")
[ -n "$FORMAT" ] && args+=(--format "$FORMAT")
[ -n "$MANIFEST" ] && args+=(--manifest "$MANIFEST")
[ -n "$ROOT" ] && args+=(--root "$ROOT")
while IFS= read -r line; do [ -n "$line" ] && args+=(--include "$line"); done <<< "$INCLUDE"
while IFS= read -r line; do [ -n "$line" ] && args+=(--exclude "$line"); done <<< "$EXCLUDE"
[ "$VERIFY" = "true" ] && args+=(--verify)
[ "$FORCE" = "true" ] && args+=(--force)
[ "$UPDATE" = "true" ] && args+=(--update)
[ -n "$RETRIES" ] && args+=(--retries "$RETRIES")
[ "$ENCRYPT" = "true" ] && args+=(--encrypt)
[ -n "$SIGN_KEY" ] && args+=(--sign-key "$SIGN_KEY")
fi
out_dir="${OUTPUT:-archives}"
;;
unpack)
positional+=("$SOURCE")
if [ "$RESUME" = "true" ]; then
args+=(--resume)
else
positional+=("$SOURCE")
[ "$FORCE" = "true" ] && args+=(--force)
[ "$UPDATE" = "true" ] && args+=(--update)
[ -n "$RETRIES" ] && args+=(--retries "$RETRIES")
fi
[ -n "$OUTPUT" ] && args+=(--output "$OUTPUT")
[ "$FORCE" = "true" ] && args+=(--force)
[ "$UPDATE" = "true" ] && args+=(--update)
[ -n "$RETRIES" ] && args+=(--retries "$RETRIES")
[ -n "$PUBLIC_KEY" ] && args+=(--public-key "$PUBLIC_KEY")
out_dir="${OUTPUT:-restored}"
;;
Expand Down
File renamed without changes
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Documentation

- **Guides:** [command line](guides/cli.md), [Python API](guides/python.md), [configuration](guides/configuration.md), [compression](guides/compression.md), [Docker](guides/docker.md) and the [GitHub Action](guides/github-action.md). Start with the [project README](../README.md) for installing and a first run.
- **[Architecture](architecture.md) and [development](development.md):** how the repository fits together, how to work on it, and how it is tested and released.
- **Help and security:** [SUPPORT.md](../SUPPORT.md) for questions and bug reports, [SECURITY.md](../SECURITY.md) for vulnerabilities.
Loading
Loading