Skip to content

Instantly share code, notes, and snippets.

View acmoles's full-sized avatar

Anthony Moles acmoles

View GitHub Profile
@acmoles
acmoles / json2tldr.py
Created October 9, 2024 11:54
Tldraw convert from .tldr to .json export to .json snapshot
import json
def convert_type_b_to_type_a(type_b_file, type_a_file):
with open(type_b_file, 'r') as file:
type_b_data = json.load(file)
# Extract schema
schema = type_b_data['schema']
# Extract shapes and convert to records