Skip to content

mjordan/media_formats_reports

Repository files navigation

Media Formats Reports

Note: As of May 9, 2020, this module is deprecated in favor of Islandora Repository Reports.

Introduction

A Drupal 8 module to provide a visual report (chart) showing the frequency of formats using either MIME type or, if Islandora FITS is installed, PRONOM PUID.

Overview

Users with "Administer Site Configuration" can visit the reports page from Drupal's Reports list. The link to "Media Formats" will show the default MIME type report:

MIME type report

If Islandora FITS is installed, users can choose "PUID" from the "Report type" list.

Checking the "Generate a CSV file of this data" box and clicking the "Go" button will provide a link to download the CSV file.

Configuration

To use the MIME type report, you need to configure the term IDs from the Islandora Media Use vocabulary that you want in the report. To do this, go to "Admin > Configuration > Islandora > Media Formats Reports settings".

Pregenerating report data

This module comes with a set of Drush commands that generates the data used in the reports and caches it:

  1. To list the enabled services that generate report data: drush media_formats_reports:list_report_types
  2. To pregenerate the data for the 'puid' report: drush media_formats_reports:build_cache puid
  3. To delete the data for the 'mimetype' report: media_formats_reports:delete_cache mimetype

Requirements

Installation

  1. Clone this repo into your Islandora's drupal/web/modules/contrib directory.
  2. Enable the module either under the "Admin > Extend" menu or by running drush en -y media_formats_reports.

Writing custom data source plugins

MIME type and PUID are taken from Drupal's database, but other format indicators, or sources for MIME type and PUID (such as Solr, if they are indexed) are possible through alternative data source plugins.

The modules subdirectory contains a sample data source plugin. The minimum requirements for a data source plugin are:

  1. a .info.yml file
  2. a .services.yml file
    • Within the .services.yml file, the service ID must be in the form media_formats_reports.datasource.xxx, where xxx is specific to the plugin. This pattern ensures that the plugin will show up in the list of media formats reports in the select list in the reports form.
  3. a plugin class file that implements the MediaFormatsReportsDataSourceInterface interface.
    • The plugin's getData() method needs to return an associative array containing formatname => count members.

Current maintainer

License

GPLv2

About

Drupal 8 module that provides reports on media formats.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published