Skip to content

Commit

Permalink
Merge pull request #124 from silx-kit/support-netcdf
Browse files Browse the repository at this point in the history
Support NetCDF4
  • Loading branch information
loichuder authored Sep 11, 2023
2 parents 7bc06a8 + 9adf77d commit 67a2032
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ works for the following extensions:
- "Classic" HDF5: `.h5`, `.hdf5`
- [NeXus](https://www.nexusformat.org/): `.nexus`, `.nx`, `.nxs`
- [CXI](https://cxidb.org/cxi.html): `.cxi`
- [NetCDF4](https://docs.unidata.ucar.edu/nug/current/): `.nc`, `.nc4`

For other types of files, you can change the extension to one of the supported
extensions or, if it is widespread,
Expand Down
13 changes: 12 additions & 1 deletion src/fileType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ const HDF5_FILE_TYPE = {
name: 'hdf5file',
icon: hdf5Icon,
displayName: 'HDF5 File',
extensions: ['.cxi', '.hdf', '.hdf5', '.h5', '.nexus', '.nx', '.nx5', '.nxs'],
extensions: [
'.cxi',
'.hdf',
'.hdf5',
'.h5',
'.nexus',
'.nx',
'.nx5',
'.nxs',
'.nc',
'.nc4',
],
mimeTypes: ['application/x-hdf5'],
fileFormat: 'base64' as const,
} satisfies Partial<DocumentRegistry.IFileType>;
Expand Down

0 comments on commit 67a2032

Please sign in to comment.