Skip to main content

A command-line tool to convert HDF5 files to markdown format

Project description

HDF5 to Markdown Converter

A simple command-line tool to convert HDF5 files to markdown format. This tool helps you visualize the structure, metadata, and attributes of HDF5 files in a human-readable markdown format.

Features

  • Convert HDF5 files to markdown format
  • Display file structure including groups and datasets
  • Show dataset properties (shape, type)
  • List attributes for groups and datasets
  • Clean and readable markdown output

Installation

# Clone the repository
git clone https://github.com/hyoklee/h5md.git
cd h5md

# Install in development mode
pip install -e .

Or install directly from GitHub:

pip install git+https://github.com/hyoklee/h5md.git

Usage

Command Line

Convert an HDF5 file to markdown:

h5md input.h5

This will create input.md in the same directory. You can also specify a custom output path:

h5md input.h5 -o output.md

Python API

from h5md import HDF5Converter

# Create a converter
converter = HDF5Converter()

# Convert HDF5 to markdown
markdown_content = converter.convert('input.h5')

# Save to file
with open('output.md', 'w') as f:
    f.write(markdown_content)

Output Format

The generated markdown file includes:

  1. File structure with groups and datasets
  2. Dataset properties (shape, type)
  3. Group and dataset attributes
  4. Nicely formatted tables for metadata

Example output:

# HDF5 File Structure: input.h5

## Group: data
### Attributes:
| Name | Value | Type |
|------|--------|------|
| `purpose` | `testing` | `str` |

### Dataset: array
| Property | Value |
|----------|--------|
| Shape | `(3,)` |
| Type | `float64` |

#### Dataset Attributes:
| Name | Value | Type |
|------|--------|------|
| `unit` | `meters` | `str` |

Requirements

  • Python 3.10+
  • h5py
  • numpy

License

BSD 3-Clause License

Copyright (c) 2025, Joe Lee All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

h5md-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

h5md-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file h5md-0.1.0.tar.gz.

File metadata

  • Download URL: h5md-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for h5md-0.1.0.tar.gz
Algorithm Hash digest
SHA256 368acad84b6952e061e90d072a9e0940ef8aea2dc5400f1cc4bc5cce3624835b
MD5 7d3105e54f52e5b00eec5d128bcb5753
BLAKE2b-256 48868ea5dd3e9990be74a1d3247b78a82e247c4a21464d453f4995d157a5b969

See more details on using hashes here.

File details

Details for the file h5md-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: h5md-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for h5md-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53c58dd4f64d84c65046967ce4c5312c291805df66f12586a031beeef1cb3c51
MD5 956f271b409e11376bd0628be9c9c50d
BLAKE2b-256 dd17896668d560029e9b7ec9f6aacd738249a310754be20840851e6c9b1b65c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page