From 809faab7a57a6b9a97c5396133270a06f8aaf28f Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 27 Aug 2018 10:27:13 +0300 Subject: [PATCH] Update notes for 2018-08-26 --- content/posts/2018-08.md | 17 +++++++++++++++++ docs/2018-08/index.html | 25 ++++++++++++++++++++++--- docs/sitemap.xml | 10 +++++----- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/content/posts/2018-08.md b/content/posts/2018-08.md index ab9feedfd..0d54658ea 100644 --- a/content/posts/2018-08.md +++ b/content/posts/2018-08.md @@ -302,5 +302,22 @@ $ sudo su - ``` - After reboot I logged in and cleared all the XMLUI caches and everything looked to be working fine +- Adam from WLE had asked a few weeks ago about getting the metadata for a bunch of items related to gender from 2013 until now +- They want a CSV with *all* metadata, which the Atmire Listings and Reports module can't do +- I exported a list of items from Listings and Reports with the following criteria: from year 2013 until now, have WLE subject `GENDER` or `GENDER POVERTY AND INSTITUTIONS`, and CRP `Water, Land and Ecosystems` +- Then I extracted the Handle links from the report so I could export each item's metadata as CSV + +``` +$ grep -o -E "[0-9]{5}/[0-9]{0,5}" listings-export.txt > /tmp/iwmi-gender-items.txt +``` + +- Then on the DSpace server I exported the metadata for each item one by one: + +``` +$ while read -r line; do dspace metadata-export -f "/tmp/${line/\//-}.csv" -i $line; sleep 2; done < /tmp/iwmi-gender-items.txt +``` + +- But from here I realized that each of the fifty-nine items will have different columns in their CSVs, making it difficult to combine them +- I'm not sure how to proceed without writing some script to parse and join the CSVs, and I don't think it's worth my time diff --git a/docs/2018-08/index.html b/docs/2018-08/index.html index bacfa3598..5996e485f 100644 --- a/docs/2018-08/index.html +++ b/docs/2018-08/index.html @@ -34,7 +34,7 @@ I ran all system updates on DSpace Test and rebooted it - + @@ -79,9 +79,9 @@ I ran all system updates on DSpace Test and rebooted it "@type": "BlogPosting", "headline": "August, 2018", "url": "https://alanorth.github.io/cgspace-notes/2018-08/", - "wordCount": "2245", + "wordCount": "2426", "datePublished": "2018-08-01T11:52:54+03:00", - "dateModified": "2018-08-23T16:34:16+03:00", + "dateModified": "2018-08-26T09:38:15+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -481,6 +481,25 @@ $ dspace database migrate ignored + +
$ grep -o -E "[0-9]{5}/[0-9]{0,5}" listings-export.txt > /tmp/iwmi-gender-items.txt
+
+ + + +
$ while read -r line; do dspace metadata-export -f "/tmp/${line/\//-}.csv" -i $line; sleep 2; done < /tmp/iwmi-gender-items.txt
+
+ + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index b07a1ac35..8803f777c 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2018-08/ - 2018-08-23T16:34:16+03:00 + 2018-08-26T09:38:15+03:00 @@ -179,7 +179,7 @@ https://alanorth.github.io/cgspace-notes/ - 2018-08-23T16:34:16+03:00 + 2018-08-26T09:38:15+03:00 0 @@ -190,7 +190,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2018-08-23T16:34:16+03:00 + 2018-08-26T09:38:15+03:00 0 @@ -202,13 +202,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2018-08-23T16:34:16+03:00 + 2018-08-26T09:38:15+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2018-08-23T16:34:16+03:00 + 2018-08-26T09:38:15+03:00 0