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

Add translator for CITATION.cff file references (CFF-References) #3274

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

d33bs
Copy link

@d33bs d33bs commented Mar 17, 2024

This PR extends on the work originally provided by @adam3smith for the CFF translator as a new translator called "CFF-References". The purpose of this translator is to help translate Zotero resources into a CITATION.cff file's references item.

Thank you in advance for any thoughts and feedback you may have! Please don't hesitate to let me know if I may change or improve this to help make it more useful to others.

Closes #3250

@d33bs
Copy link
Author

d33bs commented Mar 18, 2024

I'm uncertain about the best way to proceed with adding tests for a translator. Any guidance would be much appreciated! In case of no reply I'll also reference existing PR's for an idea of how to do this.

@adam3smith
Copy link
Collaborator

We don't currently add export tests

@d33bs
Copy link
Author

d33bs commented Mar 18, 2024

Sounds good, thanks @adam3smith !

CFF-References.js Outdated Show resolved Hide resolved
CFF-References.js Outdated Show resolved Hide resolved
CFF-References.js Outdated Show resolved Hide resolved
CFF-References.js Outdated Show resolved Hide resolved
@d33bs d33bs requested a review from AbeJellinek April 6, 2024 20:31
- Fix writeArray so it works for more than tags
- Fix regex in writeArray
- Remove extra newlines at end of some written values
- Remove link to unrelated localization file
- "collection_title" maps to proceedingsTitle
- Fix repository self-assignment
- Map correspondence authors to "senders" and all primary creator types
  (not just author) to "authors"
- Fix DOI regex for multiline extra
- Remove extra special case for authors and keywords
- Try to avoid outputting invalid YAML for multiline abstracts
- Fix some lint errors
@AbeJellinek
Copy link
Member

@adam3smith: I think this is ready, but it's always good to get a third set of eyes on import/export translators. Look OK?

@AbeJellinek
Copy link
Member

(@d33bs, thanks for adding all those mappings! Sorry again for ballooning the amount of work this translator would need.)

@d33bs
Copy link
Author

d33bs commented May 19, 2024

No worries @AbeJellinek , thank you again for the great feedback - fun to go deeper with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

CITATION.cff: allow any itemType translation (not just data or software)
3 participants