pattrstorage merge

billyanok's icon

Hello, is there an easy way to merge pattrstorage json files?

For example -

preset _file1. json contains presets no 1,3,5,7,9,11,13,15,17,19

preset _file1. json contains presets no 2,4,6 8,10,12,14,16,18,20

I would to create a preset_file3.json containing preset no 1-20?

I can manually edit the json files, but I'm looking for a quicker way!

Thx,

Bill

tyler mazaika's icon

You could read the preset .json into [dict] objects. Then [dict.iter] each while incrementing through a new set of key names (in same format as the default pattrstorage format) and add them into a new [dict]. Then save the file.

billyanok's icon

Hello @Tyler,

Thx for the reply, could you provide an example patch?

Thx, B

tyler mazaika's icon
billyanok's icon

Tyler, thank you so much for that!

B