Skip to content

Module for Omeka S that allows to export metadata of resources in a specified format (csv by default) in bulk

License

Notifications You must be signed in to change notification settings

ubbdst/Omeka-S-module-BulkExport

 
 

Repository files navigation

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).
  • Rights on exports.
  • 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 Export plugin, built by Biblibre.

About

Module for Omeka S that allows to export metadata of resources in a specified format (csv by default) in bulk

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 91.2%
  • HTML 8.4%
  • CSS 0.4%