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 print method(s) for ZenodoRecord #66

Closed
ThierryO opened this issue Jan 10, 2022 · 5 comments
Closed

Add print method(s) for ZenodoRecord #66

ThierryO opened this issue Jan 10, 2022 · 5 comments
Assignees
Labels
Milestone

Comments

@ThierryO
Copy link

Currently the user gets the list of public elements, which can be intimidating. Maybe display the citation instead? E.g. the bibtex format?

@eblondel eblondel added the enhancement New feature or request label Jan 17, 2022
@eblondel
Copy link
Owner

Thanks @ThierryO yes it's on the wishlist to improve the print method associated to zenodo records. Not sure if the bibtex format will be implemented, but the idea is to get a print of all metadata elements as handled in the Zenodo API model.

@eblondel eblondel self-assigned this Jan 17, 2022
@eblondel eblondel added this to the 0.5 milestone Apr 8, 2022
@eblondel eblondel changed the title suggestion: add a print method for ZenodoRecord Add a print method(s) for ZenodoRecord Apr 8, 2022
@eblondel
Copy link
Owner

eblondel commented Apr 8, 2022

@ThierryO i've done a 1st implementation with 2695d84

By default, the print uses an "internal" format, for which I tried to make a first version, but that deserves some improvements (probably to have it implemented recursively). The argument "format" allows you to specify other formats among those supported as Zenodo export formats. This is only available for published records (ie that have already been published on Zenodo with a DOI).

Example (with the BibTeX printing):

zen = ZenodoManager$new(logger = "DEBUG")
rec = zen$getRecordByConceptDOI("10.5281/zenodo.2547036")
rec #see the default printing
rec$print(format = "BibTeX") #printing as BibTeX

Let me know if it is what you had in mind

@eblondel eblondel modified the milestones: 0.5, 0.6 Apr 8, 2022
@eblondel eblondel changed the title Add a print method(s) for ZenodoRecord Add print method(s) for ZenodoRecord Apr 9, 2022
@ThierryO
Copy link
Author

This is much more useful. The bibtex seems fine as is. The default provides alot (probably all) information and is a bit harder to scan for the information one is looking for. Maybe add the fields used in the bibtex format at the bottom of the default printing with a nicer formatting?

Here are a few more examples. I noticed that the default printing displays the version as NULL

# R package
rec = zen$getRecordByDOI("10.5281/zenodo.6368129")
rec #see the default printing
rec$print(format = "BibTeX")

# publication with a lot of files
rec = zen$getRecordByDOI("10.5281/zenodo.5838468")
rec #see the default printing
rec$print(format = "BibTeX")

@eblondel
Copy link
Owner

Concerning the version, I have to see in the API why the it is handled as root property in the record, as in the metadata exchange model it is not used. What is used for the version is the one set in the metadata property.

@eblondel
Copy link
Owner

eblondel commented May 1, 2022

i'm closing this one, as a first implementation is available with choices for record export formats for published records. This will be part of next CRAN release.

@eblondel eblondel closed this as completed May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants