Skip to content

Commit d46d2c5

Browse files
committed
small fixed for BIBSYS, DBLP, Emerald, FT, Galegroup, L'Anne Philologique. Test updates for Dialnet, Die Zeit, Frontiers.
1 parent cd32b4c commit d46d2c5

10 files changed

+164
-123
lines changed

Diff for: BIBSYS.js

+7-16
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsbv",
12-
"lastUpdated": "2012-09-04 21:21:08"
12+
"lastUpdated": "2012-09-23 14:26:52"
1313
}
1414

1515
function detectWeb(doc, url) {
@@ -54,8 +54,9 @@ function doWeb(doc, url) {
5454
var singlereg=new RegExp("http://ask\.bibsys\.no/ask/action/show");
5555
if(singlereg.test(url)) {
5656
var urlstring="http://ask.bibsys.no/ask/action/show";
57-
var data="visningsformat=fortekst_m_eksemplarer&eksportFormat=refmanager&eksportEpostAdresse=&eksportEpostFormat=fortekst&cmd=sendtil";
57+
var data="visningsformat=ris&eksportFormat=refmanager&eksportEpostAdresse=&eksportEpostFormat=fortekst&cmd=sendtil";
5858
Zotero.Utilities.HTTP.doPost(urlstring, data, function(text) {
59+
//Z.debug(text)
5960
var trans=Zotero.loadTranslator("import");
6061
trans.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
6162
trans.setString(text);
@@ -89,26 +90,16 @@ var testCases = [
8990
"note": "<p>Bibliografi: s. 297-322</p>"
9091
}
9192
],
92-
"tags": [
93-
"faglærte",
94-
"yrkesopplæring",
95-
"arbeidstakere",
96-
"opplæring",
97-
"Storbritannia",
98-
"USA",
99-
"Tyskland",
100-
"Japan"
101-
],
93+
"tags": [],
10294
"seeAlso": [],
10395
"attachments": [],
104-
"title": "How institutions evolve: the political economy of skills in Germany, Britain, the United States, and Japan",
96+
"title": "How institutions evolve",
10597
"date": "2004",
10698
"numPages": "XV, 333 s.",
107-
"place": "Cambridge",
10899
"publisher": "Cambridge University Press",
100+
"place": "Cambridge",
109101
"ISBN": "0-521-83768-5",
110-
"libraryCatalog": "BIBSYS",
111-
"shortTitle": "How institutions evolve"
102+
"libraryCatalog": "BIBSYS"
112103
}
113104
]
114105
}

Diff for: DBLP Computer Science Bibliography.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsv",
12-
"lastUpdated": "2012-04-04 12:53:51"
12+
"lastUpdated": "2012-09-23 14:45:40"
1313
}
1414

