diff --git a/content/posts/2019-02.md b/content/posts/2019-02.md index 187cbf832..33047d5b9 100644 --- a/content/posts/2019-02.md +++ b/content/posts/2019-02.md @@ -542,5 +542,25 @@ $ vipsthumbnail alc_contrastes_desafios.pdf -s 300 -o '%s.jpg[Q=92,optimize_codi ``` - (DSpace 5 appears to use JPEG 92 quality so I do the same) +- Thinking about making "top items" endpoints in my [dspace-statistics-api](https://github.com/ilri/dspace-statistics-api) +- I could use the following SQL queries very easily to get the top items by views or downloads: + +``` +dspacestatistics=# SELECT * FROM items WHERE views > 0 ORDER BY views DESC LIMIT 10; +dspacestatistics=# SELECT * FROM items WHERE downloads > 0 ORDER BY downloads DESC LIMIT 10; +``` + +- I'd have to think about what to make the REST API endpoints, perhaps: `/statistics/top/items?limit=10` +- But how do I do top items by views / downloads separately? +- I re-deployed DSpace 6.3 locally to test the PDFBox thumbnails, especially to see if they handle CMYK files properly + - The quality is JPEG 75 and I don't see a way to set the thumbnail dimensions, but the resulting image is indeed sRGB: + +``` +$ identify -verbose alc_contrastes_desafios.pdf.jpg +... + Colorspace: sRGB +``` + +- I will read the PDFBox thumbnailer documentation to see if I can change the size and quality diff --git a/docs/2019-02/index.html b/docs/2019-02/index.html index a2229d356..bb8f92e5d 100644 --- a/docs/2019-02/index.html +++ b/docs/2019-02/index.html @@ -42,7 +42,7 @@ sys 0m1.979s - + @@ -89,9 +89,9 @@ sys 0m1.979s "@type": "BlogPosting", "headline": "February, 2019", "url": "https://alanorth.github.io/cgspace-notes/2019-02/", - "wordCount": "2900", + "wordCount": "3049", "datePublished": "2019-02-01T21:37:30+02:00", - "dateModified": "2019-02-11T11:17:27+02:00", + "dateModified": "2019-02-12T09:24:28+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -771,6 +771,31 @@ Please see the DSpace documentation for assistance. + +
dspacestatistics=# SELECT * FROM items WHERE views > 0 ORDER BY views DESC LIMIT 10;
+dspacestatistics=# SELECT * FROM items WHERE downloads > 0 ORDER BY downloads DESC LIMIT 10;
+
+ + + +
$ identify -verbose alc_contrastes_desafios.pdf.jpg
+...
+  Colorspace: sRGB
+
+ + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 02cb3f666..96ee0948b 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2019-02/ - 2019-02-11T11:17:27+02:00 + 2019-02-12T09:24:28+02:00 @@ -209,7 +209,7 @@ https://alanorth.github.io/cgspace-notes/ - 2019-02-11T11:17:27+02:00 + 2019-02-12T09:24:28+02:00 0 @@ -220,7 +220,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2019-02-11T11:17:27+02:00 + 2019-02-12T09:24:28+02:00 0 @@ -232,13 +232,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2019-02-11T11:17:27+02:00 + 2019-02-12T09:24:28+02:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2019-02-11T11:17:27+02:00 + 2019-02-12T09:24:28+02:00 0