From 4a811c531f74353b7f3d2c6c5e72ac78100ff20a Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 4 Jul 2017 10:53:39 +0300 Subject: [PATCH] Update notes for 2017-07-04 --- content/post/2017-07.md | 8 ++++++++ public/2017-07/index.html | 15 ++++++++++++--- public/sitemap.xml | 10 +++++----- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/content/post/2017-07.md b/content/post/2017-07.md index f2e723945..f8d8f130b 100644 --- a/content/post/2017-07.md +++ b/content/post/2017-07.md @@ -14,3 +14,11 @@ tags = ["Notes"] ## 2017-07-04 - Merge changes for WLE Phase II theme rename ([#329](https://github.com/ilri/DSpace/pull/329)) +- Looking at extracting the metadata registries from ICARDA's MEL DSpace database so we can compare fields with CGSpace +- We can use PostgreSQL's extended output format (`-x`) plus `sed` to format the output into quasi XML: + +``` +$ psql dspacenew -x -c 'select element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id=5 order by element, qualifier;' | sed -r 's:^-\[ RECORD (.*) \]-+$:\n:;s:([^ ]*) +\| (.*): <\1>\2:;s:^$::;1s:\n::' +``` + +- The `sed` script is from a post on the [PostgreSQL mailing list](https://www.postgresql.org/message-id/437E44A5.508%40ultimeth.com) diff --git a/public/2017-07/index.html b/public/2017-07/index.html index 7c198609d..e2de8bc79 100644 --- a/public/2017-07/index.html +++ b/public/2017-07/index.html @@ -19,7 +19,7 @@ Run system updates and reboot DSpace Test - + @@ -57,9 +57,9 @@ Run system updates and reboot DSpace Test "@type": "BlogPosting", "headline": "July, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-07/", - "wordCount": "18", + "wordCount": "93", "datePublished": "2017-07-01T18:03:52+03:00", - "dateModified": "2017-07-01T18:03:19+03:00", + "dateModified": "2017-07-04T08:04:46+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -134,6 +134,15 @@ Run system updates and reboot DSpace Test + +
$ psql dspacenew -x -c 'select element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id=5 order by element, qualifier;' | sed -r 's:^-\[ RECORD (.*) \]-+$:</dc-type>\n<dc-type>:;s:([^ ]*) +\| (.*):  <\1>\2</\1>:;s:^$:</dc-type>:;1s:</dc-type>\n::'
+
+ + diff --git a/public/sitemap.xml b/public/sitemap.xml index 4f2483a53..44a3d2b55 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2017-07/ - 2017-07-01T18:03:19+03:00 + 2017-07-04T08:04:46+03:00 @@ -109,7 +109,7 @@ https://alanorth.github.io/cgspace-notes/ - 2017-07-01T18:03:19+03:00 + 2017-07-04T08:04:46+03:00 0 @@ -120,19 +120,19 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2017-07-01T18:03:19+03:00 + 2017-07-04T08:04:46+03:00 0 https://alanorth.github.io/cgspace-notes/post/ - 2017-07-01T18:03:19+03:00 + 2017-07-04T08:04:46+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2017-07-01T18:03:19+03:00 + 2017-07-04T08:04:46+03:00 0