Bulk Export

By Daniel Berthereau Extensible bulk export and formatter module for admin and public sides.
Download 3.3.14

Bulk Export (module for Omeka S)

New versions of this module and support for Omeka S version 3.0 and above are available on GitLab, which seems to respect users and privacy better than the previous repository.

Bulk Export is a generic export module for Omeka S that provides common output formats (json, xml, spreadsheet, text), both for admin and public sides. It is easily extensible by other modules.

By default, it adds exporters in the resource browse view and in the resource show view. It can be added anywhere else in the theme with a simple helper.

Internally, it allows to manage output formats, that are responsible for exporting metadata into a file, a stream or as a string.

As an example, this module defines a sample writer that exports all resources as a spreadsheet, that can be imported automatically by Bulk Import. Other known modules that provides output: Bibliography.

Installation

This module requires the module Log and the optional module Generic.

The module Blocks Disposition can be used to add it in the public sites.

Important: If you use the module [CSVImport] in parallel, you should apply this patch or use this version.

See general end user documentation for installing a module.

  • From the zip

Download the last release BulkExport.zip from the list of releases, and uncompress it in the modules directory.

  • From the source and for development

If the module was installed from the source, rename the name of the folder of the module to BulkExport, go to the root of the module, and run:

composer install --no-dev

Quick start

Automatic list

The list is added automatically in the admin resource browse pages and in the resource show pages. The list of exporters is configurable in the settings. This is the same for the sites: use the site settings and eventually the blocks disposition config to display the list of exporters.

Helper

The view helper $this->bulkExport($resourcesOridsOrQuery, $options) can be used anywhere else.

Manual creation of export urls

The export is available directly as /s/my-site/item/{id}.ods, or any other extension (tsv, csv, json, json-ld, list.txt, txt, odt, ods), or the one of other modules, in particular Bibliography. This feature is compatible with the module Clean Url.

The export is available through the api endpoint too with the module Api Info at /api/infos/item/{id}.ods, or any other extension.

So you can create urls manually or with the routes of the modules ('site/resource-output' and 'site/resource-output-id').

Heavy export

The limit of resources to output is specified in the settings. To output more resources, you need to use the bulk export process, that will create the output in a file via a background job.

First, choose a writer and config it. Finally, process the export.

Development

To create a new writer, take your inspiration on the existing SpreadsheetWriter or the other ones.

Notes

  • To convert an export with linked resource exported as url + label into linked resources importable, you need to apply this formula in LibreOffice Calc: =REGEX($Export.B2; "(http:/api/items/)(\d+)([^|\n]*)"; "$2"; "g") (to be adapted to your output).

TODO

  • [ ] Select resources like in the module ebook.
  • [ ] For spreadsheet, add an option (by default in admin) to set headers with the datatype and the language (so multiple headers for the same property).
  • [x] Rights on exports.
  • [x] Deletion of old exports.
  • [ ] Make any size output real time (streamable).

Warning

Use it at your own risk.

It’s always recommended to backup your files and your databases and to check your archives regularly so you can roll back if needed.

Troubleshooting

See online issues on the module issues page on GitLab.

License

This module is published under the CeCILL v2.1 license, compatible with GNU/GPL and approved by FSF and OSI.

This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software’s author, the holder of the economic rights, and the successive licensors have only limited liability.

In this respect, the user’s attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software’s suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.

The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms.

Copyright

  • Copyright BibLibre, 2016-2017
  • Copyright Daniel Berthereau, 2019-2022 (see Daniel-KM on GitLab)

This module was initially inspired by the Omeka Classic, built by Biblibre.

Version Released Minimum Omeka version
3.3.14August 22, 2022 [info]^3.1.0
3.3.13.9July 25, 2022 [info]^3.1.0
3.3.13.8June 20, 2022 [info]^3.1.0
3.3.13.7May 30, 2022 [info]^3.1.0
3.3.13.6March 21, 2022 [info]^3.1.0
3.3.13.5January 03, 2022 [info]^3.1.0
3.3.13.4November 29, 2021 [info]^3.1.0
3.3.13.3November 15, 2021 [info]^3.1.0
3.3.13.2November 15, 2021 [info]^3.1.0
3.3.13.1October 25, 2021 [info]^3.1.0
3.3.13.0September 20, 2021 [info]^3.1.0
3.3.12.19September 13, 2021 [info]^3.1.0
3.3.12.18July 19, 2021 [info]^3.0.0
3.3.12.17May 10, 2021 [info]^3.0.0
3.3.12.16May 03, 2021 [info]^3.0.0
3.3.12.14February 08, 2021 [info]^3.0.0
3.3.12.13January 04, 2021 [info]^3.0.0
3.3.12.12December 14, 2020 [info]^3.0.0
3.3.12.11November 30, 2020 [info]^3.0.0
3.3.12.10November 23, 2020 [info]^3.0.0
3.3.12.9November 16, 2020 [info]^3.0.0
3.3.12.8November 10, 2020 [info]^3.0.0
3.3.12.7November 09, 2020 [info]^3.0.0
3.3.12.6November 02, 2020 [info]^3.0.0
3.3.12.5October 26, 2020 [info]^3.0.0
3.3.12.4October 19, 2020 [info]^3.0.0
3.3.12.3October 12, 2020 [info]^3.0.0
3.3.12.2October 12, 2020 [info]^3.0.0
3.0.12.2October 12, 2020 [info]^1.2.0 || ^2.0.0
3.0.12.1September 28, 2020 [info]^1.2.0 || ^2.0.0