silx-kit / vscode-h5web

VSCode extension to explore and visualize HDF5 files
https://marketplace.visualstudio.com/items?itemName=h5web.vscode-h5web
MIT License
33 stars 5 forks source link

Exporting slices #20

Closed balvisio closed 1 year ago

balvisio commented 1 year ago

Hi all,

I am using the H5Web extension in VSCode and trying to use the export functionality; I want to save certain slices to another files. However the export button/functionality is always disabled. Is there something I need to do to enable it?

Thank you!

Is your feature request related to a problem?

I cannot export slices to CSV. The "Export" bottom is disabled.

Alternatives you've considered

Copy/paste

Additional context

Screen Shot 2022-12-23 at 11 39 15 AM
axelboc commented 1 year ago

Hi there, CSV export (or any other type of export) is not currently implemented in the VS Code extension. This is because the VS Code extension does not provide an implementation for H5WasmProvider's getExportURL prop.

If you're interested in contributing, feel free to have a go at it! You can implement a getExportURL function as explained here, and pass it as prop to H5WasmProvider here: https://github.com/silx-kit/vscode-h5web/blob/main/app/Viewer.tsx#L26

balvisio commented 1 year ago

Thank you for the response @axelboc ! Sure, I will try to carve some time and give it shot. Thanks for the guidance.

mandrew9 commented 1 year ago

I am also interested in this export slice feature being supported. I made an attempt at implementing this feature, using your suggestions @axelboc . Should I create a fork and submit a pull request for your review?

axelboc commented 1 year ago

Hi @mandrew9, for sure, please do go ahead! Thanks a lot :blush: