Skip to content

Commit

Permalink
Catch rapido loans (#23)
Browse files Browse the repository at this point in the history
* Catch Rapido Loans

* Catch Rapido Loans
  • Loading branch information
denismaier committed May 23, 2024
1 parent 4189114 commit 17f2d6a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Änderungen

## 0.2.10
- Rapido-Titel korrekt anzeigen

## 0.2.9
- Mehrere Bestellcode-Tags korrekt im Feld Band speichern

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Das Addon befindet sich in einem frühen Entwicklungsstadium. Bisher sind nur di

## License

Copyright (C) 2019--2023 Denis Maier
Copyright (C) 2019--2024 Denis Maier

Distributed under the GPLv3 License.
12 changes: 8 additions & 4 deletions chrome/content/scripts/zoteroswisscoveryubbernlocations.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ Zotero.swisscoveryubbernlocations.processXML = async function (item,xml) {
for (const holding of holdings) {
var holdingLibraryCode,
holdingLibrary,
holdingLibraryLocation,
holdingLibraryViaRapido,
holdingLibraryLocation,
holdingFormatted,
holdingItemPolicy,
holdingHoldingsID, // subfield 8
Expand All @@ -308,8 +309,11 @@ Zotero.swisscoveryubbernlocations.processXML = async function (item,xml) {
holdingLibrary = holdingLibraryCode;
}
}
if (holding.querySelector("subfield[code='j']"))
holdingLibraryViaRapido = holding.querySelector("subfield[code='j']").textContent == "RS_BORROW";
if (holding.querySelector("subfield[code='c']"))
holdingLibraryLocation = holding.querySelector("subfield[code='c']").textContent;
if (holdingLibraryLocation.startsWith('Borrowing Location')) holdingLibraryLocation += " (via Rapido)";
if (holding.querySelector("subfield[code='0']"))
holdingBibRecordID = holding.querySelector("subfield[code='0']").textContent;
if (holding.querySelector("subfield[code='8']"))
Expand All @@ -326,9 +330,9 @@ Zotero.swisscoveryubbernlocations.processXML = async function (item,xml) {

// In UB Bern?
// Irgendwo in UB Bern oder Bern Online
if (holdingLibrary.startsWith("Bern UB") || (holdingLibrary == "B405")) isInUBBe = true;
if ((holdingLibrary.startsWith("Bern UB") && !(holdingLibraryViaRapido)) || (holdingLibrary == "B405")) isInUBBe = true;
// Kurierbibliothek
if (kurierbibliothekenUBBe.includes(holdingLibraryCode)) isinUBBeKurierbib = true;
if (kurierbibliothekenUBBe.includes(holdingLibraryCode) && !(holdingLibraryViaRapido)) isinUBBeKurierbib = true;
}}
else {
printHoldingsFormatted += "\nKeine Printbestände vorhanden";
Expand Down Expand Up @@ -374,7 +378,7 @@ Zotero.swisscoveryubbernlocations.processXML2 = async function (xml) {
for (const holding of holdings) {
var holdingLibraryCode,
holdingLibrary,
holdingLibraryLocation,
holdingLibraryLocation,
holdingFormatted,
holdingItemPolicy,
holdingHoldingsID, // subfield 8
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile

VERSION = 0.2.9
VERSION = 0.2.10

build:
7z a -tzip -r zotero-swisscovery-ubbern-locations-$(VERSION).xpi chrome/* defaults/* chrome.manifest install.rdf options.xul
6 changes: 3 additions & 3 deletions update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>0.2.9</em:version>
<em:version>0.2.10</em:version>
<em:targetApplication>
<rdf:Description>
<em:id>zotero@chnm.gmu.edu</em:id>
<em:minVersion>5.0</em:minVersion>
<em:maxVersion>6.*</em:maxVersion>
<em:updateLink>https://github.com/ub-unibe-ch/zotero-swissbib-bb-locations/releases/download/v0.2.9/zotero-swisscovery-ubbern-locations-0.2.9.xpi</em:updateLink>
<em:updateLink>https://github.com/ub-unibe-ch/zotero-swissbib-bb-locations/releases/download/v0.2.9/zotero-swisscovery-ubbern-locations-0.2.10.xpi</em:updateLink>
</rdf:Description>
</em:targetApplication>
<em:targetApplication>
<rdf:Description>
<em:id>juris-m@juris-m.github.io</em:id>
<em:minVersion>5.0</em:minVersion>
<em:maxVersion>6.*</em:maxVersion>
<em:updateLink>https://github.com/ub-unibe-ch/zotero-swissbib-bb-locations/releases/download/v0.2.9/zotero-swisscovery-ubbern-locations-0.2.9.xpi</em:updateLink>
<em:updateLink>https://github.com/ub-unibe-ch/zotero-swissbib-bb-locations/releases/download/v0.2.9/zotero-swisscovery-ubbern-locations-0.2.10.xpi</em:updateLink>
</rdf:Description>
</em:targetApplication>
</rdf:Description>
Expand Down

0 comments on commit 17f2d6a

Please sign in to comment.