1515
function detectWeb(doc, url) {
@@ -108,7 +108,7 @@ function doWeb(doc, url) {
108108
if (detectWeb(doc, url) == "multiple") {
109109
var items = new Object();
110110
var articles = new Array();
111-
var rows = ZU.xpath(doc, '//ul/li')
111+
var rows = ZU.xpath(doc, '//body/ul/li')
112112
for (i in rows){
113113
var title = ZU.xpathText(rows[i], './b');
114114
var link = ZU.xpathText(rows[i], './a[contains(@href, "rec/bibtex") and not(contains(@href, ".xml"))]/@href');

Diff for: Dialnet.js

+8-10
Large diffs are not rendered by default.

Diff for: Die Zeit.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsibv",
12-
"lastUpdated": "2012-08-06 19:23:07"
12+
"lastUpdated": "2012-09-23 14:55:28"
1313
}
1414

1515
/*
@@ -183,10 +183,13 @@ var testCases = [
183183
"notes": [],
184184
"tags": [
185185
"Libyen",
186+
"Stadt",
186187
"Mustafa Abdel Dschalil",
188+
"Berg",
189+
"Hauptstadt",
187190
"Bani Walid",
188-
"Europa",
189-
"Paris",
191+
"Präsident",
192+
"Innenminister",
190193
"Tripolis"
191194
],
192195
"seeAlso": [],
@@ -226,13 +229,13 @@ var testCases = [
226229
"Philipp Lahm",
227230
"Angela Merkel",
228231
"Andreas Ottl",
232+
"Fußball",
233+
"Bundesliga",
229234
"FC Bayern München",
230235
"Robert Enke",
231-
"Mesut Özil",
232-
"Bundesliga",
233-
"Fußball",
236+
"SV Werder Bremen",
234237
"Fifa",
235-
"SV Werder Bremen"
238+
"Trainer"
236239
],
237240
"seeAlso": [],
238241
"attachments": [

Diff for: Douban.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsv",
12-
"lastUpdated": "2012-05-11 06:22:36"
12+
"lastUpdated": "2012-09-23 14:56:49"
1313
}
1414

1515
/*
@@ -327,8 +327,8 @@ var testCases = [
327327
"ISBN": "9780099448822",
328328
"numPages": "400",
329329
"publisher": "Vintage",
330-
"date": "2000",
331-
"abstractNote": "图书简介:\n\nNorwegian Wood (ノルウェイの森, Noruwei no Mori?) is a 1987 novel by Japanese author Haruki Murakami.\nThe novel is a nostalgic story of loss and sexuality. The story's protagonist and narrator is Toru Watanabe, who looks back on his days as a freshman university student living in Tokyo. Through Toru's reminiscences we see him develop relationships with two very different women — the beautiful yet emotionally troubled Naoko, and the outgoing, lively Midori.\nThe novel is set in Tokyo during the late 1960s, a time when Japanese students, like those of many other nations, were protesting against the established order. While it serves as the backdrop against which the events of the novel unfold, Murakami (through the eyes of Toru and Midori) portrays the student movement as largely weak-willed and hypocritical.\nNorwegian Wood was hugely popular with Japanese youth and made Murakami somewhat of a superstar in his native country (apparently much to his dismay at the time). In translation it is also one of the most-read Japanese novels in the Western Hemisphere.[citation needed]\nDespite its mainstream popularity in Japan, Murakami's contemporary readership saw Norwegian Wood as an unwelcome departure[citation needed] from his by-then established style of energetic prose flavoured with the unexpected and supernatural (as exemplified by Hard-Boiled Wonderland and the End of the World, released two years earlier). Yet, as translator Jay Rubin observes in the translator's note to the 2000 English edition, Norwegian Wood retains much of the complexity and symbolism characteristic of Murakami's work and is thus &quot;by no means just a love story.&quot;  \n\n作者简介:\n  Haruki Murakami (村上春樹, Murakami Haruki?, born January 12, 1949) is a popular contemporary Japanese writer and translator.[1] His work has been described by the Virginia Quarterly Review as &quot;easily accessible, yet profoundly complex.&quot;",
330+
"date": "2003-06-30",
331+
"abstractNote": "图书简介:\n\nWhen he hears her favourite Beatles song, Toru Watanabe recalls his first love Naoko, the girlfriend of his best friend Kizuki. Immediately he is transported back almost twenty years to his student days in Tokyo, adrift in a world of uneasy friendships, casual sex, passion, loss and desire - to a time when an impetuous young woman called Midori marches into his life and he has to choose between the future and the past. (20021018)\n点击链接进入中文版: \n挪威的森林   \n\n作者简介:\n  Haruki Murakami (村上春樹, Murakami Haruki, born January 12, 1949) is a popular contemporary Japanese writer and translator.His work has been described by the Virginia Quarterly Review as &quot;easily accessible, yet profoundly complex.&quot;",
332332
"libraryCatalog": "Douban",
333333
"accessDate": "CURRENT_TIMESTAMP"
334334
}

Diff for: Emerald Publishing.js

+10-13
Large diffs are not rendered by default.

Diff for: Financial Times.js

+4-4
Large diffs are not rendered by default.

Diff for: Frontiers.js

+80-60
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsib",
12-
"lastUpdated": "2012-03-05 17:51:08"
12+
"lastUpdated": "2012-09-23 15:23:14"
1313
}
1414

1515
/*
@@ -201,63 +201,83 @@ function scrape(doc, url) {
201201
}
202202

203203
/** BEGIN TEST CASES **/
204-
var testCases = [{
205-
"type": "web",
206-
"url": "http://www.frontiersin.org/neuropharmacology/10.3389/fnins.2010.00191/abstract",
207-
"items": [{
208-
"itemType": "journalArticle",
209-
"creators": [{
210-
"firstName": "Thomas A. van",
211-
"lastName": "Essen",
212-
"creatorType": "author"
213-
}, {
214-
"firstName": "Ruben S. van der",
215-
"lastName": "Giessen",
216-
"creatorType": "author"
217-
}, {
218-
"firstName": "Sebastiaan K. E.",
219-
"lastName": "Koekkoek",
220-
"creatorType": "author"
221-
}, {
222-
"firstName": "Frans",
223-
"lastName": "VanderWerf",
224-
"creatorType": "author"
225-
}, {
226-
"firstName": "Chris I. De",
227-
"lastName": "Zeeuw",
228-
"creatorType": "author"
229-
}, {
230-
"firstName": "Perry J. J. van",
231-
"lastName": "Genderen",
232-
"creatorType": "author"
233-
}, {
234-
"firstName": "David",
235-
"lastName": "Overbosch",
236-
"creatorType": "author"
237-
}, {
238-
"firstName": "Marcel T. G. de",
239-
"lastName": "Jeu",
240-
"creatorType": "author"
241-
}],
242-
"notes": [],
243-
"tags": ["mefloquine", "gap junctions", "motor behavior", "eye-blink conditioning", "cerebellum"],
244-
"seeAlso": [],
245-
"attachments": [{"title":"Full Text PDF","mimeType":"application/pdf"}],
204+
var testCases = [
205+
{
206+
"type": "web",
246207
"url": "http://www.frontiersin.org/neuropharmacology/10.3389/fnins.2010.00191/abstract",
247-
"title": "Anti-malaria drug mefloquine induces motor learning deficits in humans",
248-
"publicationTitle": "Frontiers in Neuropharmacology",
249-
"abstractNote": "Mefloquine (a marketed anti-malaria drug) prophylaxis has a high risk of causing adverse events. Interestingly, animal studies have shown that mefloquine imposes a major deficit in motor learning skills by affecting the connexin 36 gap junctions of the inferior olive. We were therefore interested in assessing whether mefloquine might induce similar effects in humans. The main aim of this study was to investigate the effect of mefloquine on olivary-related motor performance and motor learning tasks in humans. We subjected nine participants to voluntary motor timing (dart throwing task), perceptual timing (rhythm perceptual task) and reflex timing tasks (eye-blink task) before and 24 h after the intake of mefloquine. The influence of mefloquine on motor learning was assessed by subjecting participants with and without mefloquine intake (controls: n = 11 vs mefloquine: n = 8) to an eye-blink conditioning task. Voluntary motor performance, perceptual timing, and reflex blinking were not affected by mefloquine use. However, the influence of mefloquine on motor learning was substantial; both learning speed as well as learning capacity was impaired by mefloquine use. Our data suggest that mefloquine disturbs motor learning skills. This adverse effect can have clinical as well as social clinical implications for mefloquine users. Therefore, this side-effect of mefloquine should be further investigated and recognized by clinicians.",
250-
"DOI": "10.3389/fnins.2010.00191",
251-
"pages": "191",
252-
"date": "2010",
253-
"journalAbbreviation": "Front. Neurosci",
254-
"volume": "4",
255-
"libraryCatalog": "Frontiers",
256-
"accessDate": "CURRENT_TIMESTAMP"
257-
}]
258-
}, {
259-
"type": "web",
260-
"url": "http://www.frontiersin.org/SearchData.aspx?sq=key+visual+features",
261-
"items": "multiple"
262-
}]
263-
/** END TEST CASES **/
208+
"items": [
209+
{
210+
"itemType": "journalArticle",
211+
"creators": [
212+
{
213+
"firstName": "Thomas A. van",
214+
"lastName": "Essen",
215+
"creatorType": "author"
216+
},
217+
{
218+
"firstName": "Ruben S. van der",
219+
"lastName": "Giessen",
220+
"creatorType": "author"
221+
},
222+
{
223+
"firstName": "Sebastiaan K. E.",
224+
"lastName": "Koekkoek",
225+
"creatorType": "author"
226+
},
227+
{
228+
"firstName": "Frans",
229+
"lastName": "VanderWerf",
230+
"creatorType": "author"
231+
},
232+
{
233+
"firstName": "Chris I. De",
234+
"lastName": "Zeeuw",
235+
"creatorType": "author"
236+
},
237+
{
238+
"firstName": "Perry J. J. van",
239+
"lastName": "Genderen",
240+
"creatorType": "author"
241+
},
242+
{
243+
"firstName": "David",
244+
"lastName": "Overbosch",
245+
"creatorType": "author"
246+
},
247+
{
248+
"firstName": "Marcel T. G. de",
249+
"lastName": "Jeu",
250+
"creatorType": "author"
251+
}
252+
],
253+
"notes": [],
254+
"tags": [
255+
"mefloquine",
256+
"gap junctions",
257+
"motor behavior",
258+
"eye-blink conditioning",
259+
"cerebellum"
260+
],
261+
"seeAlso": [],
262+
"attachments": [],
263+
"url": "http://www.frontiersin.org/neuropharmacology/10.3389/fnins.2010.00191/abstract",
264+
"title": "Anti-malaria drug mefloquine induces motor learning deficits in humans",
265+
"publicationTitle": "Frontiers in Neuropharmacology",
266+
"abstractNote": "Mefloquine (a marketed anti-malaria drug) prophylaxis has a high risk of causing adverse events. Interestingly, animal studies have shown that mefloquine imposes a major deficit in motor learning skills by affecting the connexin 36 gap junctions of the inferior olive. We were therefore interested in assessing whether mefloquine might induce similar effects in humans. The main aim of this study was to investigate the effect of mefloquine on olivary-related motor performance and motor learning tasks in humans. We subjected nine participants to voluntary motor timing (dart throwing task), perceptual timing (rhythm perceptual task) and reflex timing tasks (eye-blink task) before and 24 h after the intake of mefloquine. The influence of mefloquine on motor learning was assessed by subjecting participants with and without mefloquine intake (controls: n = 11 vs mefloquine: n = 8) to an eye-blink conditioning task. Voluntary motor performance, perceptual timing, and reflex blinking were not affected by mefloquine use. However, the influence of mefloquine on motor learning was substantial; both learning speed as well as learning capacity was impaired by mefloquine use. Our data suggest that mefloquine disturbs motor learning skills. This adverse effect can have clinical as well as social clinical implications for mefloquine users. Therefore, this side-effect of mefloquine should be further investigated and recognized by clinicians.",
267+
"DOI": "10.3389/fnins.2010.00191",
268+
"pages": "191",
269+
"date": "2010",
270+
"journalAbbreviation": "Front. Neurosci",
271+
"volume": "4",
272+
"libraryCatalog": "Frontiers",
273+
"accessDate": "CURRENT_TIMESTAMP"
274+
}
275+
]
276+
},
277+
{
278+
"type": "web",
279+
"url": "http://www.frontiersin.org/SearchData.aspx?sq=key+visual+features",
280+
"items": "multiple"
281+
}
282+
]
283+
/** END TEST CASES **/

Diff for: Galegroup.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsib",
12-
"lastUpdated": "2012-05-13 23:17:56"
12+
"lastUpdated": "2012-09-23 15:27:49"
1313
}
1414

1515
/*
@@ -70,12 +70,10 @@ function parseRIS(url) {
7070
}
7171

7272
Zotero.Utilities.HTTP.doGet(url, function (text) {
73+
text = text.trim();
7374
//gale puts issue numbers in M1
7475
text = text.replace(/M1\s*\-/, "IS -");
7576
//get the LA tag content until we introduce this in the RIS translator
76-
if (text.match(/LA\s*\-/)) {
77-
var language = text.match(/(?:LA\s*\-)(.+)/)[1];
78-
}
7977
var translator = Zotero.loadTranslator("import");
8078
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
8179
translator.setString(text);
@@ -84,7 +82,6 @@ function parseRIS(url) {
8482
for (i in item.attachments) {
8583
item.attachments[i].url = item.attachments[i].url.replace(/^https?:\/\/.+?\//, host);
8684
}
87-
item.language = language;
8885
item.complete();
8986
});
9087
translator.translate();

Diff for: L'Annee Philologique.js

+38-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"translatorID": "e04e4bab-64c2-4b9a-b6c2-7fb186281969",
33
"label": "L'Annee Philologique",
4-
"creator": "Sebsatian Karcher",
5-
"target": "^https?://www\\.annee-philologique\\.com/index\\.php",
4+
"creator": "Sebastian Karcher",
5+
"target": "^https?://www\\.annee-philologique\\.com/(aph)?/?index\\.php",
66
"minVersion": "3.0",
77
"maxVersion": "",
88
"priority": 100,
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "g",
12-
"lastUpdated": "2012-06-25 12:12:43"
12+
"lastUpdated": "2012-09-23 13:59:39"
1313
}
1414

1515
/*
@@ -80,6 +80,7 @@ function scrape(doc, url) {
8080
var num = url.match(/&num=\d+/)[0].replace(/^&/, "");
8181
var critere = encodeURIComponent(ZU.xpathText(doc, '//input[@id="critere"]/@value'));
8282
var get = 'http://www.annee-philologique.com/index.php?do=export_ris&' + num;
83+
//Z.debug(get)
8384
var post = num + '&js_actif=1&critere=' + critere + '&noticesformat=noticesformat3&mailExport=&inputnbselect=0&inputnbnotselect=4&inputumcourant=1';
8485
//Z.debug(post);
8586
Zotero.Utilities.HTTP.doPost(get, post, function (text) {
@@ -114,3 +115,37 @@ function scrape(doc, url) {
114115
});
115116
}
116117
//no permalinks --> no test
118+
/** BEGIN TEST CASES **/
119+
var testCases = [
120+
{
121+
"type": "web",
122+
"url": "www.annee-philologique.com/aph/index.php?do=uneNotice&id=31-02979",
123+
"items": [
124+
{
125+
"itemType": "book",
126+
"creators": [
127+
{
128+
"lastName": "Shedd",
129+
"creatorType": "author",
130+
"firstName": " R. P."
131+
}
132+
],
133+
"notes": [],
134+
"tags": [],
135+
"seeAlso": [],
136+
"attachments": [
137+
{
138+
"title": "L'Année Philologique Snapshot",
139+
"mimeType": "text/html"
140+
}
141+
],
142+
"title": "Man in community. A study of St. Paul's application of Old Testament and early Jewish conceptions of human solidarity",
143+
"date": "1958",
144+
"publisher": "Epworth Pr.",
145+
"place": "London",
146+
"libraryCatalog": "L'Annee Philologique"
147+
}
148+
]
149+
}
150+
]
151+
/** END TEST CASES **/

0 commit comments

Comments
 (0)