Note: As of May 9, 2020, this module is deprecated in favor of Islandora Repository Reports.
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.
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:
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.
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".
This module comes with a set of Drush commands that generates the data used in the reports and caches it:
- To list the enabled services that generate report data:
drush media_formats_reports:list_report_types
- To pregenerate the data for the 'puid' report:
drush media_formats_reports:build_cache puid
- To delete the data for the 'mimetype' report:
media_formats_reports:delete_cache mimetype
- Islandora 8
- Islandora FITS is required if you want to generate the PUID report.
- Clone this repo into your Islandora's
drupal/web/modules/contrib
directory. - Enable the module either under the "Admin > Extend" menu or by running
drush en -y media_formats_reports
.
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:
- a .info.yml file
- a .services.yml file
- Within the .services.yml file, the service ID must be in the form
media_formats_reports.datasource.xxx
, wherexxx
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.
- Within the .services.yml file, the service ID must be in the form
- a plugin class file that implements the
MediaFormatsReportsDataSourceInterface
interface.- The plugin's
getData()
method needs to return an associative array containing formatname => count members.
- The plugin's