mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-22 06:35:03 +01:00
58 lines
2.3 KiB
Markdown
58 lines
2.3 KiB
Markdown
---
|
|
title: "July, 2024"
|
|
date: 2024-07-01T09:37:00+03:00
|
|
author: "Alan Orth"
|
|
categories: ["Notes"]
|
|
---
|
|
|
|
## 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):
|
|
|
|
<!--more-->
|
|
|
|
```console
|
|
$ dspace dsrun org.dspace.eperson.Groomer -a -b 07/01/2018 -d
|
|
```
|
|
|
|
- File an issue on DSpace GitHub: [Allow configuring disallowed domains for self registration](https://github.com/DSpace/DSpace/issues/9675)
|
|
|
|
## 2024-07-11
|
|
|
|
- Minor fixes to normalize the IFPRI CONTENTdm URLs in provenance fields:
|
|
|
|
```console
|
|
dspace=# BEGIN;
|
|
BEGIN
|
|
dspace=*# UPDATE metadatavalue SET text_value = replace(text_value, 'cdm/ref', 'digital') WHERE text_value LIKE '%CONTENTdm%cdm/ref/%';
|
|
UPDATE 1876
|
|
dspace=*# UPDATE metadatavalue SET text_value = replace(text_value, 'CONTENTdm: ', 'CONTENTdm: ') WHERE text_value LIKE '%CONTENTdm: %';
|
|
UPDATE 21
|
|
dspace=*# COMMIT;
|
|
COMMIT
|
|
```
|
|
|
|
- Then export a new list of CONTENTdm redirects, excluding withdrawn items:
|
|
|
|
```console
|
|
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;
|
|
COPY 8568
|
|
```
|
|
|
|
- Similarly, get a list of withdrawn item redirects:
|
|
|
|
```console
|
|
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;
|
|
COPY 396
|
|
```
|
|
|
|
## 2024-07-18
|
|
|
|
- I experimented with adding a regular expression to validate DOIs to the submission form
|
|
- It is a slightly modified version of the one found here: https://stackoverflow.com/questions/27910/finding-a-doi-in-a-document-or-page
|
|
- 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
|
|
|
|
<!-- vim: set sw=2 ts=2: -->
|