From dac05748eb697976672f0acbce13e458bac20c78 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 7 Nov 2016 16:46:42 +0200 Subject: [PATCH] Update notes for 2016-11-07 --- content/post/2016-11.md | 24 ++++++++++++++++++++++++ public/2016-11/index.html | 29 +++++++++++++++++++++++++++++ public/index.xml | 29 +++++++++++++++++++++++++++++ public/post/index.xml | 29 +++++++++++++++++++++++++++++ public/tags/notes/index.xml | 29 +++++++++++++++++++++++++++++ 5 files changed, 140 insertions(+) diff --git a/content/post/2016-11.md b/content/post/2016-11.md index 1d9b8820e..a91a46afa 100644 --- a/content/post/2016-11.md +++ b/content/post/2016-11.md @@ -53,3 +53,27 @@ java.lang.NullPointerException ## 2016-11-06 - After re-deploying and re-indexing I didn't see the same issue, and the indexing completed in 85 minutes, which is about how long it is supposed to take + +## 2016-11-07 + +- Horrible one liner to get Linode ID from certain Ansible host vars: + +``` +$ grep -A 3 contact_info * | grep -E "(Orth|Sisay|Peter|Daniel|Tsega)" | awk -F'-' '{print $1}' | grep linode | uniq | xargs grep linode_id +``` + +- I noticed some weird CRPs in the database, and they don't show up in Discovery for some reason, perhaps the `:` +- I'll export these and fix them in batch: + +``` +dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=230 group by text_value order by count desc) to /tmp/crp.csv with csv; +COPY 22 +``` + +- Test running the replacements: + +``` +$ ./fix-metadata-values.py -i /tmp/CRPs.csv -f cg.contributor.crp -t correct -m 230 -d dspace -u dspace -p 'fuuu' +``` + +- Add `AMR` to ILRI subjects and remove one duplicate instance of IITA in author affiliations controlled vocabulary ([#288](https://github.com/ilri/DSpace/pull/288)) diff --git a/public/2016-11/index.html b/public/2016-11/index.html index 786f679dd..270f2ce87 100644 --- a/public/2016-11/index.html +++ b/public/2016-11/index.html @@ -147,6 +147,35 @@ java.lang.NullPointerException
  • After re-deploying and re-indexing I didn’t see the same issue, and the indexing completed in 85 minutes, which is about how long it is supposed to take
  • +

    2016-11-07

    + + + +
    $ grep -A 3 contact_info * | grep -E "(Orth|Sisay|Peter|Daniel|Tsega)" | awk -F'-' '{print $1}' | grep linode | uniq | xargs grep linode_id
    +
    + + + +
    dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=230 group by text_value order by count desc) to /tmp/crp.csv with csv;
    +COPY 22
    +
    + + + +
    $ ./fix-metadata-values.py -i /tmp/CRPs.csv -f cg.contributor.crp -t correct -m 230 -d dspace -u dspace -p 'fuuu'
    +
    + + + diff --git a/public/index.xml b/public/index.xml index e7dd41113..d87bae579 100644 --- a/public/index.xml +++ b/public/index.xml @@ -73,6 +73,35 @@ java.lang.NullPointerException <ul> <li>After re-deploying and re-indexing I didn&rsquo;t see the same issue, and the indexing completed in 85 minutes, which is about how long it is supposed to take</li> </ul> + +<h2 id="2016-11-07">2016-11-07</h2> + +<ul> +<li>Horrible one liner to get Linode ID from certain Ansible host vars:</li> +</ul> + +<pre><code>$ grep -A 3 contact_info * | grep -E &quot;(Orth|Sisay|Peter|Daniel|Tsega)&quot; | awk -F'-' '{print $1}' | grep linode | uniq | xargs grep linode_id +</code></pre> + +<ul> +<li>I noticed some weird CRPs in the database, and they don&rsquo;t show up in Discovery for some reason, perhaps the <code>:</code></li> +<li>I&rsquo;ll export these and fix them in batch:</li> +</ul> + +<pre><code>dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=230 group by text_value order by count desc) to /tmp/crp.csv with csv; +COPY 22 +</code></pre> + +<ul> +<li>Test running the replacements:</li> +</ul> + +<pre><code>$ ./fix-metadata-values.py -i /tmp/CRPs.csv -f cg.contributor.crp -t correct -m 230 -d dspace -u dspace -p 'fuuu' +</code></pre> + +<ul> +<li>Add <code>AMR</code> to ILRI subjects and remove one duplicate instance of IITA in author affiliations controlled vocabulary (<a href="https://github.com/ilri/DSpace/pull/288">#288</a>)</li> +</ul> diff --git a/public/post/index.xml b/public/post/index.xml index 79f1bc2d9..15e63bfdc 100644 --- a/public/post/index.xml +++ b/public/post/index.xml @@ -73,6 +73,35 @@ java.lang.NullPointerException <ul> <li>After re-deploying and re-indexing I didn&rsquo;t see the same issue, and the indexing completed in 85 minutes, which is about how long it is supposed to take</li> </ul> + +<h2 id="2016-11-07">2016-11-07</h2> + +<ul> +<li>Horrible one liner to get Linode ID from certain Ansible host vars:</li> +</ul> + +<pre><code>$ grep -A 3 contact_info * | grep -E &quot;(Orth|Sisay|Peter|Daniel|Tsega)&quot; | awk -F'-' '{print $1}' | grep linode | uniq | xargs grep linode_id +</code></pre> + +<ul> +<li>I noticed some weird CRPs in the database, and they don&rsquo;t show up in Discovery for some reason, perhaps the <code>:</code></li> +<li>I&rsquo;ll export these and fix them in batch:</li> +</ul> + +<pre><code>dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=230 group by text_value order by count desc) to /tmp/crp.csv with csv; +COPY 22 +</code></pre> + +<ul> +<li>Test running the replacements:</li> +</ul> + +<pre><code>$ ./fix-metadata-values.py -i /tmp/CRPs.csv -f cg.contributor.crp -t correct -m 230 -d dspace -u dspace -p 'fuuu' +</code></pre> + +<ul> +<li>Add <code>AMR</code> to ILRI subjects and remove one duplicate instance of IITA in author affiliations controlled vocabulary (<a href="https://github.com/ilri/DSpace/pull/288">#288</a>)</li> +</ul> diff --git a/public/tags/notes/index.xml b/public/tags/notes/index.xml index f451dff8d..8bec6ee9e 100644 --- a/public/tags/notes/index.xml +++ b/public/tags/notes/index.xml @@ -72,6 +72,35 @@ java.lang.NullPointerException <ul> <li>After re-deploying and re-indexing I didn&rsquo;t see the same issue, and the indexing completed in 85 minutes, which is about how long it is supposed to take</li> </ul> + +<h2 id="2016-11-07">2016-11-07</h2> + +<ul> +<li>Horrible one liner to get Linode ID from certain Ansible host vars:</li> +</ul> + +<pre><code>$ grep -A 3 contact_info * | grep -E &quot;(Orth|Sisay|Peter|Daniel|Tsega)&quot; | awk -F'-' '{print $1}' | grep linode | uniq | xargs grep linode_id +</code></pre> + +<ul> +<li>I noticed some weird CRPs in the database, and they don&rsquo;t show up in Discovery for some reason, perhaps the <code>:</code></li> +<li>I&rsquo;ll export these and fix them in batch:</li> +</ul> + +<pre><code>dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=230 group by text_value order by count desc) to /tmp/crp.csv with csv; +COPY 22 +</code></pre> + +<ul> +<li>Test running the replacements:</li> +</ul> + +<pre><code>$ ./fix-metadata-values.py -i /tmp/CRPs.csv -f cg.contributor.crp -t correct -m 230 -d dspace -u dspace -p 'fuuu' +</code></pre> + +<ul> +<li>Add <code>AMR</code> to ILRI subjects and remove one duplicate instance of IITA in author affiliations controlled vocabulary (<a href="https://github.com/ilri/DSpace/pull/288">#288</a>)</li> +</ul>