This project is not covered by Drupal’s security advisory policy.
Adds more functionality to the CTools drush bulk export commands.
drush ctex modulename will export all known ctools exportables of a site to a module. But there are also other configurations you'd like to have in code. This project fills in that gap with extra configuration and drush commands.
To install it just
drush dl drush_ctex_bonus in your .drush folder, or - even better - in a system-wide drush commands folder.
If you want additional configuration, please create an issue with a patch or you can also implement
hook_drush_ctex_files_alter, which is invoked in the main CTools' drush export command.
- Exports content types to modulename.ctex_bonus.ctypes.inc.
- Exports vocabularies to modulename.ctex_bonus.vocabularies.inc.
- Exports fields and instances to modulename.ctex_bonus.fields.inc.
- Exports filter formats to modulename.ctex_bonus.filters.inc.
- Exports wysiwyg profiles to modulename.ctex_bonus.wysiwyg.inc.
- Exports aliases to modulename.ctex_bonus.aliases.inc.
- Exports date formats to modulename.ctex_bonus.dateformats.inc.
- Exports languages to modulename.ctex_bonus.languages.inc.
- Exports menus to modulename.ctex_bonus.menus.inc.
- Exports blocks to modulename.ctex_bonus.blocks.inc.
- Exports workbench moderation to modulename.ctex_bonus.moderation.inc.
- Exports nodequeues to modulename.ctex_bonus.nodequeues.inc.
- Exports variables to modulename.ctex_bonus.variables.inc.
- Exports roles and permissions to modulename.ctex_bonus.roles_and_perms.inc.
- Exports any entity exportable (includes rules and others) to the .module file in the right hook.
- Exports image styles to modulename.module in modulename_hook_image_default_styles().
- Exports dependencies and files info to modulename.ctex_bonus.info.inc. You can manually edit this file to add/remove dependencies or indicate which files you don't want to overwrite again when doing a new export.
drush cbum modulename: Uber master command which performs following things when trying to enable an export module. It won't do anything if the module is enabled.
- Check if any i18n modules need to be enabled - due to - might be removed in case this bug fixed one day.
- Enable the exported module
- Run all commands underneath
- Clear the cache
drush cbrm modulename: master command to select one or all actions underneath which have a key 'ctex run all' set to TRUE.
drush cbcd modulename: compare dependencies of the module with the current enabled modules on the site. It will print out the drush command to disable all those modules afterwards.
drush cbcdb modulename: compare database configuration with code. If a configuration is not in code, you have to option to delete them one by one. Support for content types, fields, variables, vocabularies, languages and nodequeues. More will be added if they prove to be necessary.
drush cbsa modulename: save all CTools, entity exportables and image styles to the database. This allows you to disable the module after all other configuration has been saved. Note that it's safer to clone existing default objects first so you don't revert by accident after disabling.
drush cbrv modulename: (re)build all vocabularies.
drush cbrf modulename: (re)build all fields and instances.
drush cbrl modulename: (re)build all languages.
drush cbrb modulename: (re)build all blocks.
drush cbrp modulename: (re)build all roles and permissions.
drush cbrw modulename: (re)build all wysiwyg profiles.
drush cbra modulename: (re)build all aliases.
drush cbrn modulename: (re)build all nodequeues.
drush cbrs modulename: (re)build all image styles.
drush cbrme modulename: (re)build all menus.
drush cbrdf modulename: (re)build all date formats.
drush cbrwm modulename: (re)build all workbench moderation settings.
drush cbrct modulename: (re)build all content types.
drush cbrvv modulename: (re)build all variables.
drush cbrff modulename: (re)build all filter formats.
drush cbrea modulename: revert all entity api exportables.
Using the action master command (cbrm) is the easiest command to get an overview of all options that this project offers. It also takes an automatic backup of your database if you select the 'All' option. When selecting an individual command, you will be asked for confirmation.
Before every command starts to run, it will ask if you want to take a backup of your database, except for the
cbum and the 'All' option in the
cbrm command which do this automatically. As with the sql-dump command, you can also use the
--result-file option to override the default backup directory.
Logging of actions
Besides being printed to the screen, al messages are also logged to 2 logfiles: ctex.log and ctex-error.log. By default, the directory is going to be something like ~/drush-ctex-logs/db_name/. This can be overridden by setting the 'ctex-log-location' option.
- Maintenance status: Actively maintained
- Development status: Maintenance fixes only
- Module categories: Drush, Import/Export, Utility
- Reported installs: 1 site currently reports using this module. View usage statistics.
- Downloads: 2,735
- Last modified: December 2, 2014
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.