oaknut.disc

The unified disc command-line tool. Its commands are documented under the CLI reference; this page covers the small Python API it also exposes for driving the same operations from a script — no shell required.

Every name documented here is importable directly from oaknut.disc.

Bulk assembly

oaknut.disc.gather(destination, sources, *, into=None, name_from='stem', force=False)

Copy each source disc image’s tree into its own directory in destination.

destination is a compound path to a writable image whose filesystem holds directories (ADFS or AFS — not flat DFS). Each entry in sources is a path to a disc image whose whole tree is copied into a directory of destination, named from the source (see name_from) and placed under into (default: the destination root). The destination is opened once for the whole run.

Returns a list of (source, directory) pairs recording where each source landed. Raises click.ClickException if the destination is flat.

Parameters:
Return type:

list[tuple[str, str]]