Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't. I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community. Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down". Nigel On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote:
Gentlefolk
I'm using the Openlibrary cover facility to display covers in my OPAC and it generally works very well (in the case where the cover doesn't exist in Openlibrary I scan and upload it). However, if the Biblio record doesn't have an ISBN or LCCN the cover lookup fails (obviously). Is there any way of recording the Openlibrary ID (OLID) in a Biblio record so that the cover lookup will work, even if there is no ISBN or LCCN?
I've done a (fairly cursory) scan of the documentation but can't find and reference to where I should put the OLID so that Koha will look up the cover even if there is no ISBN or LCCN. Of course the facility may not exist, in which case I'd be grateful for confirmation from Someone Who Knows.
Many thanks
Nigel Titley
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac-tmpl/boo... and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %] Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote:
Gentlefolk
I'm using the Openlibrary cover facility to display covers in my OPAC and it generally works very well (in the case where the cover doesn't exist in Openlibrary I scan and upload it). However, if the Biblio record doesn't have an ISBN or LCCN the cover lookup fails (obviously). Is there any way of recording the Openlibrary ID (OLID) in a Biblio record so that the cover lookup will work, even if there is no ISBN or LCCN?
I've done a (fairly cursory) scan of the documentation but can't find and reference to where I should put the OLID so that Koha will look up the cover even if there is no ISBN or LCCN. Of course the facility may not exist, in which case I'd be grateful for confirmation from Someone Who Knows.
Many thanks
Nigel Titley
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
Thanks for the response... makes sense to use the ISBN and it explains the observed behaviour. I've had a look at the code. One of these days I'll blow the dust off my JS manuals and see if I can do something to extend the code (JS isn't my favourite language and I've probably not written any for about 15 years). Is my supposition about where it would go in the MARC record correct? Thanks Nigel On 21/07/2023 12:29, Jonathan Druart wrote:
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js
https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac-tmpl/boo...
and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote:
Gentlefolk
I'm using the Openlibrary cover facility to display covers in my OPAC and it generally works very well (in the case where the cover doesn't exist in Openlibrary I scan and upload it). However, if the Biblio record doesn't have an ISBN or LCCN the cover lookup fails (obviously). Is there any way of recording the Openlibrary ID (OLID) in a Biblio record so that the cover lookup will work, even if there is no ISBN or LCCN?
I've done a (fairly cursory) scan of the documentation but can't find and reference to where I should put the OLID so that Koha will look up the cover even if there is no ISBN or LCCN. Of course the facility may not exist, in which case I'd be grateful for confirmation from Someone Who Knows.
Many thanks
Nigel Titley
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
No idea, I'm really just a programmer ;) Le ven. 21 juil. 2023 à 14:06, Nigel Titley <nigel@titley.com> a écrit :
Thanks for the response... makes sense to use the ISBN and it explains the observed behaviour.
I've had a look at the code. One of these days I'll blow the dust off my JS manuals and see if I can do something to extend the code (JS isn't my favourite language and I've probably not written any for about 15 years).
Is my supposition about where it would go in the MARC record correct?
Thanks
Nigel
On 21/07/2023 12:29, Jonathan Druart wrote:
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js
https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac-tmpl/boo...
and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote:
Gentlefolk
I'm using the Openlibrary cover facility to display covers in my OPAC and it generally works very well (in the case where the cover doesn't exist in Openlibrary I scan and upload it). However, if the Biblio record doesn't have an ISBN or LCCN the cover lookup fails (obviously). Is there any way of recording the Openlibrary ID (OLID) in a Biblio record so that the cover lookup will work, even if there is no ISBN or LCCN?
I've done a (fairly cursory) scan of the documentation but can't find and reference to where I should put the OLID so that Koha will look up the cover even if there is no ISBN or LCCN. Of course the facility may not exist, in which case I'd be grateful for confirmation from Someone Who Knows.
Many thanks
Nigel Titley
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Understood. I'm sure that a Real Librarian (tm) will answer at some point. Thanks anyway Nigel On 21/07/2023 13:20, Jonathan Druart wrote:
No idea, I'm really just a programmer ;)
Le ven. 21 juil. 2023 à 14:06, Nigel Titley <nigel@titley.com> a écrit :
Thanks for the response... makes sense to use the ISBN and it explains the observed behaviour.
I've had a look at the code. One of these days I'll blow the dust off my JS manuals and see if I can do something to extend the code (JS isn't my favourite language and I've probably not written any for about 15 years).
Is my supposition about where it would go in the MARC record correct?
Thanks
Nigel
On 21/07/2023 12:29, Jonathan Druart wrote:
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js
https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac-tmpl/boo...
and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote:
Gentlefolk
I'm using the Openlibrary cover facility to display covers in my OPAC and it generally works very well (in the case where the cover doesn't exist in Openlibrary I scan and upload it). However, if the Biblio record doesn't have an ISBN or LCCN the cover lookup fails (obviously). Is there any way of recording the Openlibrary ID (OLID) in a Biblio record so that the cover lookup will work, even if there is no ISBN or LCCN?
I've done a (fairly cursory) scan of the documentation but can't find and reference to where I should put the OLID so that Koha will look up the cover even if there is no ISBN or LCCN. Of course the facility may not exist, in which case I'd be grateful for confirmation from Someone Who Knows.
Many thanks
Nigel Titley
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Hi Nigel, While it's been a while since I worked in a library myself, I've got the librarian degree, I've been working in the library world for nearly 20 years, and I've been working on Koha for over 10 years. In cases like this, the answer is often "it depends". I would be tempted to put the OpenLibrary ID into the 024$a but as you've noted there isn't an easy standard way to indicate that it's an OpenLibrary ID, which is quite important for a case like this. That certainly makes things tricky. You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it. Now here's where "it depends" comes in the most. Are you going to exchange your MARC records with other systems or just use them locally? If it's just locally, you could cheat and use a 024$2 of "openlibrary". Of course, you'd still need to write code to look for a 024$a with a 024$2 of "openlibrary". It would be fine if you kept that code local to your Koha, but the Koha community might not accept it upstream. Another option could be to use a 024$2 of "uri" and store the whole OpenLibrary URI like https://openlibrary.org/books/OL49198571M/Analogue_Men. The code could look for URIs with a hostname of "openlibrary.org" and then extract the ID from the URI. There's a growing usage of URIs for identifiers in the MARC world (long story why). You often see these as $0 subfields: https://www.loc.gov/marc/bibliographic/ecbdcntf.html. This would fit within the rules for MARC, but the downside is it would require you to write new code. It's also still arguably unconventional. As Jonathan pointed out, Koha only uses the ISBN to get OpenLibrary covers, although it looks like the OpenLibrary API has some options available for things like the OpenLibrary ID. Extending that API usage by Koha would probably involve Javascript, Template Toolkit changes, and maybe Perl changes. Keeping custom code local can be a bit of a headache in the long-run though, as then you can't rely on the regular releases from the Koha community without doing a fair bit of extra work. If you're running Koha 23.05+, you could look at writing a Koha plugin, which uses the new "opac_cover_images" hook[1]. This would involve some short-term work, but it would let you implement what you need. Going back to "it depends", in the library world we like to follow standards... until they don't work for us. Then we have local policies. Every library has their own way of doing things. (Another thing to notice with MARC is that when you encounter the number "9", it typically stands for a local field/subfield. Koha uses some of these fields/subfields for its own local purposes, and you can always do the same. The limit is just that "9" only makes sense for your library. You could always use a 024$9 of "openlibrary" along with a Koha plugin to achieve your goal. It wouldn't be following the library standards 100% but it's the kind of thing that does get done in the library world. Does that make sense? [1] https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32680 David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Friday, 21 July 2023 11:06 PM To: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Cc: koha@lists.katipo.co.nz; koha-devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record Understood. I'm sure that a Real Librarian (tm) will answer at some point. Thanks anyway Nigel On 21/07/2023 13:20, Jonathan Druart wrote:
No idea, I'm really just a programmer ;)
Le ven. 21 juil. 2023 à 14:06, Nigel Titley <nigel@titley.com> a écrit :
Thanks for the response... makes sense to use the ISBN and it explains the observed behaviour.
I've had a look at the code. One of these days I'll blow the dust off my JS manuals and see if I can do something to extend the code (JS isn't my favourite language and I've probably not written any for about 15 years).
Is my supposition about where it would go in the MARC record correct?
Thanks
Nigel
On 21/07/2023 12:29, Jonathan Druart wrote:
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js
https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac- tmpl/bootstrap/js/openlibrary.js#L19
and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote:
Gentlefolk
I'm using the Openlibrary cover facility to display covers in my OPAC and it generally works very well (in the case where the cover doesn't exist in Openlibrary I scan and upload it). However, if the Biblio record doesn't have an ISBN or LCCN the cover lookup fails (obviously). Is there any way of recording the Openlibrary ID (OLID) in a Biblio record so that the cover lookup will work, even if there is no ISBN or LCCN?
I've done a (fairly cursory) scan of the documentation but can't find and reference to where I should put the OLID so that Koha will look up the cover even if there is no ISBN or LCCN. Of course the facility may not exist, in which case I'd be grateful for confirmation from Someone Who Knows.
Many thanks
Nigel Titley
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-deve l website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
David Sorry I only just got back to this. Your thinking seems to accord with my own. See comments below On 24/07/2023 01:11, David Cook wrote:
Hi Nigel,
While it's been a while since I worked in a library myself, I've got the librarian degree, I've been working in the library world for nearly 20 years, and I've been working on Koha for over 10 years. In cases like this, the answer is often "it depends".
I would be tempted to put the OpenLibrary ID into the 024$a but as you've noted there isn't an easy standard way to indicate that it's an OpenLibrary ID, which is quite important for a case like this. That certainly makes things tricky.
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I think this might be the proper way forward and I'll kick off a request
Now here's where "it depends" comes in the most. Are you going to exchange your MARC records with other systems or just use them locally? If it's just locally, you could cheat and use a 024$2 of "openlibrary". Of course, you'd still need to write code to look for a 024$a with a 024$2 of "openlibrary". It would be fine if you kept that code local to your Koha, but the Koha community might not accept it upstream.
Having worked for many, many years in the opensource community I'd be very wary of taking this route. Local code changes that aren't folded back into the mainstream always end up going down the rat hole of non-maintainability.
Another option could be to use a 024$2 of "uri" and store the whole OpenLibrary URI like https://openlibrary.org/books/OL49198571M/Analogue_Men. The code could look for URIs with a hostname of "openlibrary.org" and then extract the ID from the URI. There's a growing usage of URIs for identifiers in the MARC world (long story why). You often see these as $0 subfields: https://www.loc.gov/marc/bibliographic/ecbdcntf.html. This would fit within the rules for MARC, but the downside is it would require you to write new code. It's also still arguably unconventional.
This is a possibility and it's certainly a route I could go. Writing code isn't out of the question. I've got a Javascript manual glaring at me as I write.
As Jonathan pointed out, Koha only uses the ISBN to get OpenLibrary covers, although it looks like the OpenLibrary API has some options available for things like the OpenLibrary ID. Extending that API usage by Koha would probably involve Javascript, Template Toolkit changes, and maybe Perl changes. Keeping custom code local can be a bit of a headache in the long-run though, as then you can't rely on the regular releases from the Koha community without doing a fair bit of extra work.
Agreed
If you're running Koha 23.05+, you could look at writing a Koha plugin, which uses the new "opac_cover_images" hook[1]. This would involve some short-term work, but it would let you implement what you need.
Unfortunately I'm stuck with 22.05.13.000 for the moment as the server is shared with a sympa server which has a clash of libraries with koha. I'm getting to the end of my tether with sympa, however, and I may migrate back to mailman.
Going back to "it depends", in the library world we like to follow standards... until they don't work for us. Then we have local policies. Every library has their own way of doing things. (Another thing to notice with MARC is that when you encounter the number "9", it typically stands for a local field/subfield. Koha uses some of these fields/subfields for its own local purposes, and you can always do the same. The limit is just that "9" only makes sense for your library. You could always use a 024$9 of "openlibrary" along with a Koha plugin to achieve your goal. It wouldn't be following the library standards 100% but it's the kind of thing that does get done in the library world. Does that make sense?
I really like to stay with standards if possible. I'll go the route of requesting Openlibrary be added to the SISC list and if that gets turned down I'll reconsider options. Many thanks for your help Nigel
[1] https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32680
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Friday, 21 July 2023 11:06 PM To: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Cc: koha@lists.katipo.co.nz; koha-devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
Understood.
I'm sure that a Real Librarian (tm) will answer at some point.
Thanks anyway
Nigel
On 21/07/2023 13:20, Jonathan Druart wrote:
No idea, I'm really just a programmer ;)
Le ven. 21 juil. 2023 à 14:06, Nigel Titley <nigel@titley.com> a écrit :
Thanks for the response... makes sense to use the ISBN and it explains the observed behaviour.
I've had a look at the code. One of these days I'll blow the dust off my JS manuals and see if I can do something to extend the code (JS isn't my favourite language and I've probably not written any for about 15 years).
Is my supposition about where it would go in the MARC record correct?
Thanks
Nigel
On 21/07/2023 12:29, Jonathan Druart wrote:
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js
https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac- tmpl/bootstrap/js/openlibrary.js#L19
and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote: > Gentlefolk > > I'm using the Openlibrary cover facility to display covers in my > OPAC and it generally works very well (in the case where the > cover doesn't exist in Openlibrary I scan and upload it). > However, if the Biblio record doesn't have an ISBN or LCCN the > cover lookup fails (obviously). Is there any way of recording the > Openlibrary ID (OLID) in a Biblio record so that the cover lookup > will work, even if there is no ISBN or LCCN? > > I've done a (fairly cursory) scan of the documentation but can't > find and reference to where I should put the OLID so that Koha > will look up the cover even if there is no ISBN or LCCN. Of > course the facility may not exist, in which case I'd be grateful > for confirmation from Someone Who Knows. > > Many thanks > > Nigel Titley > > _______________________________________________ > > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-deve l website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first. Fingers crossed. Nigel
On 08/08/2023 10:58, Nigel Titley wrote:
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first.
Well, to my surprise LOC got back to me today and said they had added Open Library to the SISC list. https://loc.gov/marc/relators/tn230808src.html So we now have a standardised way to add OLIDs to a MARC record 024 7 _ | $2 openlib | $a <OLID> And that means I can have a look at adding OLIDs to the cover art retrieval from Open Library... which means dusting off my... erk... javascript. Which means sorting out sympa so I can get Koha up to date... Nigel
That's great news, Nigel! I'm really happy that worked out. Have you looked at koha-testing-docker? https://gitlab.com/koha-community/koha-testing-docker You could do the development work on there and then wait/hope for it to flow down to your version? David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Thursday, 10 August 2023 6:40 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record On 08/08/2023 10:58, Nigel Titley wrote:
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first.
Well, to my surprise LOC got back to me today and said they had added Open Library to the SISC list. https://loc.gov/marc/relators/tn230808src.html So we now have a standardised way to add OLIDs to a MARC record 024 7 _ | $2 openlib | $a <OLID> And that means I can have a look at adding OLIDs to the cover art retrieval from Open Library... which means dusting off my... erk... javascript. Which means sorting out sympa so I can get Koha up to date... Nigel _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
And that, as if by magic, answers what was to be my next question... the koha-testing-docker instructions look comprehensive and I can try them out on my desktop, which seems to meet the requirements. My son, when I was discussing the project with him, said "you should do this in a docker container" and as usual he was right. I presume that once/if I've got it working there's a submission process to get updates back to the main Koha branch. All the best Nigel On 11/08/2023 00:07, David Cook wrote:
That's great news, Nigel! I'm really happy that worked out.
Have you looked at koha-testing-docker? https://gitlab.com/koha-community/koha-testing-docker
You could do the development work on there and then wait/hope for it to flow down to your version?
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Thursday, 10 August 2023 6:40 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
On 08/08/2023 10:58, Nigel Titley wrote:
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first.
Well, to my surprise LOC got back to me today and said they had added Open Library to the SISC list.
https://loc.gov/marc/relators/tn230808src.html
So we now have a standardised way to add OLIDs to a MARC record
024 7 _ | $2 openlib | $a <OLID>
And that means I can have a look at adding OLIDs to the cover art retrieval from Open Library... which means dusting off my... erk... javascript. Which means sorting out sympa so I can get Koha up to date...
Nigel _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
Hi Nigel, "I'm going to do this in a docker container" is what I say for most of my code projects (at home and the office). So long as you're not working with SystemD, it generally makes everything easier. I think this wiki page might describe the process best: https://wiki.koha-community.org/wiki/Development_workflow And for the practical aspect of submitting the patch, you'll want to look at https://wiki.koha-community.org/wiki/Git_bz_configuration Let us know if you have any issues. Once your patch is accepted, you'll also join this list: https://git.koha-community.org/stats/koha-master/authors.html David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Nigel Titley <nigel@titley.com> Sent: Friday, 11 August 2023 8:01 PM To: David Cook <dcook@prosentient.com.au>; koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record And that, as if by magic, answers what was to be my next question... the koha-testing-docker instructions look comprehensive and I can try them out on my desktop, which seems to meet the requirements. My son, when I was discussing the project with him, said "you should do this in a docker container" and as usual he was right. I presume that once/if I've got it working there's a submission process to get updates back to the main Koha branch. All the best Nigel On 11/08/2023 00:07, David Cook wrote:
That's great news, Nigel! I'm really happy that worked out.
Have you looked at koha-testing-docker? https://gitlab.com/koha-community/koha-testing-docker
You could do the development work on there and then wait/hope for it to flow down to your version?
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Thursday, 10 August 2023 6:40 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
On 08/08/2023 10:58, Nigel Titley wrote:
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first.
Well, to my surprise LOC got back to me today and said they had added Open Library to the SISC list.
https://loc.gov/marc/relators/tn230808src.html
So we now have a standardised way to add OLIDs to a MARC record
024 7 _ | $2 openlib | $a <OLID>
And that means I can have a look at adding OLIDs to the cover art retrieval from Open Library... which means dusting off my... erk... javascript. Which means sorting out sympa so I can get Koha up to date...
Nigel _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
Hi David Many thanks. I've read the documentation, created a koha bugzilla account, created an enhancement request and assigned to myself, just to kick this off. However, looks like the original author of the OpenLibrary cover retrieval code (joubu) is still around so they may be better equipped than me to deal with this. I don't want to tread on anyone's toes. If this isn't the right process then please let me know. All the best and thanks to the wonderful koha community for being so helpful. Nigel On 14/08/2023 02:18, David Cook wrote:
Hi Nigel,
"I'm going to do this in a docker container" is what I say for most of my code projects (at home and the office). So long as you're not working with SystemD, it generally makes everything easier.
I think this wiki page might describe the process best: https://wiki.koha-community.org/wiki/Development_workflow
And for the practical aspect of submitting the patch, you'll want to look at https://wiki.koha-community.org/wiki/Git_bz_configuration
Let us know if you have any issues.
Once your patch is accepted, you'll also join this list: https://git.koha-community.org/stats/koha-master/authors.html
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Nigel Titley <nigel@titley.com> Sent: Friday, 11 August 2023 8:01 PM To: David Cook <dcook@prosentient.com.au>; koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
And that, as if by magic, answers what was to be my next question... the koha-testing-docker instructions look comprehensive and I can try them out on my desktop, which seems to meet the requirements. My son, when I was discussing the project with him, said "you should do this in a docker container" and as usual he was right.
I presume that once/if I've got it working there's a submission process to get updates back to the main Koha branch.
All the best
Nigel
On 11/08/2023 00:07, David Cook wrote:
That's great news, Nigel! I'm really happy that worked out.
Have you looked at koha-testing-docker? https://gitlab.com/koha-community/koha-testing-docker
You could do the development work on there and then wait/hope for it to flow down to your version?
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Thursday, 10 August 2023 6:40 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
On 08/08/2023 10:58, Nigel Titley wrote:
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first.
Well, to my surprise LOC got back to me today and said they had added Open Library to the SISC list.
https://loc.gov/marc/relators/tn230808src.html
So we now have a standardised way to add OLIDs to a MARC record
024 7 _ | $2 openlib | $a <OLID>
And that means I can have a look at adding OLIDs to the cover art retrieval from Open Library... which means dusting off my... erk... javascript. Which means sorting out sympa so I can get Koha up to date...
Nigel _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
Hi Nigel, That's looking good to me. When you're ready with a patch, you can use "git bz" in koha-testing-docker to upload the patch to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34527 and then testers and QA will take it from there. Joubu (Jonathan Druart) has a lot of work to do, so I'm sure he wouldn't mind you working on this! Being familiar with the original code, you might find he comments on the patch/report at some stage. David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Nigel Titley <nigel@titley.com> Sent: Monday, 14 August 2023 9:40 PM To: David Cook <dcook@prosentient.com.au>; koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record Hi David Many thanks. I've read the documentation, created a koha bugzilla account, created an enhancement request and assigned to myself, just to kick this off. However, looks like the original author of the OpenLibrary cover retrieval code (joubu) is still around so they may be better equipped than me to deal with this. I don't want to tread on anyone's toes. If this isn't the right process then please let me know. All the best and thanks to the wonderful koha community for being so helpful. Nigel On 14/08/2023 02:18, David Cook wrote:
Hi Nigel,
"I'm going to do this in a docker container" is what I say for most of my code projects (at home and the office). So long as you're not working with SystemD, it generally makes everything easier.
I think this wiki page might describe the process best: https://wiki.koha-community.org/wiki/Development_workflow
And for the practical aspect of submitting the patch, you'll want to look at https://wiki.koha-community.org/wiki/Git_bz_configuration
Let us know if you have any issues.
Once your patch is accepted, you'll also join this list: https://git.koha-community.org/stats/koha-master/authors.html
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Nigel Titley <nigel@titley.com> Sent: Friday, 11 August 2023 8:01 PM To: David Cook <dcook@prosentient.com.au>; koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
And that, as if by magic, answers what was to be my next question... the koha-testing-docker instructions look comprehensive and I can try them out on my desktop, which seems to meet the requirements. My son, when I was discussing the project with him, said "you should do this in a docker container" and as usual he was right.
I presume that once/if I've got it working there's a submission process to get updates back to the main Koha branch.
All the best
Nigel
On 11/08/2023 00:07, David Cook wrote:
That's great news, Nigel! I'm really happy that worked out.
Have you looked at koha-testing-docker? https://gitlab.com/koha-community/koha-testing-docker
You could do the development work on there and then wait/hope for it to flow down to your version?
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Thursday, 10 August 2023 6:40 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
On 08/08/2023 10:58, Nigel Titley wrote:
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first.
Well, to my surprise LOC got back to me today and said they had added Open Library to the SISC list.
https://loc.gov/marc/relators/tn230808src.html
So we now have a standardised way to add OLIDs to a MARC record
024 7 _ | $2 openlib | $a <OLID>
And that means I can have a look at adding OLIDs to the cover art retrieval from Open Library... which means dusting off my... erk... javascript. Which means sorting out sympa so I can get Koha up to date...
Nigel _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
David Sorry I only just got back to this. Your thinking seems to accord with my own. See comments below On 24/07/2023 01:11, David Cook wrote:
Hi Nigel,
While it's been a while since I worked in a library myself, I've got the librarian degree, I've been working in the library world for nearly 20 years, and I've been working on Koha for over 10 years. In cases like this, the answer is often "it depends".
I would be tempted to put the OpenLibrary ID into the 024$a but as you've noted there isn't an easy standard way to indicate that it's an OpenLibrary ID, which is quite important for a case like this. That certainly makes things tricky.
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I think this might be the proper way forward and I'll kick off a request
Now here's where "it depends" comes in the most. Are you going to exchange your MARC records with other systems or just use them locally? If it's just locally, you could cheat and use a 024$2 of "openlibrary". Of course, you'd still need to write code to look for a 024$a with a 024$2 of "openlibrary". It would be fine if you kept that code local to your Koha, but the Koha community might not accept it upstream.
Having worked for many, many years in the opensource community I'd be very wary of taking this route. Local code changes that aren't folded back into the mainstream always end up going down the rat hole of non-maintainability.
Another option could be to use a 024$2 of "uri" and store the whole OpenLibrary URI like https://openlibrary.org/books/OL49198571M/Analogue_Men. The code could look for URIs with a hostname of "openlibrary.org" and then extract the ID from the URI. There's a growing usage of URIs for identifiers in the MARC world (long story why). You often see these as $0 subfields: https://www.loc.gov/marc/bibliographic/ecbdcntf.html. This would fit within the rules for MARC, but the downside is it would require you to write new code. It's also still arguably unconventional.
This is a possibility and it's certainly a route I could go. Writing code isn't out of the question. I've got a Javascript manual glaring at me as I write.
As Jonathan pointed out, Koha only uses the ISBN to get OpenLibrary covers, although it looks like the OpenLibrary API has some options available for things like the OpenLibrary ID. Extending that API usage by Koha would probably involve Javascript, Template Toolkit changes, and maybe Perl changes. Keeping custom code local can be a bit of a headache in the long-run though, as then you can't rely on the regular releases from the Koha community without doing a fair bit of extra work.
Agreed
If you're running Koha 23.05+, you could look at writing a Koha plugin, which uses the new "opac_cover_images" hook[1]. This would involve some short-term work, but it would let you implement what you need.
Unfortunately I'm stuck with 22.05.13.000 for the moment as the server is shared with a sympa server which has a clash of libraries with koha. I'm getting to the end of my tether with sympa, however, and I may migrate back to mailman.
Going back to "it depends", in the library world we like to follow standards... until they don't work for us. Then we have local policies. Every library has their own way of doing things. (Another thing to notice with MARC is that when you encounter the number "9", it typically stands for a local field/subfield. Koha uses some of these fields/subfields for its own local purposes, and you can always do the same. The limit is just that "9" only makes sense for your library. You could always use a 024$9 of "openlibrary" along with a Koha plugin to achieve your goal. It wouldn't be following the library standards 100% but it's the kind of thing that does get done in the library world. Does that make sense?
I really like to stay with standards if possible. I'll go the route of requesting Openlibrary be added to the SISC list and if that gets turned down I'll reconsider options. Many thanks for your help Nigel
[1] https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32680
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia
Office: 02 9212 0899 Online: 02 8005 0595
-----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Nigel Titley Sent: Friday, 21 July 2023 11:06 PM To: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Cc: koha@lists.katipo.co.nz; koha-devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] [Koha] Where would I put the OpenLibrary ID in the MARC record
Understood.
I'm sure that a Real Librarian (tm) will answer at some point.
Thanks anyway
Nigel
On 21/07/2023 13:20, Jonathan Druart wrote:
No idea, I'm really just a programmer ;)
Le ven. 21 juil. 2023 à 14:06, Nigel Titley <nigel@titley.com> a écrit :
Thanks for the response... makes sense to use the ISBN and it explains the observed behaviour.
I've had a look at the code. One of these days I'll blow the dust off my JS manuals and see if I can do something to extend the code (JS isn't my favourite language and I've probably not written any for about 15 years).
Is my supposition about where it would go in the MARC record correct?
Thanks
Nigel
On 21/07/2023 12:29, Jonathan Druart wrote:
Looks like it's only using the ISBN. The code is in koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js
https://gitlab.com/koha-community/Koha/-/blob/master/koha-tmpl/opac- tmpl/bootstrap/js/openlibrary.js#L19
and opac-results: 899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
Le ven. 21 juil. 2023 à 13:03, Nigel Titley <nigel@titley.com> a écrit :
Furthur on this and reading a bit more into MARC it looks like the information would go into MARC Field 024 with a source of 8. If there was a defined Standard Identifier for Openlibrary then the source would be 7 with the defined Standard Identifier for Openlibrary, but there isn't.
I'm straying into Real Librarian Territory here and I'm starting to feel a little lost (I'm really just a programmer). If the person who wrote the code for fetching covers from Openlibrary is around I'd be grateful if they could confirm/deny what their code does (or even point me to where I could look it up myself). To this end I've copied in the Koha Development community.
Or I may be barking up an entirely wrong tree. In which case feel free to say "Down boy, down".
Nigel
On 20/07/2023 23:20, Nigel Titley wrote:
Just to give an example of an OpenLibrary record that I created earlier today
https://openlibrary.org/books/OL49198571M/Analogue_Men#details
If at all possible I'd like to be able to display the cover using the OLID (OL49198571M) but I'm not sure where to put it.
Thanks
Nigel
On 20/07/2023 22:43, Nigel Titley wrote: > Gentlefolk > > I'm using the Openlibrary cover facility to display covers in my > OPAC and it generally works very well (in the case where the > cover doesn't exist in Openlibrary I scan and upload it). > However, if the Biblio record doesn't have an ISBN or LCCN the > cover lookup fails (obviously). Is there any way of recording the > Openlibrary ID (OLID) in a Biblio record so that the cover lookup > will work, even if there is no ISBN or LCCN? > > I've done a (fairly cursory) scan of the documentation but can't > find and reference to where I should put the OLID so that Koha > will look up the cover even if there is no ISBN or LCCN. Of > course the facility may not exist, in which case I'd be grateful > for confirmation from Someone Who Knows. > > Many thanks > > Nigel Titley > > _______________________________________________ > > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-deve l website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
On 24/07/2023 01:11, David Cook wrote:
You could send a request for an "openlibrary" code to be added to the official Standard Identifier Source Codes list: https://www.loc.gov/standards/sourcelist/index.html#maintenance . Honestly, I'm a little surprised there isn't already an entry for it there. I'm sure they'd approve a request for it.
I've put in a request to the LOC. We'll see if anything comes of it. They may request (I would do so in their place) that the request comes from the Open Library itself in which case I'll have to chase that route first. Fingers crossed. Nigel
participants (3)
-
David Cook -
Jonathan Druart -
Nigel Titley