Transform legacy format

Transform one file (or all files within the given directory) from legacy TSDB to the current TSDF format (v0.1).

import os
from tsdf.legacy_tsdf_utils import (
    generate_tsdf_metadata_from_tsdb,
    convert_file_tsdb_to_tsdf,
    convert_files_tsdb_to_tsdf,
)

data_dir = 'data'
# Path to the metadata file
path_to_file = os.path.join(data_dir, "ppp_format_meta_legacy.json")
path_to_new_file = os.path.join(data_dir, "tmp_ppp_format_meta.json")

# Generate a TSDF metadata file from TSDB
generate_tsdf_metadata_from_tsdb(path_to_file, path_to_new_file)

# Convert a TSDB metadata file to TSDB format
# convert_metadata_tsdb_to_tsdf(path_to_file)

# Convert all metadata files in the directory from TSDB to TSDF format
# convert_metadatas_tsdb_to_tsdf(path_to_dir)