diff --git a/content/posts/2023-02.md b/content/posts/2023-02.md index e1a09bbae..63c037a12 100644 --- a/content/posts/2023-02.md +++ b/content/posts/2023-02.md @@ -87,4 +87,45 @@ curl -f -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.or - Export CGSpace to update Initiative mappings and country/region mappings - Then start a harvest on AReS +## 2023-02-09 + +- Do some minor work on the CSS on the DSpace 7 test + +## 2023-02-10 + +- I noticed a large number of PostgreSQL locks from dspaceWeb on CGSpace: + +```console +$ psql -c 'SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid;' | grep -o -E '(dspaceWeb|dspaceApi|dspaceCli)' | sort | uniq -c + 2033 dspaceWeb +``` + +- Looking at the lock age, I see some already 1 day old, including this curious query: + +```console +select nextval ('public.registrationdata_seq') +``` + +- I killed all locks that were more than a few hours old +- Export CGSpace to update Initiative collection mappings +- Discuss adding `dcterms.available` to the submission form + - I also looked in the `dcterms.description` field on CGSpace and found ~1,500 items where the is an indication of an online published date + - Using some facets in OpenRefine I narrowed down the ones mentioning "online" and then extracted the dates to a new column: + +```console +cells['dcterms.description[en_US]'].value.replace(/.*?(\d+{2}) ([a-zA-Z]+) (\d+{2}).*/,"$3-$2-$1") +``` + +- Then to handle formats like "2022-April-26" and "2021-Nov-11" I used some replacement GRELs (note the order so we don't replace short patterns in longer strings prematurely): + +```console +value.replace("January","01").replace("February","02").replace("March","03").replace("April","04").replace("May","05").replace("June","06").replace("July","07").replace("August","08").replace("September","09").replace("October","10").replace("November","11").replace("December","12") +value.replace("Jan","01").replace("Feb","02").replace("Mar","03").replace("Apr","04").replace("May","05").replace("Jun","06").replace("Jul","07").replace("Aug","08").replace("Sep","09").replace("Oct","10").replace("Nov","11").replace("Dec","12") +``` + +- This covered about 1,300 items, then I did about 100 more messier ones with some more regex wranling + - I removed the `dcterms.description[en_US]` field from items where I updated the dates +- Then I added `dcterms.available` to the submission form and the item view + - We need to announce this to the editors + diff --git a/docs/2023-02/index.html b/docs/2023-02/index.html index 930e5a8ca..7f62da03e 100644 --- a/docs/2023-02/index.html +++ b/docs/2023-02/index.html @@ -18,7 +18,7 @@ I want to try to expand my use of their data to journals, publishers, volumes, i - + @@ -42,9 +42,9 @@ I want to try to expand my use of their data to journals, publishers, volumes, i "@type": "BlogPosting", "headline": "February, 2023", "url": "https://alanorth.github.io/cgspace-notes/2023-02/", - "wordCount": "597", + "wordCount": "821", "datePublished": "2023-02-01T10:57:36+03:00", - "dateModified": "2023-02-01T10:57:36+03:00", + "dateModified": "2023-02-09T08:50:54+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -210,6 +210,48 @@ I want to try to expand my use of their data to journals, publishers, volumes, i +

2023-02-09

+ +

2023-02-10

