diff --git a/PhilPapers.js b/PhilPapers.js
index f9406dbaa00..dd4ffa3caf4 100644
--- a/PhilPapers.js
+++ b/PhilPapers.js
@@ -9,93 +9,109 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2021-08-13 23:13:58"
+ "lastUpdated": "2023-09-10 18:24:30"
}
/*
***** BEGIN LICENSE BLOCK *****
-
- Copyright © 2012 Sebastian Karcher
+
+ Copyright © 2023 Sebastian Karcher
+
This file is part of Zotero.
-
+
Zotero is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
Zotero is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
- along with Zotero. If not, see
.+<\/pre>/)[0]; - var url = "/rec/" + id; - var translator = Zotero.loadTranslator("import"); - translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); - translator.setString(bibtex); - translator.setHandler("itemDone", function (obj, item) { - if (isPhilArchive) { - item.libraryCatalog = 'PhilArchive'; - item.url = `https://philarchive.org/rec/${id}`; // full-text - item.attachments.push({ - title: 'Full Text PDF', - mimeType: 'application/pdf', - url: `/archive/${id}` - }); - } - - item.attachments.push({ url, title: "Snapshot", mimeType: "text/html" }); - item.complete(); - }); - translator.translate(); + let bibUrl = "https://philpapers.org/export.html?__format=bib&eIds=" + id + "&formatName=BibTeX"; + let bibText = await requestText(bibUrl); + bibText = bibText.replace(/\n/g, "").match(/.+<\/pre>/)[0]; + let url = "/rec/" + id; + let translator = Zotero.loadTranslator("import"); + translator.setTranslator('9cb70025-a888-4a29-a210-93ec52da40d4'); + translator.setString(bibText); + translator.setHandler('itemDone', (_obj, item) => { + if (isPhilArchive) { + item.libraryCatalog = 'PhilArchive'; + item.url = `https://philarchive.org/rec/${id}`; // full-text + item.attachments.push({ + title: 'Full Text PDF', + mimeType: 'application/pdf', + url: `/archive/${id}` + }); + } + else { + item.attachments.push({ url, + title: 'Snapshot', + mimeType: 'text/html' }); + } + item.complete(); }); + await translator.translate(); } } @@ -107,7 +123,7 @@ var testCases = [ "items": [ { "itemType": "journalArticle", - "title": "Observation, Character, and A Purely First-Person Point of View", + "title": "Observation, Character, and a Purely First-Person Point of View", "creators": [ { "firstName": "Josep E.", @@ -156,7 +172,7 @@ var testCases = [ "items": [ { "itemType": "journalArticle", - "title": "Norm-Based Governance for a New Era: Collective Action in the Face of Hyper-Politicization", + "title": "Norm-Based Governance for a New Era: Lessons From Climate Change and Covid-19", "creators": [ { "firstName": "Leigh", @@ -174,19 +190,18 @@ var testCases = [ "creatorType": "author" } ], - "itemID": "RaymondForthcoming-RAYNGF", + "date": "2021", + "itemID": "Raymond2021-RAYNGF", "libraryCatalog": "PhilArchive", + "pages": "1–14", "publicationTitle": "Perspectives on Politics", "shortTitle": "Norm-Based Governance for a New Era", "url": "https://philarchive.org/rec/RAYNGF", + "volume": "1", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [], @@ -200,7 +215,7 @@ var testCases = [ "url": "https://philarchive.org/rec/LANTEO-39", "items": [ { - "itemType": "manuscript", + "itemType": "journalArticle", "title": "The Ethics of Partiality", "creators": [ { @@ -209,17 +224,19 @@ var testCases = [ "creatorType": "author" } ], - "itemID": "LangeManuscript-LANTEO-39", + "date": "2022", + "DOI": "10.1111/phc3.12860", + "issue": "8", + "itemID": "Lange2022-LANTEO-39", "libraryCatalog": "PhilArchive", + "pages": "1–15", + "publicationTitle": "Philosophy Compass", "url": "https://philarchive.org/rec/LANTEO-39", + "volume": "1", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [],