Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ulsdevteam/islandora_datastream_filenamer
Provides a way to create downloaded datastream filenames based on tokens from the datastream.
https://github.com/ulsdevteam/islandora_datastream_filenamer
Last synced: about 2 months ago
JSON representation
Provides a way to create downloaded datastream filenames based on tokens from the datastream.
- Host: GitHub
- URL: https://github.com/ulsdevteam/islandora_datastream_filenamer
- Owner: ulsdevteam
- License: gpl-2.0
- Created: 2016-06-30T20:31:46.000Z (over 8 years ago)
- Default Branch: 7.x-1.6
- Last Pushed: 2020-11-19T19:52:40.000Z (about 4 years ago)
- Last Synced: 2024-08-05T19:35:28.269Z (5 months ago)
- Language: PHP
- Size: 21.5 KB
- Stars: 2
- Watchers: 6
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- islandora_awesome - Islandora Datastream Filenamer - uses the Drupal tokens to create downloaded datastream filenames based on tokens from the datastream. (The Islandora 7.x-1.x List / Utility Modules)
README
# islandora_datastream_filenamer
## Install:
Install as usual, see [this](https://drupal.org/documentation/install/modules-themes/modules-7) for further information.
### Usage
Configure the filename tokens at admin/islandora/tools/islandora_datastream_filenamer (user needs to have "Administer Site Configuration" permission). Select any of the tokens to create the filename pattern. Any of the tokens can be used, but a section pertaining to Fedora Datastreams contains tokens that can be replaced with the specific values from the datastream or the object that the datastream belongs to. These contain: Datastream's ID [dsfilename:id], Datastream's label [dsfilename:ds-label], Extension from Datastream's Mimetype [dsfilename:fileextension], Fedora object PID [dsfilename:pid], Fedora object label [dsfilename:label], Fedora object namespace [dsfilename:namespace], Fedora short PID [dsfilename:shortpid].
The filename pattern can contain any separation characters (that are legal in a filename) such as:
**[dsfilename:id]_[dsfilename:label].[dsfilename:fileextension]** results in filenames like:
"MODS_Records of First Trinity Evangelical Lutheran Church (Pittsburgh, Pa.), 1837-1975.xml"**[dsfilename:id]__[current-user:ip-address]_[current-date:custom:Ymd].[dsfilename:fileextension]** results in filenames like: "DC__130.49.185.138_20170413.xml".
Any special characters that can not be used for a filename are replaced with a "-" character.
## Author / License
Written by [Willow Gillingham](https://github.com/bgilling) for the [University of Pittsburgh](http://www.pitt.edu). Copyright (c) University of Pittsburgh.
Released under a license of GPL v2 or later.