mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Update theme and regenerate public
This commit is contained in:
@ -2,35 +2,33 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Alan Orth">
|
||||
<meta property="og:title" content="Posts" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/post/" />
|
||||
|
||||
|
||||
<meta property="og:updated_time" content="2016-11-01T09:21:00+03:00"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- OpenGraph Metadata: http://ogp.me/ -->
|
||||
<meta property="og:title" content="Posts">
|
||||
<meta property="og:description" content="">
|
||||
|
||||
|
||||
<meta property="og:type" content="blog">
|
||||
|
||||
<meta itemprop="name" content="Posts">
|
||||
<meta itemprop="description" content="">
|
||||
|
||||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/post/">
|
||||
|
||||
<!-- Metadata for Twitter: https://dev.twitter.com/cards/markup -->
|
||||
|
||||
<meta property="twitter:card" content="summary">
|
||||
|
||||
|
||||
<meta property="twitter:title" content="Posts">
|
||||
<meta property="twitter:description" content="">
|
||||
|
||||
|
||||
|
||||
@ -49,8 +47,15 @@
|
||||
<!-- combined, minified CSS -->
|
||||
<link href="https://alanorth.github.io/cgspace-notes/css/style.css" rel="stylesheet">
|
||||
|
||||
|
||||
<!-- RSS 2.0 feed -->
|
||||
<link href="https://alanorth.github.io/cgspace-notes/index.xml" type="application/rss+xml" rel="alternate">
|
||||
<link href="https://alanorth.github.io/cgspace-notes/post/index.xml" rel="alternate" type="application/rss+xml" title="CGSpace Notes" />
|
||||
<link href="https://alanorth.github.io/cgspace-notes/post/index.xml" rel="feed" type="application/rss+xml" title="CGSpace Notes" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -79,7 +84,9 @@
|
||||
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-11/">November, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-11-01T09:21:00+03:00">Tue Nov 01, 2016</time> by Alan Orth in
|
||||
@ -93,7 +100,9 @@
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-10/">October, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-10-03T15:53:00+03:00">Mon Oct 03, 2016</time> by Alan Orth in
|
||||
@ -107,7 +116,9 @@
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-09/">September, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-09-01T15:53:00+03:00">Thu Sep 01, 2016</time> by Alan Orth in
|
||||
@ -133,7 +144,9 @@
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-08/">August, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-08-01T15:53:00+03:00">Mon Aug 01, 2016</time> by Alan Orth in
|
||||
@ -163,7 +176,9 @@ $ git rebase -i dspace-5.5
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-07/">July, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-07-01T10:53:00+03:00">Fri Jul 01, 2016</time> by Alan Orth in
|
||||
@ -196,7 +211,9 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-06/">June, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-06-01T10:53:00+03:00">Wed Jun 01, 2016</time> by Alan Orth in
|
||||
@ -221,7 +238,9 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-05/">May, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-05-01T23:06:00+03:00">Sun May 01, 2016</time> by Alan Orth in
|
||||
@ -247,7 +266,9 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-04/">April, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-04-04T11:06:00+03:00">Mon Apr 04, 2016</time> by Alan Orth in
|
||||
@ -271,7 +292,9 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-03/">March, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-03-02T16:50:00+03:00">Wed Mar 02, 2016</time> by Alan Orth in
|
||||
@ -293,7 +316,9 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-02/">February, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-02-05T13:18:00+03:00">Fri Feb 05, 2016</time> by Alan Orth in
|
||||
@ -323,6 +348,7 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
|
||||
|
||||
|
||||
|
||||
<nav class="blog-pagination">
|
||||
|
||||
|
||||
@ -331,12 +357,12 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
<a class="btn btn-outline-primary" href="/post/page/2/" role="button">Next page</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div> <!-- /.blog-main -->
|
||||
|
||||
|
||||
<aside class="col-sm-3 offset-sm-1 blog-sidebar">
|
||||
<aside class="col-sm-3 offset-sm-1 blog-sidebar">
|
||||
|
||||
|
||||
|
||||
@ -374,7 +400,6 @@ dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
</div> <!-- /.row -->
|
||||
</div> <!-- /.container -->
|
||||
|
@ -213,7 +213,7 @@ dspace=# select count(text_value) from metadatavalue where resource_type_id=2 an
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Generate a list of all these so I can fix them in batch:</li>
|
||||
<li>Generate a list of all these so I can maybe fix them in batch:</li>
|
||||
</ul>
|
||||
|
||||
<pre><code>dspace=# \copy (select distinct text_lang, count(*) from metadatavalue where resource_type_id=2 group by text_lang order by count desc) to /tmp/text-langs.csv with csv;
|
||||
@ -227,6 +227,38 @@ COPY 14
|
||||
<pre><code>dspace=# update metadatavalue set text_lang='en_US' where resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS';
|
||||
UPDATE 85
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>The <code>fix-metadata.py</code> script I have is meant for specific metadata values, so if I want to update some <code>text_lang</code> values I should just do it directly in the database</li>
|
||||
<li>For example, on a limited set:</li>
|
||||
</ul>
|
||||
|
||||
<pre><code>dspace=# update metadatavalue set text_lang=NULL where resource_type_id=2 and metadata_field_id=203 and text_value='LIVESTOCK' and text_lang='';
|
||||
UPDATE 420
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>And assuming I want to do it for all fields:</li>
|
||||
</ul>
|
||||
|
||||
<pre><code>dspacetest=# update metadatavalue set text_lang=NULL where resource_type_id=2 and text_lang='';
|
||||
UPDATE 183726
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>After that restarted Tomcat and PostgreSQL (because I&rsquo;m superstitious about caches) and now I see the following in REST API query:</li>
|
||||
</ul>
|
||||
|
||||
<pre><code>$ curl -s -H &quot;accept: application/json&quot; -H &quot;Content-Type: application/json&quot; -X POST &quot;http://localhost:8080/rest/items/find-by-metadata-field&quot; -d '{&quot;key&quot;: &quot;cg.subject.ilri&quot;,&quot;value&quot;: &quot;SEEDS&quot;}' | jq length
|
||||
71
|
||||
$ curl -s -H &quot;accept: application/json&quot; -H &quot;Content-Type: application/json&quot; -X POST &quot;http://localhost:8080/rest/items/find-by-metadata-field&quot; -d '{&quot;key&quot;: &quot;cg.subject.ilri&quot;,&quot;value&quot;: &quot;SEEDS&quot;, &quot;language&quot;:&quot;&quot;}' | jq length
|
||||
0
|
||||
$ curl -s -H &quot;accept: application/json&quot; -H &quot;Content-Type: application/json&quot; -X POST &quot;http://localhost:8080/rest/items/find-by-metadata-field&quot; -d '{&quot;key&quot;: &quot;cg.subject.ilri&quot;,&quot;value&quot;: &quot;SEEDS&quot;, &quot;language&quot;:&quot;en_US&quot;}' | jq length
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Not sure what&rsquo;s going on, but Discovery shows 83 values, and database shows 85, so I&rsquo;m going to reindex Discovery just in case</li>
|
||||
</ul>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
@ -2,35 +2,33 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Alan Orth">
|
||||
<meta property="og:title" content="Posts" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/post/" />
|
||||
|
||||
|
||||
<meta property="og:updated_time" content="2016-01-13T13:18:00+03:00"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- OpenGraph Metadata: http://ogp.me/ -->
|
||||
<meta property="og:title" content="Posts">
|
||||
<meta property="og:description" content="">
|
||||
|
||||
|
||||
<meta property="og:type" content="blog">
|
||||
|
||||
<meta itemprop="name" content="Posts">
|
||||
<meta itemprop="description" content="">
|
||||
|
||||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/post/">
|
||||
|
||||
<!-- Metadata for Twitter: https://dev.twitter.com/cards/markup -->
|
||||
|
||||
<meta property="twitter:card" content="summary">
|
||||
|
||||
|
||||
<meta property="twitter:title" content="Posts">
|
||||
<meta property="twitter:description" content="">
|
||||
|
||||
|
||||
|
||||
@ -49,8 +47,15 @@
|
||||
<!-- combined, minified CSS -->
|
||||
<link href="https://alanorth.github.io/cgspace-notes/css/style.css" rel="stylesheet">
|
||||
|
||||
|
||||
<!-- RSS 2.0 feed -->
|
||||
<link href="https://alanorth.github.io/cgspace-notes/index.xml" type="application/rss+xml" rel="alternate">
|
||||
<link href="https://alanorth.github.io/cgspace-notes/post/index.xml" rel="alternate" type="application/rss+xml" title="CGSpace Notes" />
|
||||
<link href="https://alanorth.github.io/cgspace-notes/post/index.xml" rel="feed" type="application/rss+xml" title="CGSpace Notes" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -79,7 +84,9 @@
|
||||
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2016-01/">January, 2016</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2016-01-13T13:18:00+03:00">Wed Jan 13, 2016</time> by Alan Orth in
|
||||
@ -101,7 +108,9 @@
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2015-12/">December, 2015</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2015-12-02T13:18:00+03:00">Wed Dec 02, 2015</time> by Alan Orth in
|
||||
@ -128,7 +137,9 @@
|
||||
</article>
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2015-11/">November, 2015</a></h2>
|
||||
<p class="blog-post-meta"><time datetime="2015-11-23T17:00:57+03:00">Mon Nov 23, 2015</time> by Alan Orth in
|
||||
@ -155,6 +166,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<nav class="blog-pagination">
|
||||
|
||||
|
||||
@ -163,12 +175,12 @@
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div> <!-- /.blog-main -->
|
||||
|
||||
|
||||
<aside class="col-sm-3 offset-sm-1 blog-sidebar">
|
||||
<aside class="col-sm-3 offset-sm-1 blog-sidebar">
|
||||
|
||||
|
||||
|
||||
@ -206,7 +218,6 @@
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
</div> <!-- /.row -->
|
||||
</div> <!-- /.container -->
|
||||
|
Reference in New Issue
Block a user