Command-line tools

G5print

Print (one, several, or all) datasets in a HDF5-file.

usage: G5print [-h] [--full] [--no-data] [--regex] [-a] [-d MAX_DEPTH]
               [-f FOLD] [-i] [-r ROOT] [-v]
               source [dataset ...]

Positional Arguments

source

File path

dataset

Path to datasets to print (default: all)

Named Arguments

--full

Print full array

Default: False

--no-data

Don’t print data

Default: False

--regex

Evaluate dataset name as a regex

Default: False

-a, --attrs

Print attributes

Default: False

-d, --max-depth

Maximum depth to display

-f, --fold

Fold paths

-i, --info

Print information: shape, dtype

Default: False

-r, --root

Start somewhere in the path-tree

Default: “/”

-v, --version

show program’s version number and exit

G5list

List datasets (or groups of datasets) in a HDF5-file.

Note that if you have a really big file the --layer option can be much faster than searching the entire file.

usage: G5list [-h] [-D] [-d MAX_DEPTH] [-f FOLD] [-i] [-L LAYER] [-l]
              [-r ROOT] [-s] [-v]
              source

Positional Arguments

source

Named Arguments

-D, --datasets

Print only datasets

Default: False

-d, --max-depth

Maximum depth to display

-f, --fold

Fold paths

-i, --info

Print info: shape, dtype

Default: False

-L, --layer

Print paths at a specific layer

-l, --long

–info but with attributes

Default: False

-r, --root

Start somewhere in the path-tree

Default: “/”

-s, --links

Show destination of soft links

Default: False

-v, --version

show program’s version number and exit

Overview

GooseHDF5.cli.G5check

Try reading datasets.

GooseHDF5.cli.G5repair

Extract readable data from a HDF5-file and copy it to a new HDF5-file.

GooseHDF5.cli.G5compare

Compare two HDF5 files.

GooseHDF5.cli.G5repack

Read and write a HDF5 file.

G5check

Try reading datasets.

In case of reading failure the path is printed (otherwise nothing is printed).

usage

G5check [options] <source>

arguments
<source>

HDF5-file.

options
-b, --basic

Only try getting a list of datasets, skip trying to read them.

-h, --help

Show help.

--version

Show version.

(c - MIT) T.W.J. de Geus | tom@geus.me | www.geus.me | github.com/tdegeus/GooseHDF5

G5repair

Extract readable data from a HDF5-file and copy it to a new HDF5-file.

usage

G5repair [options] <source> <destination>

arguments
<source>

Source HDF5-file, possibly containing corrupted data.

<destination>

Destination HDF5-file.

options
-f, --force

Force continuation, overwrite existing files.

-h, --help

Show help.

--version

Show version.

(c - MIT) T.W.J. de Geus | tom@geus.me | www.geus.me | github.com/tdegeus/GooseHDF5

G5compare

Compare two HDF5 files.

If the function does not output anything all datasets are present in both files, and all the content of the datasets is equal. Each output line corresponds to a mismatch between the files.

usage

G5compare [options] <source> <other>

arguments
<source>

HDF5-file.

<other>

HDF5-file.

options
-t, --dtype

Verify that the type of the datasets match.

-r, --renamed=ARG

Renamed paths: this option takes two arguments, one for source and one for other. It can repeated, e.g. G5compare a.h5 b.h5 -r /a /b  -r /c /d

-c, –color=STR (none, dark)

Color theme. default: dark.

-h, --help

Show help.

--version

Show version.

(c - MIT) T.W.J. de Geus | tom@geus.me | www.geus.me | github.com/tdegeus/GooseHDF5

G5repack

Read and write a HDF5 file.

This allows a compacter file by removing features like extendible datasets.

usage

G5repack [options] <source>…

arguments
<source>

HDF5-file.

options
-c, --compress

Apply compression (using the loss-less GZip algorithm).

-f, --float

Store doubles as floats.

-h, --help

Show help.

--version

Show version.

(c - MIT) T.W.J. de Geus | tom@geus.me | www.geus.me | github.com/tdegeus/GooseHDF5