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, source_force_filesystem=None, source_force_geometry=None, dest_force_filesystem=None, dest_force_geometry=None)

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.

source_force_filesystem / source_force_geometry open every source as a given filesystem, and dest_force_filesystem / dest_force_geometry the destination, instead of identifying them by content (see --filesystem on disc’s commands).

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]]