source /usr/lib/ckan/default/bin/activate
ckanapi dump organizations --all -q -r http://hri.fi > hri_orgs.json
apt install jq
cat hri_orgs.json |jq --compact-output '{name, title, description}' > fixed_hri_orgs.json
ckanapi dump datasets --all -q -c /etc/ckan/default/production.ini > datasets
cat fixed_hri_orgs.json|ckanapi load organizations -c /etc/ckan/default/production.ini
ckanapi dump organizations --all -q -c /etc/ckan/default/production.ini > /vagrant/new_hri_orgs.json
New orgs now contain old orgs with new ids. Remember to copy them where conversion happens.
wget http://www.hri.fi/wp-content/uploads/ckan/hri-ckan-active-metadata-daily-output.json
# TODO: ** This first bit should be fixed **
cp hri-ckan-active-metadata-daily-output.json hri.json
node build/convert.js
python filter_urls.py
ckanapi load datasets -I /vagrant/out.json -c /etc/ckan/default/production.ini &> /vagrant/import_problems.txt
- node build/convert.js
- python filter_urls.py