@@ -0,0 +1,787 @@
+%22%22%22%0AReturn all of the datasets that match %22Obesity%22 and add them to the %0Afederated obesity group.%0A%22%22%22%0Aimport sys%0A%0Aimport dc%0A%0Adef put_into_group():%0A    obeses = dc.ckan.action.package_search(q='obesity', rows=10000)%0A%0A    for package in obeses%5B'results'%5D:%0A        if %5Bg for g in package%5B'groups'%5D if g%5B'name'%5D == 'federated-uk-us-obesity-data'%5D:%0A            print 'Already in group -', package%5B'name'%5D%0A            continue%0A        print 'Adding', package%5B'name'%5D%0A        dc.ckan.action.member_create(%0A            id='federated-uk-us-obesity-data', %0A            object=package%5B'name'%5D,%0A            object_type='package',%0A            capacity='member'%0A        )%0A        print 'Done'%0A%0A    return%0A%0Adef main():%0A    put_into_group()%0A    return 0%0A%0Aif __name__ == '__main__':%0A    sys.exit(main())%0A

Update obesity publisher