mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Add notes for 2022-03-04
This commit is contained in:
@ -34,7 +34,7 @@ There are 3,000 IPs accessing the REST API in a 24-hour period!
|
||||
# awk '{print $1}' /var/log/nginx/rest.log | uniq | wc -l
|
||||
3168
|
||||
"/>
|
||||
<meta name="generator" content="Hugo 0.92.2" />
|
||||
<meta name="generator" content="Hugo 0.93.1" />
|
||||
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ There are 3,000 IPs accessing the REST API in a 24-hour period!
|
||||
<li>I have blocked access to the API now</li>
|
||||
<li>There are 3,000 IPs accessing the REST API in a 24-hour period!</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code># awk '{print $1}' /var/log/nginx/rest.log | uniq | wc -l
|
||||
<pre tabindex="0"><code># awk '{print $1}' /var/log/nginx/rest.log | uniq | wc -l
|
||||
3168
|
||||
</code></pre><ul>
|
||||
<li>The two most often requesters are in Ethiopia and Colombia: 213.55.99.121 and 181.118.144.29</li>
|
||||
@ -166,8 +166,8 @@ LE_RESULT=$?
|
||||
|
||||
$SERVICE_BIN nginx start
|
||||
|
||||
if [[ "$LE_RESULT" != 0 ]]; then
|
||||
echo 'Automated renewal failed:'
|
||||
if [[ "$LE_RESULT" != 0 ]]; then
|
||||
echo 'Automated renewal failed:'
|
||||
|
||||
cat /var/log/letsencrypt/renew.log
|
||||
|
||||
@ -240,7 +240,7 @@ fi
|
||||
</li>
|
||||
<li>Found ~200 messed up CIAT values in <code>dc.publisher</code>:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code># select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=39 and text_value similar to "% %";
|
||||
<pre tabindex="0"><code># select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=39 and text_value similar to "% %";
|
||||
</code></pre><h2 id="2016-05-13">2016-05-13</h2>
|
||||
<ul>
|
||||
<li>More theorizing about CGcore</li>
|
||||
@ -259,7 +259,7 @@ fi
|
||||
<li>They have thumbnails on Flickr and elsewhere</li>
|
||||
<li>In OpenRefine I created a new <code>filename</code> column based on the <code>thumbnail</code> column with the following GREL:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>if(cells['thumbnails'].value.contains('hqdefault'), cells['thumbnails'].value.split('/')[-2] + '.jpg', cells['thumbnails'].value.split('/')[-1])
|
||||
<pre tabindex="0"><code>if(cells['thumbnails'].value.contains('hqdefault'), cells['thumbnails'].value.split('/')[-2] + '.jpg', cells['thumbnails'].value.split('/')[-1])
|
||||
</code></pre><ul>
|
||||
<li>Because ~400 records had the same filename on Flickr (hqdefault.jpg) but different UUIDs in the URL</li>
|
||||
<li>So for the <code>hqdefault.jpg</code> ones I just take the UUID (-2) and use it as the filename</li>
|
||||
@ -269,7 +269,7 @@ fi
|
||||
<ul>
|
||||
<li>More quality control on <code>filename</code> field of CCAFS records to make processing in shell and SAFBuilder more reliable:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>value.replace('_','').replace('-','')
|
||||
<pre tabindex="0"><code>value.replace('_','').replace('-','')
|
||||
</code></pre><ul>
|
||||
<li>We need to hold off on moving <code>dc.Species</code> to <code>cg.species</code> because it is only used for plants, and might be better to move it to something like <code>cg.species.plant</code></li>
|
||||
<li>And <code>dc.identifier.fund</code> is MOSTLY used for CPWF project identifier but has some other sponsorship things
|
||||
@ -281,17 +281,17 @@ fi
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code># select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=75 and (text_value like 'PN%' or text_value like 'PHASE%' or text_value = 'CBA' or text_value = 'IA');
|
||||
<pre tabindex="0"><code># select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=75 and (text_value like 'PN%' or text_value like 'PHASE%' or text_value = 'CBA' or text_value = 'IA');
|
||||
</code></pre><h2 id="2016-05-20">2016-05-20</h2>
|
||||
<ul>
|
||||
<li>More work on CCAFS Video and Images records</li>
|
||||
<li>For SAFBuilder we need to modify filename column to have the thumbnail bundle:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>value + "__bundle:THUMBNAIL"
|
||||
<pre tabindex="0"><code>value + "__bundle:THUMBNAIL"
|
||||
</code></pre><ul>
|
||||
<li>Also, I fixed some weird characters using OpenRefine’s transform with the following GREL:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>value.replace(/\u0081/,'')
|
||||
<pre tabindex="0"><code>value.replace(/\u0081/,'')
|
||||
</code></pre><ul>
|
||||
<li>Write shell script to resize thumbnails with height larger than 400: <a href="https://gist.github.com/alanorth/131401dcd39d00e0ce12e1be3ed13256">https://gist.github.com/alanorth/131401dcd39d00e0ce12e1be3ed13256</a></li>
|
||||
<li>Upload 707 CCAFS records to DSpace Test</li>
|
||||
@ -314,7 +314,7 @@ $ /home/dspacetest.cgiar.org/bin/dspace export -t COLLECTION -i 10568/79355 -d ~
|
||||
</code></pre><ul>
|
||||
<li>And then import to CGSpace:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>$ JAVA_OPTS="-Xmx512m -Dfile.encoding=UTF-8" /home/cgspace.cgiar.org/bin/dspace import --add --eperson=aorth@mjanja.ch --collection=10568/70974 --source /tmp/ccafs-images --mapfile=/tmp/ccafs-images-may30.map &> /tmp/ccafs-images-may30.log
|
||||
<pre tabindex="0"><code>$ JAVA_OPTS="-Xmx512m -Dfile.encoding=UTF-8" /home/cgspace.cgiar.org/bin/dspace import --add --eperson=aorth@mjanja.ch --collection=10568/70974 --source /tmp/ccafs-images --mapfile=/tmp/ccafs-images-may30.map &> /tmp/ccafs-images-may30.log
|
||||
</code></pre><ul>
|
||||
<li>But now we have double authors for “CGIAR Research Program on Climate Change, Agriculture and Food Security” in the authority</li>
|
||||
<li>I’m trying to do a Discovery index before messing with the authority index</li>
|
||||
@ -322,12 +322,12 @@ $ /home/dspacetest.cgiar.org/bin/dspace export -t COLLECTION -i 10568/79355 -d ~
|
||||
<li>Run system updates on DSpace Test, re-deploy code, and reboot the server</li>
|
||||
<li>Clean up and import ~200 CTA records to CGSpace via CSV like:</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>$ export JAVA_OPTS="-Xmx512m -Dfile.encoding=UTF-8"
|
||||
<pre tabindex="0"><code>$ export JAVA_OPTS="-Xmx512m -Dfile.encoding=UTF-8"
|
||||
$ /home/cgspace.cgiar.org/bin/dspace metadata-import -e aorth@mjanja.ch -f ~/CTA-May30/CTA-42229.csv &> ~/CTA-May30/CTA-42229.log
|
||||
</code></pre><ul>
|
||||
<li>Discovery indexing took a few hours for some reason, and after that I started the <code>index-authority</code> script</li>
|
||||
</ul>
|
||||
<pre tabindex="0"><code>$ JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" /home/cgspace.cgiar.org/bin/dspace index-authority
|
||||
<pre tabindex="0"><code>$ JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" /home/cgspace.cgiar.org/bin/dspace index-authority
|
||||
</code></pre><h2 id="2016-05-31">2016-05-31</h2>
|
||||
<ul>
|
||||
<li>The <code>index-authority</code> script ran over night and was finished in the morning</li>
|
||||
|
Reference in New Issue
Block a user