Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACM: Journal article saved as document #2162

Closed
dstillman opened this issue Apr 15, 2020 · 3 comments
Closed

ACM: Journal article saved as document #2162

dstillman opened this issue Apr 15, 2020 · 3 comments

Comments

@dstillman
Copy link
Member

Reported here: https://forums.zotero.org/discussion/82523/acm-article-saves-as-document

On https://dl.acm.org/doi/10.1145/3230742, Zotero detects a journal article but saves a document item, and because of that various fields are missing.

If I'm reading things right, the new ACM translator by @GuyAglionby makes a request to ACM's exportCiteProcCitation endpoint, which returns JSON with a custom, invalid CSL style for BibTeX output along with some invalid CSL-JSON data. The translator lowercases their invalid uppercase types, but then just runs it through itemFromCSLJSON(). Unfortunately, that's not sufficient, since they're not actually serving CSL-JSON that accurately describes the item — their concern seems to just be outputting correct BibTeX or Refer, so type="ARTICLE ARTICLE_JOURNAL ARTICLE_MAGAZINE ARTICLE_NEWSPAPER" all simply output @article in the BibTeX. (I'm not sure if they're using a custom CSL processor or just something that happens to be forgiving with invalid types and other validation errors.) In this case, the type is ARTICLE, but the (lowercased) article CSL type is document in Zotero, not journalArticle like it is from the BibTeX @article.

I haven't looked to see what other problems there might be in the CSL-JSON, but I'd guess that it'd be safer to simply use their BibTeX output instead and make some of the same tweaks to that.

@GuyAglionby, any reason we're not doing that?

@bwiernik
Copy link
Contributor

Does someone have a contact at ACM that we could see if they can fix their CSL-JSON?

@GuyAglionby
Copy link
Contributor

The exportCiteProcCitation endpoint is how their frontend gets the data to subsequently format as BibTex etc. The translation from CSL-JSON is done on the client side using the provided CSL style, so I think it would be difficult to grab the BibTeX directly.

I guess a stopgap would be to manually create a mapping from their style to something that itemFromCSLJSON() will understand and then apply it to the CSL-JSON, but it's a bodge. I'm not sure if something changed recently on either the ACM or Zotero side, as it was definitely working before.

@dstillman
Copy link
Member Author

Fixed. Looks like it was a change — some tests were failing because of it. After treating ARTICLE as ARTICLE_JOURNAL, all tests are passing.

MylesFTOP pushed a commit to MylesFTOP/translators that referenced this issue Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants