mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-12-26 23:14:29 +01:00
240 lines
8.6 KiB
HTML
240 lines
8.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" >
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
|
|
<meta property="og:title" content="July, 2024" />
|
|
<meta property="og:description" content="2024-07-01
|
|
|
|
A bit of work to clean up duplicate DOIs on CGSpace
|
|
|
|
A handful of book chapters, working papers, and journal articles using the wrong DOI
|
|
|
|
|
|
I tried to delete all users who have been inactive since six years ago (July 1, 2018):
|
|
" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2024-07/" />
|
|
<meta property="article:published_time" content="2024-07-01T09:37:00+03:00" />
|
|
<meta property="article:modified_time" content="2024-08-22T09:51:08+03:00" />
|
|
|
|
|
|
|
|
<meta name="twitter:card" content="summary"/>
|
|
<meta name="twitter:title" content="July, 2024"/>
|
|
<meta name="twitter:description" content="2024-07-01
|
|
|
|
A bit of work to clean up duplicate DOIs on CGSpace
|
|
|
|
A handful of book chapters, working papers, and journal articles using the wrong DOI
|
|
|
|
|
|
I tried to delete all users who have been inactive since six years ago (July 1, 2018):
|
|
"/>
|
|
<meta name="generator" content="Hugo 0.133.1">
|
|
|
|
|
|
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "BlogPosting",
|
|
"headline": "July, 2024",
|
|
"url": "https://alanorth.github.io/cgspace-notes/2024-07/",
|
|
"wordCount": "277",
|
|
"datePublished": "2024-07-01T09:37:00+03:00",
|
|
"dateModified": "2024-08-22T09:51:08+03:00",
|
|
"author": {
|
|
"@type": "Person",
|
|
"name": "Alan Orth"
|
|
},
|
|
"keywords": "Notes"
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2024-07/">
|
|
|
|
<title>July, 2024 | CGSpace Notes</title>
|
|
|
|
|
|
<!-- combined, minified CSS -->
|
|
|
|
<link href="https://alanorth.github.io/cgspace-notes/css/style.c6ba80bc50669557645abe05f86b73cc5af84408ed20f1551a267bc19ece8228.css" rel="stylesheet" integrity="sha256-xrqAvFBmlVdkWr4F+GtzzFr4RAjtIPFVGiZ7wZ7Ogig=" crossorigin="anonymous">
|
|
|
|
|
|
<!-- minified Font Awesome for SVG icons -->
|
|
|
|
<script defer src="https://alanorth.github.io/cgspace-notes/js/fontawesome.min.f5072c55a0721857184db93a50561d7dc13975b4de2e19db7f81eb5f3fa57270.js" integrity="sha256-9QcsVaByGFcYTbk6UFYdfcE5dbTeLhnbf4HrXz+lcnA=" crossorigin="anonymous"></script>
|
|
|
|
<!-- RSS 2.0 feed -->
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<div class="blog-masthead">
|
|
<div class="container">
|
|
<nav class="nav blog-nav">
|
|
<a class="nav-link " href="https://alanorth.github.io/cgspace-notes/">Home</a>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<header class="blog-header">
|
|
<div class="container">
|
|
<h1 class="blog-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/" rel="home">CGSpace Notes</a></h1>
|
|
<p class="lead blog-description" dir="auto">Documenting day-to-day work on the <a href="https://cgspace.cgiar.org">CGSpace</a> repository.</p>
|
|
</div>
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-8 blog-main">
|
|
|
|
|
|
|
|
|
|
<article class="blog-post">
|
|
<header>
|
|
<h2 class="blog-post-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/2024-07/">July, 2024</a></h2>
|
|
<p class="blog-post-meta">
|
|
<time datetime="2024-07-01T09:37:00+03:00">Mon Jul 01, 2024</time>
|
|
in
|
|
<span class="fas fa-folder" aria-hidden="true"></span> <a href="/categories/notes/" rel="category tag">Notes</a>
|
|
|
|
|
|
</p>
|
|
</header>
|
|
<h2 id="2024-07-01">2024-07-01</h2>
|
|
<ul>
|
|
<li>A bit of work to clean up duplicate DOIs on CGSpace
|
|
<ul>
|
|
<li>A handful of book chapters, working papers, and journal articles using the wrong DOI</li>
|
|
</ul>
|
|
</li>
|
|
<li>I tried to delete all users who have been inactive since six years ago (July 1, 2018):</li>
|
|
</ul>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ dspace dsrun org.dspace.eperson.Groomer -a -b 07/01/2018 -d
|
|
</span></span></code></pre></div><ul>
|
|
<li>File an issue on DSpace GitHub: <a href="https://github.com/DSpace/DSpace/issues/9675">Allow configuring disallowed domains for self registration</a></li>
|
|
</ul>
|
|
<h2 id="2024-07-11">2024-07-11</h2>
|
|
<ul>
|
|
<li>Minor fixes to normalize the IFPRI CONTENTdm URLs in provenance fields:</li>
|
|
</ul>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>dspace=# BEGIN;
|
|
</span></span><span style="display:flex;"><span>BEGIN
|
|
</span></span><span style="display:flex;"><span>dspace=*# UPDATE metadatavalue SET text_value = replace(text_value, 'cdm/ref', 'digital') WHERE text_value LIKE '%CONTENTdm%cdm/ref/%';
|
|
</span></span><span style="display:flex;"><span>UPDATE 1876
|
|
</span></span><span style="display:flex;"><span>dspace=*# UPDATE metadatavalue SET text_value = replace(text_value, 'CONTENTdm: ', 'CONTENTdm: ') WHERE text_value LIKE '%CONTENTdm: %';
|
|
</span></span><span style="display:flex;"><span>UPDATE 21
|
|
</span></span><span style="display:flex;"><span>dspace=*# COMMIT;
|
|
</span></span><span style="display:flex;"><span>COMMIT
|
|
</span></span></code></pre></div><ul>
|
|
<li>Then export a new list of CONTENTdm redirects, excluding withdrawn items:</li>
|
|
</ul>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>dspace= ☘ \COPY (SELECT m.text_value, h.handle FROM metadatavalue m JOIN handle h on m.dspace_object_id = h.resource_id WHERE m.metadata_field_id=28 AND m.text_value LIKE '%URL from IFPRI CONTENTdm%' AND h.resource_type_id=2 AND m.dspace_object_id IN (SELECT uuid FROM item WHERE in_archive AND NOT withdrawn)) to /tmp/ifpri.csv CSV HEADER;
|
|
</span></span><span style="display:flex;"><span>COPY 8568
|
|
</span></span></code></pre></div><ul>
|
|
<li>Similarly, get a list of withdrawn item redirects:</li>
|
|
</ul>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>dspace= ☘ \COPY (SELECT m.text_value AS handle_from, h.handle AS handle_to FROM metadatavalue m JOIN handle h on m.dspace_object_id = h.resource_id WHERE m.metadata_field_id=181 AND h.resource_type_id=2 AND h.resource_id IN (SELECT uuid FROM item WHERE in_archive AND NOT withdrawn)) to /tmp/handle-redirects.csv CSV HEADER;
|
|
</span></span><span style="display:flex;"><span>COPY 396
|
|
</span></span></code></pre></div><h2 id="2024-07-18">2024-07-18</h2>
|
|
<ul>
|
|
<li>I experimented with adding a regular expression to validate DOIs to the submission form
|
|
<ul>
|
|
<li>It is a slightly modified version of the one found here: <a href="https://stackoverflow.com/questions/27910/finding-a-doi-in-a-document-or-page">https://stackoverflow.com/questions/27910/finding-a-doi-in-a-document-or-page</a></li>
|
|
<li>I decided it will probably be confusing to people and will have limited benefit, since we are normalizing most forms of DOIs to our preferred form after submission anyway</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- raw HTML omitted -->
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
</div> <!-- /.blog-main -->
|
|
|
|
<aside class="col-sm-3 ml-auto blog-sidebar">
|
|
|
|
|
|
|
|
<section class="sidebar-module">
|
|
<h4>Recent Posts</h4>
|
|
<ol class="list-unstyled">
|
|
|
|
|
|
<li><a href="/cgspace-notes/2024-09/">September, 2024</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2024-08/">August, 2024</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2024-07/">July, 2024</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2024-06/">June, 2024</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2024-05/">May, 2024</a></li>
|
|
|
|
</ol>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="sidebar-module">
|
|
<h4>Links</h4>
|
|
<ol class="list-unstyled">
|
|
|
|
<li><a href="https://cgspace.cgiar.org">CGSpace</a></li>
|
|
|
|
<li><a href="https://dspacetest.cgiar.org">DSpace Test</a></li>
|
|
|
|
<li><a href="https://github.com/ilri/DSpace">CGSpace @ GitHub</a></li>
|
|
|
|
</ol>
|
|
</section>
|
|
|
|
</aside>
|
|
|
|
|
|
</div> <!-- /.row -->
|
|
</div> <!-- /.container -->
|
|
|
|
|
|
|
|
<footer class="blog-footer">
|
|
<p dir="auto">
|
|
|
|
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
|
|
|
|
</p>
|
|
<p>
|
|
<a href="#">Back to top</a>
|
|
</p>
|
|
</footer>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|