Skip to content

Usage

Wring has various subcommand tools to help keep files small.

Usage:

wring [OPTIONS] COMMAND [ARGS]...

Options:

  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

csv

Crawl a directory and compress csv files into parquet.

Usage:

wring csv [OPTIONS]

Options:

  --directory <path>         [default: .]
  --compression <str>        compression algorithm  [default: zstd]
  --compression-level <int>  compression level  [default: 9]
  --clean / --no-clean       remove uncompressed files after successful
                             wringing  [default: no-clean]

omx

Convert one or more OMX files using different data types and filters.

Usage:

wring omx [OPTIONS] [glob_pattern] [complevel] [complib]

Options:

  glob_pattern          file name or glob pattern for the OMX files to convert
                        [default: *.omx]
  complevel             compression level  [default: 3]
  complib               compression library  [default: blosc2:zstd]
  --dtype-shrink <int>  maximum bitwidth to use for integer and float types
                        [default: 32]
  --n-processes <int>   number of processes to use while converting files
                        [default: 8]
  --out-dir <str>       directory name for the resulting reprocessed file(s),
                        if not provided any '.omx' suffix is stripped from the
                        original file name(s) and a '.omxz' suffix is added

omx2parquet

Convert the 2-D matrices in one or more OMX files into parquet files.

Each output file is in long format, with the row and column labels of the source matrices in the first two columns and one column per matrix.

Usage:

wring omx2parquet [OPTIONS] [glob_pattern]

Options:

  glob_pattern                  file name or glob pattern for the OMX files to
                                convert  [default: *.omx]
  --out-dir <str>               directory name for the resulting parquet
                                file(s); by default each file is written
                                alongside its source with a '.parquet' suffix
  --matrix <str>                name of a matrix to convert; repeat to select
                                several, or omit to convert all of them
  --row-lookup <str>            name of the lookup to use for row labels
  --col-lookup <str>            name of the lookup to use for column labels
  --row-label-name <str>        name of the row label column  [default:
                                row_label]
  --col-label-name <str>        name of the column label column  [default:
                                col_label]
  --compression <str>           parquet compression algorithm  [default: zstd]
  --compression-level <int>     parquet compression level  [default: 9]
  --row-group-rows <int>        target number of table rows per parquet row
                                group  [default: 1048576]
  --dtype-shrink <int>          maximum bitwidth to use for integer and float
                                types  [default: 32]
  --overwrite / --no-overwrite  overwrite existing parquet files  [default:
                                no-overwrite]

tarzst

Compress a directory using the .tar.zst format.

Usage:

wring tarzst [OPTIONS] {directory}

Options:

  directory                 the directory to compress  [required]
  --archive <path>          base file name for the resulting archive file(s),
                            if not provided a '.tar.zst' suffix is added to
                            the original directory name
  -c, --chunk-gigs <float>  chunk the resulting archive into parts that are no
                            larger than this many gigabytes

untarzst

Decompress a directory stored in .tar.zst format.

Usage:

wring untarzst [OPTIONS] {archive}

Options:

  archive          the archive file to decompress, or the first of multiple
                   parts  [required]
  --outdir <path>  directory name for the resulting decompressed file(s), if
                   not provided any '.tar.zst' suffix is stripped from the
                   archive file name and the rest is used