-
Notifications
You must be signed in to change notification settings - Fork 785
/
Copy pathPLoS Journals.js
284 lines (272 loc) · 8.87 KB
/
PLoS Journals.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
{
"translatorID": "9575e804-219e-4cd6-813d-9b690cbfc0fc",
"label": "PLoS Journals",
"creator": "Michael Berkowitz, Rintze Zelle, and Sebastian Karcher",
"target": "^https?://(www\\.plos(one|ntds|compbiol|pathogens|genetics|medicine|biology)\\.org|journals\\.plos\\.org(/\\w+)?)/(search|\\w+/article)",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2017-01-22 19:28:36"
}
/*
***** BEGIN LICENSE BLOCK *****
Copyright © 2012-2016 Rintze Zelle, Michael Berkowitz, and 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
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 <http://www.gnu.org/licenses/>.
***** END LICENSE BLOCK *****
*/
function detectWeb(doc, url) {
if (url.indexOf("Search.action") != -1
|| url.indexOf("browse.action") != -1
|| url.indexOf("browseIssue.action") != -1
|| url.indexOf("/search?") != -1
|| url.indexOf("/search/") != -1
|| url.indexOf("/issue") != -1) {
return getSearchResults(doc, url, true) ? "multiple" : false;
} else if (ZU.xpathText(doc, '//meta[@name="citation_title"]/@content')) {
return "journalArticle";
}
}
function getSearchResults(doc, url, checkOnly) {
var articlex = '//article//a[contains(@href, "/article?id=")]';
var articles = ZU.xpath(doc, articlex),
items = {},
found = false;
for (var i=0; i<articles.length; i++) {
var url = articles[i].href;
var title = ZU.trimInternal(articles[i].textContent);
if (!url || !title) continue;
if (checkOnly) return true;
items[url] = title;
found = true;
}
return found ? items : false;
}
function doWeb(doc, url) {
if (detectWeb(doc, url) == 'multiple') {
Zotero.selectItems(getSearchResults(doc, url), function(items) {
if (!items) return true;
//Z.debug(items)
var urls = [];
for (var i in items) {
urls.push(i);
}
ZU.processDocuments(urls, scrape);
});
} else {
scrape(doc, url);
}
}
function scrape(doc, url) {
var translator = Zotero.loadTranslator('web');
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');//https://github.com/zotero/translators/blob/master/Embedded%20Metadata.js
translator.setDocument(doc);
translator.setHandler('itemDone', function (obj, item) {
item.libraryCatalog = "PLoS Journals";
if (item.abstractNote) {
item.abstractNote = item.abstractNote.replace(/\s*\n\s*/, "\n")
}
item.complete();
});
translator.getTranslatorObject(function(trans) {
trans.doWeb(doc, url);
});
}/** BEGIN TEST CASES **/
var testCases = [
{
"type": "web",
"url": "http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1001090",
"items": [
{
"itemType": "journalArticle",
"title": "The Naturally Processed CD95L Elicits a c-Yes/Calcium/PI3K-Driven Cell Migration Pathway",
"creators": [
{
"firstName": "Sébastien",
"lastName": "Tauzin",
"creatorType": "author"
},
{
"firstName": "Benjamin",
"lastName": "Chaigne-Delalande",
"creatorType": "author"
},
{
"firstName": "Eric",
"lastName": "Selva",
"creatorType": "author"
},
{
"firstName": "Nadine",
"lastName": "Khadra",
"creatorType": "author"
},
{
"firstName": "Sophie",
"lastName": "Daburon",
"creatorType": "author"
},
{
"firstName": "Cécile",
"lastName": "Contin-Bordes",
"creatorType": "author"
},
{
"firstName": "Patrick",
"lastName": "Blanco",
"creatorType": "author"
},
{
"firstName": "Jacques Le",
"lastName": "Seyec",
"creatorType": "author"
},
{
"firstName": "Thomas",
"lastName": "Ducret",
"creatorType": "author"
},
{
"firstName": "Laurent",
"lastName": "Counillon",
"creatorType": "author"
},
{
"firstName": "Jean-François",
"lastName": "Moreau",
"creatorType": "author"
},
{
"firstName": "Paul",
"lastName": "Hofman",
"creatorType": "author"
},
{
"firstName": "Pierre",
"lastName": "Vacher",
"creatorType": "author"
},
{
"firstName": "Patrick",
"lastName": "Legembre",
"creatorType": "author"
}
],
"date": "Jun 21, 2011",
"DOI": "10.1371/journal.pbio.1001090",
"ISSN": "1545-7885",
"abstractNote": "Author Summary The “death receptor” CD95 (also known as Fas) plays an essential role in ensuring immune tolerance of self antigens as well as in the elimination of the body's cells that have been infected or transformed. This receptor is engaged by the membrane-bound ligand CD95L, which can be released into blood circulation after cleavage by metalloproteases. Hitherto, most of the studies on the CD95 signal have been performed with chimeric CD95Ls that mimic the membrane-bound ligand and exhibit a level of aggregation beyond that described for the metalloprotease-cleaved ligand. Multi-aggregated CD95L elicits a caspase-driven apoptotic signal. In this study, we observe that levels of soluble and naturally processed CD95L in sera of patients suffering from lupus correlate with disease severity. Strikingly, although this soluble CD95L fails to trigger cell death unlike its chimeric version, it induces a “non-canonical” Ca2+/c-yes/PI3K-dependent signaling pathway that promotes the transmigration of T-lymphocytes across the endothelial barrier. These findings shed light on an entirely new role for the soluble CD95L that may contribute to local or systemic tissue damage by enhancing the infiltration of activated T-lymphocytes. Overall, these findings underline the importance of revisiting the role of this “apoptotic cytokine” in the context of chronic inflammatory disorders.",
"issue": "6",
"journalAbbreviation": "PLOS Biology",
"libraryCatalog": "PLoS Journals",
"pages": "e1001090",
"publicationTitle": "PLOS Biology",
"url": "http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1001090",
"volume": "9",
"attachments": [
{
"title": "Full Text PDF",
"mimeType": "application/pdf"
},
{
"title": "Snapshot"
}
],
"tags": [
"Apoptosis",
"Apoptotic signaling cascade",
"Cell membranes",
"Cell migration",
"Cell motility",
"Signal processing",
"Systemic lupus erythematosus",
"T cells"
],
"notes": [],
"seeAlso": []
}
]
},
{
"type": "web",
"url": "http://journals.plos.org/plosmedicine/article?id=10.1371/journal.pmed.1000098",
"items": [
{
"itemType": "journalArticle",
"title": "An Economic Evaluation of Venous Thromboembolism Prophylaxis Strategies in Critically Ill Trauma Patients at Risk of Bleeding",
"creators": [
{
"firstName": "T. Carter",
"lastName": "Chiasson",
"creatorType": "author"
},
{
"firstName": "Braden J.",
"lastName": "Manns",
"creatorType": "author"
},
{
"firstName": "Henry Thomas",
"lastName": "Stelfox",
"creatorType": "author"
}
],
"date": "Jun 23, 2009",
"DOI": "10.1371/journal.pmed.1000098",
"ISSN": "1549-1676",
"abstractNote": "Using decision analysis, Henry Stelfox and colleagues estimate the cost-effectiveness of three venous thromboembolism prophylaxis strategies in patients with severe traumatic injuries who were also at risk for bleeding complications.",
"issue": "6",
"journalAbbreviation": "PLOS Medicine",
"libraryCatalog": "PLoS Journals",
"pages": "e1000098",
"publicationTitle": "PLOS Medicine",
"url": "http://journals.plos.org/plosmedicine/article?id=10.1371/journal.pmed.1000098",
"volume": "6",
"attachments": [
{
"title": "Full Text PDF",
"mimeType": "application/pdf"
},
{
"title": "Snapshot"
}
],
"tags": [
"Deep vein thrombosis",
"Hemorrhage",
"Heparin",
"Intensive care units",
"Prophylaxis",
"Pulmonary embolism",
"Traumatic injury",
"Venous thromboembolism"
],
"notes": [],
"seeAlso": []
}
]
},
{
"type": "web",
"url": "http://www.plosmedicine.org/article/browseIssue.action",
"items": "multiple"
},
{
"type": "web",
"url": "http://www.plosbiology.org/search/simple?from=globalSimpleSearch&filterJournals=PLoSBiology&query=amygdala&x=0&y=1",
"items": "multiple"
}
]
/** END TEST CASES **/