+ +
$ psql -c 'SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid;' | grep -o -E '(dspaceWeb|dspaceApi|dspaceCli)' | sort | uniq -c
+   2033 dspaceWeb
+
+
select nextval ('public.registrationdata_seq')
+
+
cells['dcterms.description[en_US]'].value.replace(/.*?(\d+{2}) ([a-zA-Z]+) (\d+{2}).*/,"$3-$2-$1")
+
+
value.replace("January","01").replace("February","02").replace("March","03").replace("April","04").replace("May","05").replace("June","06").replace("July","07").replace("August","08").replace("September","09").replace("October","10").replace("November","11").replace("December","12")
+value.replace("Jan","01").replace("Feb","02").replace("Mar","03").replace("Apr","04").replace("May","05").replace("Jun","06").replace("Jul","07").replace("Aug","08").replace("Sep","09").replace("Oct","10").replace("Nov","11").replace("Dec","12")
+
diff --git a/docs/categories/index.html b/docs/categories/index.html index f45eb76ab..1d2331e68 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/index.html b/docs/categories/notes/index.html index ceed9ba07..c89171a91 100644 --- a/docs/categories/notes/index.html +++ b/docs/categories/notes/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/2/index.html b/docs/categories/notes/page/2/index.html index 0b9388970..321acc1fa 100644 --- a/docs/categories/notes/page/2/index.html +++ b/docs/categories/notes/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/3/index.html b/docs/categories/notes/page/3/index.html index 2aeb2e22b..f10e9436d 100644 --- a/docs/categories/notes/page/3/index.html +++ b/docs/categories/notes/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/4/index.html b/docs/categories/notes/page/4/index.html index 2fcbddfbf..af6771b71 100644 --- a/docs/categories/notes/page/4/index.html +++ b/docs/categories/notes/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/5/index.html b/docs/categories/notes/page/5/index.html index 6511e8dc9..c9f5f60d7 100644 --- a/docs/categories/notes/page/5/index.html +++ b/docs/categories/notes/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/6/index.html b/docs/categories/notes/page/6/index.html index 51dc56496..4e732745f 100644 --- a/docs/categories/notes/page/6/index.html +++ b/docs/categories/notes/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/7/index.html b/docs/categories/notes/page/7/index.html index 3e0a165cd..1b3f60e89 100644 --- a/docs/categories/notes/page/7/index.html +++ b/docs/categories/notes/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/index.html b/docs/index.html index ffc8e8757..ca4febe3b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/10/index.html b/docs/page/10/index.html index b8c1013a4..5389fb0a8 100644 --- a/docs/page/10/index.html +++ b/docs/page/10/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/2/index.html b/docs/page/2/index.html index 7b6deca9f..aa07da4b7 100644 --- a/docs/page/2/index.html +++ b/docs/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/3/index.html b/docs/page/3/index.html index 691c543b5..531935c10 100644 --- a/docs/page/3/index.html +++ b/docs/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/4/index.html b/docs/page/4/index.html index b790744eb..ea10456ea 100644 --- a/docs/page/4/index.html +++ b/docs/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/5/index.html b/docs/page/5/index.html index 263c1563d..67242dee7 100644 --- a/docs/page/5/index.html +++ b/docs/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/6/index.html b/docs/page/6/index.html index ef30bc4f4..23e913da8 100644 --- a/docs/page/6/index.html +++ b/docs/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/7/index.html b/docs/page/7/index.html index cc04ad034..28745989b 100644 --- a/docs/page/7/index.html +++ b/docs/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/8/index.html b/docs/page/8/index.html index bac27250f..c6c16c596 100644 --- a/docs/page/8/index.html +++ b/docs/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/9/index.html b/docs/page/9/index.html index 93b782c34..8a4f4de6d 100644 --- a/docs/page/9/index.html +++ b/docs/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/index.html b/docs/posts/index.html index c47a34ac9..df0d080f9 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/10/index.html b/docs/posts/page/10/index.html index 406657d38..eeb0a6a5e 100644 --- a/docs/posts/page/10/index.html +++ b/docs/posts/page/10/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/2/index.html b/docs/posts/page/2/index.html index cd41bccd1..c48668c8c 100644 --- a/docs/posts/page/2/index.html +++ b/docs/posts/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/3/index.html b/docs/posts/page/3/index.html index 0c9b845a8..751ae7490 100644 --- a/docs/posts/page/3/index.html +++ b/docs/posts/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/4/index.html b/docs/posts/page/4/index.html index a40242669..f69d18b95 100644 --- a/docs/posts/page/4/index.html +++ b/docs/posts/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/5/index.html b/docs/posts/page/5/index.html index d278b4399..c39d01eb8 100644 --- a/docs/posts/page/5/index.html +++ b/docs/posts/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/6/index.html b/docs/posts/page/6/index.html index 2570963d0..aaa44d9f1 100644 --- a/docs/posts/page/6/index.html +++ b/docs/posts/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/7/index.html b/docs/posts/page/7/index.html index c93d18601..c42e5fc83 100644 --- a/docs/posts/page/7/index.html +++ b/docs/posts/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/8/index.html b/docs/posts/page/8/index.html index 9ece3f21a..11e4afac7 100644 --- a/docs/posts/page/8/index.html +++ b/docs/posts/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/9/index.html b/docs/posts/page/9/index.html index d14e279f9..fd9de9fa1 100644 --- a/docs/posts/page/9/index.html +++ b/docs/posts/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index c27eac26b..1e1b366ba 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -3,19 +3,19 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml"> https://alanorth.github.io/cgspace-notes/categories/ - 2023-02-01T10:57:36+03:00 + 2023-02-09T08:50:54+03:00 https://alanorth.github.io/cgspace-notes/ - 2023-02-01T10:57:36+03:00 + 2023-02-09T08:50:54+03:00 https://alanorth.github.io/cgspace-notes/2023-02/ - 2023-02-01T10:57:36+03:00 + 2023-02-09T08:50:54+03:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2023-02-01T10:57:36+03:00 + 2023-02-09T08:50:54+03:00 https://alanorth.github.io/cgspace-notes/posts/ - 2023-02-01T10:57:36+03:00 + 2023-02-09T08:50:54+03:00 https://alanorth.github.io/cgspace-notes/2023-01/ 2023-01-31T22:20:38+03:00