I just released aTripal Download API that is meant to provide a framework for module/site developers to make downloads available to their users. Currently it provides a generic download page
with an ajax progress bar and file download link (attached screenshot) that you can link to from an existing form/view. There are documented code samples on the module page showing how to use it and an example module provided in the release
demonstrating feature to csv downloads.
This differs from the Views Data Export module in a number of ways:
1. Uses Tripal jobs to allow for large downloads.
2. Does not create an intermediate table that remains if the user cancels a download.
3. Provides a bookmark-able download page (screenshot attached) that could easily be extended to email the user.
4. Supports download without using views (allows for custom processing of data before export).
Input on Views Support:
Next on the docket: to provide functionality allowing the developer to specify the name of a view and it would use the view to determine the query.
I would like some input on what would be the most useful/performant/flexible with respect to views integration:
A) Most flexibility: Use the API to get the views query but you handle executing it, processing results and generating the file yourself.
- Ensures that the user downloads the same results they saw but allows you full control to manipulate the views results while generating the file.
B) Most Functionality: The API programatically executes the view, iterates through the results and generates the file. All you need to do is tell it how to transform a single query row into a string to write to the file.
- Could be too restrictive depending on how much processing is needed to generate your file.
- Do you need access to more than one row at a time?
- Additional functions could be made available to customize the header and footer of your file.