nexusLIMS.cli.extract#

CLI command for extracting metadata and generating previews from individual files.

Usage#

.. code-block:: bash

# Extract metadata and print as JSON
nexuslims extract /path/to/file.dm4

# Extract metadata only (no preview)
nexuslims extract --no-preview /path/to/file.dm4

# Generate preview only
nexuslims extract --no-metadata /path/to/file.dm4

# Save preview to a specific path
nexuslims extract --preview-path /tmp/preview.png /path/to/file.dm4

# Write metadata JSON alongside the file (or to NX_DATA_PATH if the file
# is under NX_INSTRUMENT_DATA_PATH)
nexuslims extract --write /path/to/file.dm4

Module Contents#

Functions#

main

Extract metadata and/or generate a preview for a single FILE.

API#

nexusLIMS.cli.extract.main(file: Path, no_preview: bool, no_metadata: bool, preview_path: Path | None, write: bool, overwrite: bool, verbose: bool) None#

Extract metadata and/or generate a preview for a single FILE.

Metadata is printed to stdout as JSON by default. Use –write to also persist it to the NexusLIMS data directory.

 Examples:

nexuslims extract image.dm4 nexuslims extract –no-preview spectrum.msa nexuslims extract –no-metadata –preview-path /tmp/thumb.png image.tif nexuslims extract –write –overwrite image.dm4