I eventually downloaded it as a CSV and used the following to convert it to a workable JSON format:
import json
import pandas as pd
cfg_csv = pd.read_csv("twiddler_cfg.csv")
cfg_csv.columns = ["chord", "key"]
cfg_csv.chord = cfg_csv.chord.str.strip()
cfg_csv[["m", "chord"]] = cfg_csv.chord.str.split(" ", expand=True)
cfg_dict = cfg_csv.to_dict(orient="records")
cfg_dict = {"chords": cfg_dict}
with open("twiddler_cfg.json", "w") as f:
json.dump(cfg_dict, f)
The extra m
field might not do anything, though. I only added it to match the default mappings data structure in Twiddler.ChordFactory
.