projects / org / ezproject2010 / batchtool
Find the Exponential Software extensions you want
UNIX name | Owner | Status |
---|---|---|
batchtool | Arne Bakkebø | stable |
Version | Compatible with |
---|---|
1.0 | 4 (probably also 3.9 and up) |
This is intended as a command line tool, allthough I've set it up as a cronjob in case that could come in handy for some tasks.
This extension can really mess up your database, you are highly encourraged to make a backup before starting!
To install extract extension to the extension/batchtool/ directory.
Activate the new extension by adding it in settings/override/site.ini.append.php like this:
[ExtensionSettings]
ActiveExtensions[]=batchtool
Run the tool from command line like this:
php runcronjobs.php batchtool [--and] [--or] --filter="<filter>" [--filter="<filter>"] [...] --operation="<operation>" [--operation="<operation>"] [...]
--filter: Specifies a filter name and potential parameters for it
--operation: Specifies an operation name and potential parameters for it
--or: Creates a logical OR operation between filters (default)
--and: Creates a logical AND operation between filters
The format of filter and operation parameters are as follows:
"<filter/operation name>;<parameter name1>=<value1>;<parameter name2>=<value2>;..."
From command line the quotes must be included, or the shell will interpret the semicolons.
The filters fetches the selected objects, specifying which objects to work on. There can be any number of filters, and each filter returns a set of objects. The objects are then combined to set up the object list that should be processed by the operations in this job. The combining of objects can be done by a logical AND or a logical OR operation. This is specified with the --and or --or parameters. Combining --and and --or in one command is not possible, if --and is specified anywhere it will have priority.
From the object resultset of the filtering, the specified operations are then given one object at a time, and processes each one of them in the same manner. As with filters there can be any number of operations, and each one of them will be used in specified order on each object.
Adding custom filters and operations are possible. For more information and examples, read the INSTALL file included in the package!
What a delightful tool!
Thursday 10 June 2010 15:09
Leif Arne Storset