mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-22 22:55:04 +01:00
341 lines
15 KiB
HTML
341 lines
15 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="November, 2022" />
|
||
<meta property="og:description" content="2022-11-01
|
||
|
||
Last night I re-synced DSpace 7 Test from CGSpace
|
||
|
||
I also updated all my local 7_x-dev branches on the latest upstreams
|
||
|
||
|
||
I spent some time updating the authorizations in Alliance collections
|
||
|
||
I want to make sure they use groups instead of individuals where possible!
|
||
|
||
|
||
I reverted the Cocoon autosave change because it was more of a nuissance that Peter can’t upload CSVs from the web interface and is a very low severity security issue
|
||
" />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2022-11/" />
|
||
<meta property="article:published_time" content="2022-11-01T09:11:36+03:00" />
|
||
<meta property="article:modified_time" content="2022-11-01T22:12:24+03:00" />
|
||
|
||
|
||
|
||
<meta name="twitter:card" content="summary"/>
|
||
<meta name="twitter:title" content="November, 2022"/>
|
||
<meta name="twitter:description" content="2022-11-01
|
||
|
||
Last night I re-synced DSpace 7 Test from CGSpace
|
||
|
||
I also updated all my local 7_x-dev branches on the latest upstreams
|
||
|
||
|
||
I spent some time updating the authorizations in Alliance collections
|
||
|
||
I want to make sure they use groups instead of individuals where possible!
|
||
|
||
|
||
I reverted the Cocoon autosave change because it was more of a nuissance that Peter can’t upload CSVs from the web interface and is a very low severity security issue
|
||
"/>
|
||
<meta name="generator" content="Hugo 0.105.0">
|
||
|
||
|
||
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "http://schema.org",
|
||
"@type": "BlogPosting",
|
||
"headline": "November, 2022",
|
||
"url": "https://alanorth.github.io/cgspace-notes/2022-11/",
|
||
"wordCount": "863",
|
||
"datePublished": "2022-11-01T09:11:36+03:00",
|
||
"dateModified": "2022-11-01T22:12:24+03:00",
|
||
"author": {
|
||
"@type": "Person",
|
||
"name": "Alan Orth"
|
||
},
|
||
"keywords": "Notes"
|
||
}
|
||
</script>
|
||
|
||
|
||
|
||
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2022-11/">
|
||
|
||
<title>November, 2022 | 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/2022-11/">November, 2022</a></h2>
|
||
<p class="blog-post-meta">
|
||
<time datetime="2022-11-01T09:11:36+03:00">Tue Nov 01, 2022</time>
|
||
in
|
||
<span class="fas fa-folder" aria-hidden="true"></span> <a href="/categories/notes/" rel="category tag">Notes</a>
|
||
|
||
|
||
</p>
|
||
</header>
|
||
<h2 id="2022-11-01">2022-11-01</h2>
|
||
<ul>
|
||
<li>Last night I re-synced DSpace 7 Test from CGSpace
|
||
<ul>
|
||
<li>I also updated all my local <code>7_x-dev</code> branches on the latest upstreams</li>
|
||
</ul>
|
||
</li>
|
||
<li>I spent some time updating the authorizations in Alliance collections
|
||
<ul>
|
||
<li>I want to make sure they use groups instead of individuals where possible!</li>
|
||
</ul>
|
||
</li>
|
||
<li>I reverted the Cocoon autosave change because it was more of a nuissance that Peter can’t upload CSVs from the web interface and is a very low severity security issue</li>
|
||
</ul>
|
||
<ul>
|
||
<li>I ran FixLowQualityThumbnails from cgspace-java-helpers on some large collections on CGSpace and ended up fixing 194 items!</li>
|
||
<li>I did some minor checking and uploaded twenty-four IFPRI outputs for the Initiatives to DSpace Test</li>
|
||
<li>Tim merged my <a href="https://github.com/DSpace/DSpace/pull/8553">pull request to override the ImageMagick PDF density in DSpace 7</a>
|
||
<ul>
|
||
<li>I ported it to DSpace 6.x and submitted a pull request: <a href="https://github.com/DSpace/DSpace/pull/8560">https://github.com/DSpace/DSpace/pull/8560</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<h2 id="2022-11-02">2022-11-02</h2>
|
||
<ul>
|
||
<li>I joined the FAO–CGIAR AGROVOC results sharing meeting
|
||
<ul>
|
||
<li>From June to October, 2022 we suggested 39 new keywords, added 27 to AGROVOC, 4 rejected, and 9 still under discussion</li>
|
||
</ul>
|
||
</li>
|
||
<li>Doing duplicate check on IFPRI’s batch upload and I found one duplicate uploaded by IWMI earlier this year
|
||
<ul>
|
||
<li>I will update the metadata of that item and map it to the correct Initiative collection</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<h2 id="2022-11-03">2022-11-03</h2>
|
||
<ul>
|
||
<li>I added countries to the twenty-three IFPRI items in OpenRefine based on their titles and abstracts (using the Jython trick I learned a few months ago), then added regions using csv-metadata-quality, and uploaded them to CGSpace</li>
|
||
<li>I exported a list of collections from CGSpace so I can run the thumbnail fixes on each, as we seem to have issues when doing it on (some) large communities like the CRP community:</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>localhost/dspace= ☘ \COPY (SELECT ds6_collection2collectionhandle(uuid) AS collection FROM collection) to /tmp/collections.txt
|
||
</span></span><span style="display:flex;"><span>COPY 1268
|
||
</span></span></code></pre></div><ul>
|
||
<li>Then I started a test run on DSpace Test:</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>$ <span style="color:#66d9ef">while</span> read -r collection; <span style="color:#66d9ef">do</span> chrt -b <span style="color:#ae81ff">0</span> dspace dsrun io.github.ilri.cgspace.scripts.FixLowQualityThumbnails $collection | tee -a /tmp/FixLowQualityThumbnails.log; <span style="color:#66d9ef">done</span> < /tmp/collections.txt
|
||
</span></span></code></pre></div><ul>
|
||
<li>I’ll be curious to check the log after it’s all done.
|
||
<ul>
|
||
<li>After a few hours I see:</li>
|
||
</ul>
|
||
</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>$ grep -c <span style="color:#e6db74">'Action: remove'</span> /tmp/FixLowQualityThumbnails.log
|
||
</span></span><span style="display:flex;"><span>626
|
||
</span></span></code></pre></div><ul>
|
||
<li>Not bad, because last week I did a more manual selection of collections and deleted ~200
|
||
<ul>
|
||
<li>I will replicate this on CGSpace soon, and also try the FixJpgJpgThumbnails tool</li>
|
||
</ul>
|
||
</li>
|
||
<li>I see that the CIAT Library is still up, so I should really grab all the PDFs before they shut that old server down
|
||
<ul>
|
||
<li>Export a list of items with PDFs linked there:</li>
|
||
</ul>
|
||
</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>localhost/dspacetest= ☘ \COPY (SELECT dspace_object_id,text_value FROM metadatavalue WHERE metadata_field_id=219 AND text_value LIKE '%ciat-library%') to /tmp/ciat-library-items.csv;
|
||
</span></span><span style="display:flex;"><span>COPY 4621
|
||
</span></span></code></pre></div><ul>
|
||
<li>After stripping the page numbers off I see there are only about 2,700 unique files, and we have to filter the dead JSPUI ones…</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>$ csvcut -c url 2022-11-03-CIAT-Library-items.csv | sed 1d | grep -v jspui | sort -u | wc -l
|
||
</span></span><span style="display:flex;"><span>2752
|
||
</span></span></code></pre></div><ul>
|
||
<li>I’m not sure how we’ll handle the duplicates because many items are book chapters or something where they share a PDF</li>
|
||
</ul>
|
||
<h2 id="2022-11-04">2022-11-04</h2>
|
||
<ul>
|
||
<li>I decided to check for old pre-ImageMagick thumbnails on CGSpace by finding any bitstreams with the description “Generated Thumbnail”:</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>localhost/dspacetest= ☘ \COPY (SELECT ds6_bitstream2itemhandle(dspace_object_id) FROM metadatavalue WHERE dspace_object_id in (SELECT dspace_object_id FROM item) AND text_value='Generated Thumbnail') to /tmp/old-thumbnails.txt;
|
||
</span></span><span style="display:flex;"><span>COPY 1147
|
||
</span></span><span style="display:flex;"><span>$ grep -v <span style="color:#e6db74">'\\N'</span> /tmp/old-thumbnails.txt > /tmp/old-thumbnail-handles.txt
|
||
</span></span><span style="display:flex;"><span>$ wc -l /tmp/old-thumbnail-handles.txt
|
||
</span></span><span style="display:flex;"><span>987 /tmp/old-thumbnail-handles.txt
|
||
</span></span></code></pre></div><ul>
|
||
<li>A bunch of these have <code>\N</code> for some reason when I use the <code>ds6_bitstream2itemhandle</code> function to get their handles so I had to exclude those…
|
||
<ul>
|
||
<li>I forced the media-filter for these items on CGSpace:</li>
|
||
</ul>
|
||
</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>$ <span style="color:#66d9ef">while</span> read -r handle; <span style="color:#66d9ef">do</span> JAVA_OPTS<span style="color:#f92672">=</span><span style="color:#e6db74">"-Xmx512m -Dfile.encoding=UTF-8"</span> dspace filter-media -p <span style="color:#e6db74">"ImageMagick PDF Thumbnail"</span> -i $handle -f -v; <span style="color:#66d9ef">done</span> < /tmp/old-thumbnail-handles.txt
|
||
</span></span></code></pre></div><ul>
|
||
<li>Upload some batch records via CSV for Peter</li>
|
||
<li>Update the about page on CGSpace with new text from Peter</li>
|
||
<li>Add a few more ORCID identifiers and names to my growing file <code>2022-09-22-add-orcids.csv</code>
|
||
<ul>
|
||
<li>I tagged fifty-four new authors using this list</li>
|
||
</ul>
|
||
</li>
|
||
<li>I deleted and mapped one duplicate item for Maria Garruccio</li>
|
||
<li>I updated the CG Core website from Bootstrap v4.6 to v5.2</li>
|
||
</ul>
|
||
<h2 id="2022-11-07">2022-11-07</h2>
|
||
<ul>
|
||
<li>I did a harvest on AReS last night but it seems that MELSpace’s sitemap is broken again because we have 10,000 fewer records</li>
|
||
<li>I filed <a href="https://github.com/ecrmnn/iso-3166-1/issues/10">an issue</a> on the iso-3166-1 npm package to update the name of Turkey to Türkiye
|
||
<ul>
|
||
<li>I also filed <a href="https://github.com/flyingcircusio/pycountry/issues/148">an issue</a> and <a href="https://github.com/flyingcircusio/pycountry/pull/149">a pull request</a> on the pycountry package</li>
|
||
<li>I also filed <a href="https://github.com/konstantinstadler/country_converter/issues/121">an issue</a> and <a href="https://github.com/konstantinstadler/country_converter/pull/122">a pull request</a> on the country-converter package</li>
|
||
<li>I also changed one item on CGSpace that had been submitted since the name was changed</li>
|
||
<li>I also imported the new iso-codes 4.12.0 into cgspace-java-helpers</li>
|
||
<li>I also updated it in the DSpace <code>input-forms.xml</code></li>
|
||
<li>I also forked the iso-3166-1 package from npm and updated Swaziland, Macedonia, and Turkey in my fork
|
||
<ul>
|
||
<li>I submitted a <a href="https://github.com/ecrmnn/iso-3166-1/pull/11">pull request</a> to update this upstream</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>Since I was making all these pull requests I also made <a href="https://github.com/konstantinstadler/country_converter/pull/123">one on country-converter for the UN M.49 region “South-eastern Asia”</a></li>
|
||
<li>Port the <a href="https://github.com/DSpace/DSpace/pull/8550">ImageMagick PDF cropbox fix</a> to DSpace 6.x
|
||
<ul>
|
||
<li>I deployed it on CGSpace, ran all updates, and rebooted the host</li>
|
||
<li>I ran the filter-media script on one large collection where many of these PDFs with cropbox issues exist:</li>
|
||
</ul>
|
||
</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>$ JAVA_OPTS<span style="color:#f92672">=</span><span style="color:#e6db74">"-Xmx1024m -Dfile.encoding=UTF-8"</span> dspace filter-media -p <span style="color:#e6db74">"ImageMagick PDF Thumbnail"</span> -v -f -i 10568/78 >& /tmp/filter-media-cropbox.log
|
||
</span></span></code></pre></div><ul>
|
||
<li>But looking at the items it processed, I’m not sure it’s working as expected</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/2022-11/">November, 2022</a></li>
|
||
|
||
<li><a href="/cgspace-notes/2022-10/">October, 2022</a></li>
|
||
|
||
<li><a href="/cgspace-notes/2022-09/">September, 2022</a></li>
|
||
|
||
<li><a href="/cgspace-notes/2022-08/">August, 2022</a></li>
|
||
|
||
<li><a href="/cgspace-notes/2022-07/">July, 2022</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>
|