Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberitas/io_utils
Drupal Module: Adds advanced deep copy import/export support via JSON for Drupal Drush CLI
https://github.com/cyberitas/io_utils
drupal drupal-module
Last synced: 3 months ago
JSON representation
Drupal Module: Adds advanced deep copy import/export support via JSON for Drupal Drush CLI
- Host: GitHub
- URL: https://github.com/cyberitas/io_utils
- Owner: Cyberitas
- License: gpl-2.0
- Created: 2021-05-13T19:54:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T20:38:36.000Z (5 months ago)
- Last Synced: 2024-09-18T01:29:54.894Z (5 months ago)
- Topics: drupal, drupal-module
- Language: PHP
- Homepage:
- Size: 90.8 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Drupal io_utils module
This module provides several utilities exposed via the
drush command line to import, export, and manipulate
Drupal entities.## Installation
This module requires some composer based dependencies.
From your drupal root run the following commands:composer require cyberitas/io_utils
drush pm:enable -y io_utils## Search and Replace Usage
Search and replace uses regular expressions, allowing back
references, to replace values in all published entities.
If the field-names option is omitted, it will search in
all fields and replace in all supported field types.`
drush io-utils:replace "/^foo-(.*)-baz$/" "bar-$1-baz" --field-names body,field_example
`## Export Usage
Creates a file called "drupal_post_17.json" or rewrites it,
and puts in a json representation of a Drupal entity with
ID of 17, and the final 0 to allow exporting unpublished
entities.`
io-utils:export-one 17 /example/entity_17.json 0
`## Import Usage
Reads a file called "block-17.json", and puts saved information
into a new Drupal block content`
io-utils:import-one-block-content /example/entity_17.json
`## Other
There are additional bulk operations, search operations,
and services available for use. Refer to the drush command
help for more information.