Skip to content

Instantly share code, notes, and snippets.

View zmijunkie's full-sized avatar

Sascha Gresk zmijunkie

View GitHub Profile
@bosim
bosim / exportVocabulary.py
Created October 3, 2012 09:57
Script for exporting ATVocabularyManager vocabularies to IMS VDEX format. Put it in the "custom" folder and access it using http://<my-site>/portal_vocabularies/<vocabName>/exportVocabulary
def recurse(element):
elements = []
for item in element.objectValues():
d = {'uid' : item.UID(),
'title' : item.title,
'children' : []}
if hasattr(item, 'objectValues'):
d['children'] = recurse(item)
elements.append(d)
return elements