Closed Mikejmnez closed 2 weeks ago
The same issue shows up in the community page:
@jahattox I couldn't figure out how to do this on the site builder. Do you think this is possible to set up?
@Mikejmnez I'm wondering if this is a limitation of the Zenodo API. Here's the docs: https://developers.zenodo.org/#list
And here's the API call the plugin uses: https://zenodo.org/api/records/?sort=mostrecent
Could it be that "mostrecent" means the most recently uploaded, rather than ordering by publication date? I tried reversing the sort as well, and it updates, but it still isn't ordered by the year.
Could it be that "mostrecent" means the most recently uploaded, rather than ordering by publication date? I tried reversing the sort as well, and it updates, but it still isn't ordered by the year.
That's what it means I think.
@Mikejmnez I'm wondering if this is a limitation of the Zenodo API. Here's the docs: https://developers.zenodo.org/#list
And here's the API call the plugin uses: https://zenodo.org/api/records/?sort=mostrecent
Could it be that "mostrecent" means the most recently uploaded, rather than ordering by publication date? I tried reversing the sort as well, and it updates, but it still isn't ordered by the year.
I see. Then perhaps the solution would be to (manually) modify these presentations (get a new version of the presentation that is) so that sorting these result in a chronological order arrangement...
@jahattox I finally had some time to look into this. Zenodo has several ways of sorting the records, and one of them is Published[newest]
. That is what we want (see here). By looking at the sorting key what we want is:
{'sort':'publication-desc'}
I quickly ran in a ipython shell and
community_id = 'opendap'
url = f'https://zenodo.org/api/records'
params = {
'communities': community_id,
'page': 1,
'sort': 'publication-desc',
'size': 10 # Number of records per page (maximum is 100)
}
response = requests.get(url, params=params)
data = response.json()
and looking at the data, something like this should work...
@Mikejmnez Nice! That seems to have done the trick. I just pushed up the change. How do things look on your end?
@jahattox they look great! marking this as completed :)
Brief description
Presentations from Zenodo look great! However, these are not arranged chronologically and that can cause some confusion.
Visual Aid
Page URL