Commit Graph

21 Commits

Author SHA1 Message Date
9e965afdb7 src/main/java: change getSize() to getSizeBytes()
Apparently this changed in DSpace 7. Untested, but it compiles now.
2023-12-28 10:18:40 +03:00
8c0a8fbcd1 Bump version to 6.2-SNAPSHOT
I can't figure out how to get non-snapshot releases on Central.
2023-02-21 10:59:54 +03:00
c05a2e4f96 Version 6.2 2023-02-20 20:37:40 +03:00
dbd8721579 src: add better status messages to FixLowQualityThumbnails 2022-10-07 15:33:13 +03:00
80a336f94d src: fix context commit in scripts
I was wondering why the same bitstreams appeared to be getting de-
leted on every single run. It turns out that the only mode we were
committing the context in was in single item mode. If the argument
was a site, community, or collection we were updating the item but
not actually committing the changes!
2022-10-07 14:49:58 +03:00
5ebf4930cf src: re-organize switch statements in scripts
It makes more sense to me to start from the top level of the hier-
archy.
2022-10-07 13:11:03 +03:00
b396fba043 src: format Java files with google-java-format
Using AOSP format so we get four spaces instead of two.
2022-10-06 14:27:51 +03:00
38a9cc5188 src: organize imports in VS Code 2022-10-06 14:26:44 +03:00
16db38967b src: handle null descriptions in FixJpgJpgThumbnails 2022-10-06 14:17:41 +03:00
2604dc3cce src: skip Infographics and Maps in FixJpgJpgThumbnails
Instead of checking whether they exist and then skipping them just
at the moment when we want to swap the bitstreams let's bail early
when we know an item is an Infographic or a Map.
2022-10-06 14:15:58 +03:00
f0754ab419 src: fix npe on null description
In FixLowQualityThumbnails we need to make sure that bitstream de-
scriptions are not null or empty before trying to evaluate them.
2022-10-05 21:00:14 +03:00
6772145bec src: fix SPDX license header
Use GPL-3.0-or-later instead of GPL-3.0-only. I had specified this
in pom.xml already.
2022-10-05 16:53:00 +03:00
095f843067 src: add SPDX license headers 2022-10-05 15:48:57 +03:00
922e3892a7 Update README.md files 2022-10-05 15:24:08 +03:00
6b648c2c85 src: add FixLowQualityThumbnails.java
This adds another script to detect and remove more low-quality thu-
mbnails. For example:

- If an item has an "IM Thumbnail" and a "Generated Thumbnail" in the
  THUMBNAIL bundle, remove the "Generated Thumbnail"
- If an item has a PDF bitstream and a JPEG bitstream with a name or
  description "thumbnail" in the ORIGINAL bundle, remove the
  "thumbnail" bitstream in the ORIGINAL bundle and try to remove the
  "thumbnail.jpg" bitstream in the THUMBNAIL bundle

The idea is that we should *always* prefer thumbnails generated by
ImageMagick from PDFs in the ORIGINAL bundle and should remove any
other manually uploaded thumbnails.
2022-10-05 15:07:56 +03:00
3aa1503163 src: bump version of FixJpgJpgThumbnails.java 2022-10-04 21:13:24 +03:00
26597e2f8f Use dcterms.type in FixJpgJpgThumbnails script
We are now using dcterms.type instead of dc.type.
2022-10-04 16:16:43 +03:00
735e759033 Adjust READMEs again... 2020-08-10 17:16:14 +03:00
271a9ce970 Adjust README.md files 2020-08-10 15:55:11 +03:00
4bc7971ecb src/main/java: Remove debug comment 2020-08-07 22:55:35 +03:00
da1ecad238 src/main/java: DSpace 6 port of FixJpgJpgThumbnails.java
Need to use the new DSpace 6 service model in most places. Not sure
why addBitstream is no longer public, but removeBitstream is...
2020-08-07 22:45:07 +03:00