forked from seth-shaw-unlv/claw-migrate-files-poc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for recent version of migrate_source_csv (#1)
- Loading branch information
1 parent
bcd8b97
commit d8f0372
Showing
5 changed files
with
96 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 25 additions & 27 deletions
52
config/install/migrate_plus.migration.islandora8_file.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,60 @@ | ||
langcode: en | ||
status: true | ||
dependencies: { } | ||
id: islandora8_file | ||
label: Import Image Files | ||
class: null | ||
field_plugin_method: null | ||
cck_plugin_method: null | ||
migration_tags: null | ||
migration_group: apollo | ||
|
||
label: 'Import Image Files' | ||
source: | ||
plugin: csv | ||
path: 'data/apollo.csv' # Path relative to Drupal site root | ||
path: data/apollo.csv | ||
delimiter: ',' | ||
header_row_count: 0 # 1 with headers, 0 if there are no headers | ||
keys: | ||
header_row_count: 0 | ||
ids: | ||
- digital_id | ||
constants: | ||
source_base_dir: 'data/images' | ||
collection_alias: 'apollo' | ||
source_base_dir: data/images | ||
collection_alias: apollo | ||
dest_base_dir: 'fedora://masters' | ||
extension: 'tiff' | ||
column_names: | ||
0: | ||
digital_id: 'Digital ID' # identifier key and basename of the file | ||
1: | ||
title: 'Title' # Used for title and alt-text | ||
|
||
|
||
extension: tiff | ||
fields: | ||
- | ||
name: digital_id | ||
label: 'Digital ID' | ||
- | ||
name: title | ||
label: Title | ||
process: | ||
settings: | ||
plugin: skip_row_if_not_set | ||
source: digital_id | ||
|
||
type: | ||
plugin: default_value | ||
default_value: image | ||
|
||
filename: | ||
plugin: concat | ||
delimiter: '.' | ||
delimiter: . | ||
source: | ||
- digital_id | ||
- constants/extension | ||
|
||
source_file_path: | ||
plugin: concat | ||
delimiter: / | ||
source: | ||
- constants/source_base_dir | ||
- '@filename' | ||
|
||
destination_file_path: | ||
plugin: concat | ||
delimiter: / | ||
source: | ||
- constants/dest_base_dir | ||
- constants/collection_alias | ||
- '@filename' | ||
|
||
uri: | ||
plugin: file_copy | ||
source: | ||
- '@source_file_path' #where it is | ||
- '@destination_file_path' #where we want it | ||
|
||
- '@source_file_path' | ||
- '@destination_file_path' | ||
destination: | ||
plugin: 'entity:file' | ||
migration_dependencies: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters