Trans: Update ACM to allow items with no URL defined (http://forums.zotero.org/discussion/18056)
This commit is contained in:
parent
62649255f9
commit
be2ebe767c
1 changed files with 17 additions and 13 deletions
|
@ -6,9 +6,9 @@
|
||||||
"minVersion": "1.0",
|
"minVersion": "1.0",
|
||||||
"maxVersion": "",
|
"maxVersion": "",
|
||||||
"priority": 100,
|
"priority": 100,
|
||||||
"inRepository":"1",
|
"inRepository": true,
|
||||||
"translatorType": 4,
|
"translatorType": 4,
|
||||||
"lastUpdated":"2011-03-24 23:30:00"
|
"lastUpdated": "2011-06-10 01:14:01"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,6 +146,8 @@ function scrape(doc) {
|
||||||
var abs = scrapeAbstract(doc);
|
var abs = scrapeAbstract(doc);
|
||||||
// Type not used, since it was less reliable than BibTeX
|
// Type not used, since it was less reliable than BibTeX
|
||||||
var type = getArticleType(doc, url, nsResolver);
|
var type = getArticleType(doc, url, nsResolver);
|
||||||
|
// Manual journal not used. Some pieces are multiply published, see http://portal.acm.org/citation.cfm?id=52400.52432&coll=DL&dl=GUIDECFID=16073284&CFTOKEN=77905982
|
||||||
|
// and also http://forums.zotero.org/discussion/17532/
|
||||||
var journal = getText("//meta[@name='citation_journal_title']/@content",doc, nsResolver);
|
var journal = getText("//meta[@name='citation_journal_title']/@content",doc, nsResolver);
|
||||||
//Get the bibtex reference for this document as a string
|
//Get the bibtex reference for this document as a string
|
||||||
var bibtex = scrapeBibtex(url, nsResolver);
|
var bibtex = scrapeBibtex(url, nsResolver);
|
||||||
|
@ -166,15 +168,17 @@ function scrape(doc) {
|
||||||
// There were issues with grabbing type from the page;
|
// There were issues with grabbing type from the page;
|
||||||
// see http://forums.zotero.org/discussion/17246/
|
// see http://forums.zotero.org/discussion/17246/
|
||||||
//newItem.itemType= type;
|
//newItem.itemType= type;
|
||||||
if (journal && journal != newItem.publicationTitle) {
|
/*if (journal && journal != newItem.publicationTitle) {
|
||||||
newItem.journalAbbreviation = newItem.publicationTitle;
|
newItem.journalAbbreviation = newItem.publicationTitle;
|
||||||
newItem.publicationTitle = journal;
|
newItem.publicationTitle = journal;
|
||||||
}
|
}*/
|
||||||
// If the URL is just a DOI, clear it.
|
// If the URL is just a DOI, clear it.
|
||||||
if (newItem.url.match(/^http:\/\/doi\.acm\.org\//)) newItem.url = "";
|
if (newItem.url && newItem.url.match(/^http:\/\/doi\.acm\.org\//)) newItem.url = "";
|
||||||
if (newItem.DOI) newItem.DOI = newItem.DOI.replace(/^http:\/\/doi\.acm\.org\//, '');
|
if (newItem.DOI) newItem.DOI = newItem.DOI.replace(/^http:\/\/doi\.acm\.org\//, '');
|
||||||
var acmid = bibtex.match(/acmid = {(\d+)}/);
|
var acmid = bibtex.match(/acmid = {(\d+)}/);
|
||||||
if(acmid) newItem.extra = "ACM ID: "+ acmid[1];
|
if(acmid) newItem.extra = "ACM ID: "+ acmid[1];
|
||||||
|
newItem.place = newItem.archiveLocation;
|
||||||
|
newItem.archiveLocation = null;
|
||||||
//Complete the parsing of the page
|
//Complete the parsing of the page
|
||||||
newItem.complete();
|
newItem.complete();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue