Did you already see
?
In that thread the rules (including the groups) are exported with the script from vNugglets, and I provided a modified version of Arnim's functions to read the rules back. At the end of the script attached to that post is my script to read the info back from the CSV file.
Does that do what you want ?