What is the right way to export a selection of references for end-users?

Created on 8 March 2023, almost 2 years ago
Updated 17 January 2024, 11 months ago

Problem/Motivation

I need to provide my end-users a way to export any reference they need to EndNote (for example, all references from 2022).

Bibcite provides a way to export all references at once through the admin interface (/admin/content/bibcite/reference/export) but not a selection. Moreover, it requires admin permissions (unsuitable for anonymous).

Second way to export references, we can use Views Bulk Update (default system inside Drupal 9) to select View rows and export in any available format. It works quite well but we can’t select all results (like Views Bulk Operations contributed module does) from all pages (and if we have 1000 rows, we can’t really display all of them in one page).

Third way, I have tried Views Bulk Operations but "Export reference" action is unavailable, if I am correct (maybe a small code to add it?)

Finally I have installed Views Data Export to create a custom export procedure. I have created a Data Export display (endnote8, a format probably provided by Bibcite module?) and tried to attach it to the main page (which lists all references).
Unfortunately, no icon appears at the bottom of the view to export data (maybe we have to edit some file in views_data_export? css/views_data_export.css? but I guess this would not be enough)
To test the export, I have opened the data export view URL and I got all references in XML as expected but unfiltered.

How to attach an export to a reference view so that users can export all or part of the references listed using exposed filters?

Steps to reproduce

- Create a view of References with exposed filters.
- Create a Data Export view with bibcite format (endnote8, bibtex, etc.) with exact same exposed filters.
- Attach the export to the main page (first view display)
- Search for icon
- Open Data Export View URL (unfiltered results exported)

πŸ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡«πŸ‡·France Toki Caen, Normandy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Toki
  • πŸ‡«πŸ‡·France Toki Caen, Normandy
  • This is almost a year old now, so maybe you've found your solution, but I wanted to offer some thoughts in case you or someone else need them.

    You could duplicate the admin view of the references, something like admin/content/bibcite/reference/export. Then make that duplicated view accessible to non-admins. You can use the built-in 'Bulk update' while also changing the 'Pager' settings to allow users to view 10, 50, 100, 200, or All rows. Then a user can export all records if necessary using 'Bulk update' without having to page through. I was able to do this with 1,000 rows by changing the settings to 'Allow user to display all items.'

    Views Bulk Operations does allow you to create custom code for adding different options, so that could also work if you wanted to build out an 'Export reference' option.

    I used Views Data Export to add an export button to the bottom of my view, but the only option that works out of the box is CSV. I tried selecting export as BibTeX, but it did not work to display the button.

Production build 0.71.5 2024