Opened 9 years ago

Closed 9 years ago

#918 closed enhancement (fixed)

Add DOI support to ACM translator

Reported by: dstillman Owned by: mikowitz
Priority: minor Milestone: 1.0.4
Component: translators Version: 1.0
Keywords: Cc: nxmehta

Description

Patch will be attached by nxmehta

http://forums.zotero.org/discussion/1884/#Item_13

Attachments (1)

ACM.txt (3.1 KB) - added by nxmehta 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by nxmehta

Didn't have the old source of the translator to diff and create a patch so just uploaded the entire source. I made it so it will parse DOI entries. I also fixed the keyword parsing as it was adding all sorts of whitespace to keywords which mangled displayed tags in the tag browser.

This is literally the first time I've ever touched JavaScript or XPath, so if I did something stupid feel free to clean it up. It works fine though.

comment:2 Changed 9 years ago by dstillman

  • Cc nxmehta added

Looks like the line

keywords.push(keywordLink.textContent.toLowerCase().match(/[^a-z]*(.*)/)[1]);

would strip any accented characters too (though it's possible the keywords are all ASCII). Is it just whitespace that's the issue? If so, you can use Zotero.Utilities.trim() instead.

Changed 9 years ago by nxmehta

comment:3 Changed 9 years ago by nxmehta

Thanks for the tip! I updated the code.

comment:4 Changed 9 years ago by mikowitz

  • Resolution set to fixed
  • Status changed from new to closed

(In [2320]) -Closes #918. Adds DOI support to ACM translator.

Note: See TracTickets for help on using tickets.