[open-ils-commits] [GIT] Evergreen ILS branch master updated. b4eb8c68ad812e3c2e7ce045c91a26c4d2d19a61
Evergreen Git
git at git.evergreen-ils.org
Mon Aug 3 17:58:11 EDT 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via b4eb8c68ad812e3c2e7ce045c91a26c4d2d19a61 (commit)
from c8c9cbbdb74f97fc68b6de23ddeb645db5f25d89 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b4eb8c68ad812e3c2e7ce045c91a26c4d2d19a61
Author: Josh Stompro <stompro at stompro.org>
Date: Mon Mar 4 11:16:56 2019 -0600
LP#1674364 - Use database bib id for cover art lookup
Export the 901c as the URN:BIBID identifier to allow the
ATOM2XHTML.xsl to construct a cover art img link using it.
Testing Notes:
I used a bookbag to test this out.
1. Create a public bookbag of items and grab the bookbag id.
2. View the source of these links on your system to see the current output.
/opac/extras/feed/bookbag/atom/<bookbagid>
/opac/extras/feed/bookbag/html-full/<bookbagid>
Make note that the jacket img link uses the ISBN to lookup cover art.
Make changes.
1. Restart supercat to re-load xsl transfor files.
osrf_control -l --service open-ils.supercat --restart
2. View the source and output of these links on your system to see the changes.
/opac/extras/feed/bookbag/atom/<bookbagid>
/opac/extras/feed/bookbag/html-full/<bookbagid>
The cover art images should show up now in the html-full, and the
URN:BIBID: identifier should be populated in the atom file.
Signed-off-by: Josh Stompro <stompro at stompro.org>
Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/xsl/ATOM2XHTML.xsl b/Open-ILS/xsl/ATOM2XHTML.xsl
index 3484f1508b..4d728b91db 100644
--- a/Open-ILS/xsl/ATOM2XHTML.xsl
+++ b/Open-ILS/xsl/ATOM2XHTML.xsl
@@ -8,6 +8,7 @@ Copyright (c) 2006 GPLS.
Author: Michael Fagan, parts by Joel Tesler; modifications by Mike Rylander / GPLS
Changelog:
+ 2019-03-04: Use URN:BIBID for cover art lookup.
2005-11-28: Updated to work with OpenSearch 1.1 Draft 2 (rather than Draft 1)
2005-10-19: Changlog added (unknown update)
Description: Converts an OpenSearch feed into XHTML.
@@ -301,23 +302,8 @@ To-do list:
<xsl:template match="dc:identifier">
<xsl:attribute name="src">
- <xsl:choose>
- <xsl:when test="position() < 2 and string-length(.) > 9">
- <xsl:variable name="isbnraw"><xsl:value-of select="substring-after(.,'ISBN:')"/></xsl:variable>
- <xsl:choose>
- <xsl:when test="substring-before($isbnraw,' ')">
- <xsl:variable name="isbntrimmed"><xsl:value-of select="substring-before($isbnraw,' ')"/></xsl:variable>
- <xsl:value-of select="concat('/opac/extras/ac/jacket/small/',$isbntrimmed)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('/opac/extras/ac/jacket/small/',$isbnraw)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/opac/extras/ac/jacket/small/</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:variable name="bibid"><xsl:value-of select="substring-after(.,'BIBID:')"/></xsl:variable>
+ <xsl:value-of select="concat('/opac/extras/ac/jacket/small/r/',$bibid)"/>
</xsl:attribute>
</xsl:template>
diff --git a/Open-ILS/xsl/MARC21slim2ATOM.xsl b/Open-ILS/xsl/MARC21slim2ATOM.xsl
index dd0c7e1497..05914d9989 100644
--- a/Open-ILS/xsl/MARC21slim2ATOM.xsl
+++ b/Open-ILS/xsl/MARC21slim2ATOM.xsl
@@ -4,6 +4,7 @@
<xsl:output method="xml" indent="yes"/>
<!--Added ISBN and deleted attributes 6/04 jer-->
+ <!--Added BIBID to facilitate covert art lookup 2019-03-04 jrs-->
<xsl:template match="/">
<xsl:apply-templates/>
@@ -119,6 +120,14 @@
</dc:identifier>
</xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=901]">
+ <dc:identifier>
+ <xsl:text>URN:BIBID:</xsl:text>
+ <xsl:value-of select="marc:subfield[@code='c']"/>
+ </dc:identifier>
+ </xsl:for-each>
+
+
<xsl:for-each select="marc:datafield[@tag=506]">
<rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/xsl/ATOM2XHTML.xsl | 20 +++-----------------
Open-ILS/xsl/MARC21slim2ATOM.xsl | 9 +++++++++
2 files changed, 12 insertions(+), 17 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list