Skip to content

civicrm-cleaner is a CLI tool to help clean CiviCRM contact databases.

License

Notifications You must be signed in to change notification settings

JohnXLivingston/civicrm-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

civicrm-cleaner

Description

civicrm-cleaner is a CLI tool to help clean CiviCRM contact databases.

License

This project is under AGPL-v3 license.

Project maintainer: John Livingston.

Installation

Clone or download the repository in a subfolder of your CiviCRM directory.

TODO: where exactly?

Install production dependencies:

composer install --no-dev

Note: avoid running it as root.

Usage

./bin/cli.php --help
./bin/cli.php contact_trash --run rollback -v --max 2  /tmp/result.csv
# Note: the script will append the current result to the output file.
# You can add current date to prevent mixing execution results:
./bin/cli.php contact_trash --run rollback -v --max 2 /tmp/result.$(date '+%Y-%m-%d.%H.%M.%S').csv

Note: avoid running it as root. Add something like sudo -u www-data on front of these commands if you are connected as root.

For a full list of commands, options and arguments, use --help.

Note: avoid using ctrl+c to stop the script. It could result in an incomplete output file.

Developpement

Install dev dependencies:

composer install

To lint the code:

./vendor/bin/phpcs --standard=vendor/drupal/coder/coder_sniffer/Drupal bin/

Campagnodon

This script is compatible with Campagnodon. It will auto-detect if you are using it.

About

civicrm-cleaner is a CLI tool to help clean CiviCRM contact databases.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages