Pushed NIPS, PROLA, BibTeX (over the past few days)
This commit is contained in:
parent
028b152ff8
commit
91c400c8e6
3 changed files with 32 additions and 28 deletions
|
@ -8,7 +8,7 @@
|
|||
"maxVersion":"",
|
||||
"priority":200,
|
||||
"inRepository":true,
|
||||
"lastUpdated":"2009-08-21 15:00:00"
|
||||
"lastUpdated":"2009-12-28 01:50:00"
|
||||
}
|
||||
|
||||
Zotero.configure("dataMode", "block");
|
||||
|
@ -762,6 +762,7 @@ var mappingTable = {
|
|||
"\u00C2":"\\^{A}", // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
"\u00C3":"\\~{A}", // LATIN CAPITAL LETTER A WITH TILDE
|
||||
"\u00C4":"\\\"{A}", // LATIN CAPITAL LETTER A WITH DIAERESIS
|
||||
"\u00C5":"\\r{A}", // LATIN CAPITAL LETTER A WITH RING ABOVE
|
||||
"\u00C7":"\\c{C}", // LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
"\u00C8":"\\`{E}", // LATIN CAPITAL LETTER E WITH GRAVE
|
||||
"\u00C9":"\\'{E}", // LATIN CAPITAL LETTER E WITH ACUTE
|
||||
|
@ -787,6 +788,7 @@ var mappingTable = {
|
|||
"\u00E2":"\\^{a}", // LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
"\u00E3":"\\~{a}", // LATIN SMALL LETTER A WITH TILDE
|
||||
"\u00E4":"\\\"{a}", // LATIN SMALL LETTER A WITH DIAERESIS
|
||||
"\u00E5":"\\r{a}", // LATIN SMALL LETTER A WITH RING ABOVE
|
||||
"\u00E7":"\\c{c}", // LATIN SMALL LETTER C WITH CEDILLA
|
||||
"\u00E8":"\\`{e}", // LATIN SMALL LETTER E WITH GRAVE
|
||||
"\u00E9":"\\'{e}", // LATIN SMALL LETTER E WITH ACUTE
|
||||
|
@ -1231,6 +1233,7 @@ var reversemappingTable = {
|
|||
"\\^{A}" : "\u00C2", // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
"\\~{A}" : "\u00C3", // LATIN CAPITAL LETTER A WITH TILDE
|
||||
"\\\"{A}" : "\u00C4", // LATIN CAPITAL LETTER A WITH DIAERESIS
|
||||
"\\r{A}" : "\u00C5", // LATIN CAPITAL LETTER A WITH RING ABOVE
|
||||
"\\c{C}" : "\u00C7", // LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
"\\`{E}" : "\u00C8", // LATIN CAPITAL LETTER E WITH GRAVE
|
||||
"\\'{E}" : "\u00C9", // LATIN CAPITAL LETTER E WITH ACUTE
|
||||
|
@ -1256,6 +1259,7 @@ var reversemappingTable = {
|
|||
"\\^{a}" : "\u00E2", // LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
"\\~{a}" : "\u00E3", // LATIN SMALL LETTER A WITH TILDE
|
||||
"\\\"{a}" : "\u00E4", // LATIN SMALL LETTER A WITH DIAERESIS
|
||||
"\\r{a}" : "\u00E5", // LATIN SMALL LETTER A WITH RING ABOVE
|
||||
"\\c{c}" : "\u00E7", // LATIN SMALL LETTER C WITH CEDILLA
|
||||
"\\`{e}" : "\u00E8", // LATIN SMALL LETTER E WITH GRAVE
|
||||
"\\'{e}" : "\u00E9", // LATIN SMALL LETTER E WITH ACUTE
|
||||
|
@ -1551,6 +1555,10 @@ function processField(item, field, value) {
|
|||
// parse authors/editors/translators
|
||||
var names = value.split(/ and /i); // now case insensitive
|
||||
for each(var name in names) {
|
||||
// skip empty names
|
||||
if (Zotero.Utilities.trim(name) == '') {
|
||||
continue;
|
||||
}
|
||||
item.creators.push(Zotero.Utilities.cleanAuthor(name, field,
|
||||
(name.indexOf(",") != -1)));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"maxVersion":"",
|
||||
"priority":100,
|
||||
"inRepository":true,
|
||||
"lastUpdated":"2009-01-08 08:19:07"
|
||||
"lastUpdated":"2009-12-26 23:15:00"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
|
@ -58,7 +58,7 @@ function doWeb(doc, url) {
|
|||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
});
|
||||
}, null, 'latin1');
|
||||
}, function() {Zotero.done();});
|
||||
Zotero.wait();
|
||||
}
|
|
@ -3,22 +3,25 @@
|
|||
"translatorType":4,
|
||||
"label":"Neural Information Processing Systems",
|
||||
"creator":"Fei Qi",
|
||||
"target":"http://books\\.nips\\.cc/nips\\d+\\.html",
|
||||
"target":"^http://books.nips.cc/",
|
||||
"minVersion":"1.0.0b4.r5",
|
||||
"maxVersion":"",
|
||||
"priority":100,
|
||||
"inRepository":false,
|
||||
"lastUpdated":"2009-05-05 07:15:00"
|
||||
"lastUpdated":"2009-12-26 06:00:00"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
return "multiple";
|
||||
var contRe = /(nips\d+)/;
|
||||
var m = contRe.exec( url );
|
||||
if (m) return "multiple";
|
||||
return false;
|
||||
}
|
||||
|
||||
function grabCitation( paper ) {
|
||||
// Zotero.debug( paper.title );
|
||||
// Zotero.debug( paper.pdf );
|
||||
// Zotero.debug( paper.bib );
|
||||
//Zotero.debug( paper.title );
|
||||
//Zotero.debug( paper.pdf );
|
||||
//Zotero.debug( paper.bib );
|
||||
Zotero.Utilities.HTTP.doGet( paper.bib, function( text ) {
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4");
|
||||
|
@ -29,19 +32,15 @@ function grabCitation( paper ) {
|
|||
item.complete();
|
||||
} );
|
||||
translator.translate();
|
||||
}, function() {Zotero.done();}, null);
|
||||
} );
|
||||
}
|
||||
|
||||
function doWeb( doc, url ) {
|
||||
var n = doc.documentElement.namespaceURI;
|
||||
var ns = n ? function(prefix) {} : null;
|
||||
// if( doc.title.match( "Search" ) ){
|
||||
// var titleRe = '//i';
|
||||
// var urlRe = '//a';
|
||||
//} else {
|
||||
var titleRe = '//table//td/b';
|
||||
var urlRe = '//table//td/a';
|
||||
//}
|
||||
var titleRe = '//table//td/b';
|
||||
var urlRe = '//table//td/a';
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
// Retrive items
|
||||
var items = new Object();
|
||||
|
@ -54,21 +53,18 @@ function doWeb( doc, url ) {
|
|||
var idx = 0;
|
||||
while( title && urls ) {
|
||||
var art = new Object;
|
||||
// Zotero.debug( title.textContent );
|
||||
items[idx] = title.textContent;
|
||||
art.title = items[idx];
|
||||
var urlnum = 0;
|
||||
while( urlnum < 2 && url ) {
|
||||
if( 0 <= url.textContent.search( 'pdf' ) ) {
|
||||
art.pdf = url.href;
|
||||
urlnum++;
|
||||
}
|
||||
if( 0 <= url.textContent.search( 'bib' ) ) {
|
||||
art.bib = url.href;
|
||||
urlnum++;
|
||||
}
|
||||
while( 0 > url.textContent.search( 'bib' ) )
|
||||
{
|
||||
url = urls.iterateNext();
|
||||
}
|
||||
art.bib = url.href;
|
||||
art.pdf = url.href.replace( 'bib', 'pdf' );
|
||||
// Zotero.debug( art.title );
|
||||
// Zotero.debug( art.pdf );
|
||||
// Zotero.debug( art.bib );
|
||||
// Zotero.debug( url.href );
|
||||
arts.push( art );
|
||||
idx++;
|
||||
title = titles.iterateNext();
|
||||
|
|
Loading…
Reference in a new issue