def dump_ckan(m):
    """Create a groups and organization file"""

    doc = MetapackDoc(cache=m.cache)
    doc.new_section('Groups',        'Title Description Id Image_url'.split())
    doc.new_section('Organizations', 'Title Description Id Image_url'.split())

    c = RemoteCKAN(m.ckan_url, apikey=m.api_key)

    for g in c.action.group_list(all_fields=True):
        print(g.keys())

    for o in c.action.organization_list(all_fields=True):
        print(g.keys())
Create a groups and organization file