I just got really tired today of updating node titles via the site for pages of nodes, so I wrote this auto_nodetitle.drush.inc

drush ant sometype anothertype
or
drush ant all

It doesn't use batch api (yet).

Compressed attachment due to upload issues.

Comments

Drat. It seems to be suffering from the problems with token replacement :(

StatusFileSize
new2.01 KB

Seems I have it working. It was failing to update the node titles because drush runs as UID0. So by adding:

--- a/modules/auto_nodetitle/auto_nodetitle.drush.inc
+++ b/modules/auto_nodetitle/auto_nodetitle.drush.inc
@@ -32,6 +32,8 @@ function auto_nodetitle_drush_help($section) {
* Drush callback to perform actual auto_nodetitle preset flush.
*/
function drush_auto_nodetitle_drush_update() {
+ global $user;
+ $user = user_load(1);
$args = func_get_args();
if (empty($args)) {
drush_set_error(dt('You must specify a node type name to recreate or specify "all".'.

It seems to fix it.

Rename attached file to auto_nodetitle.drush.inc

Status:Needs review» Reviewed & tested by the community

tested #3 with a specific content type. Works like a charm. Thank you! :-)

Version:6.x-1.2» 7.x-1.x-dev
Status:Reviewed & tested by the community» Needs review
StatusFileSize
new910 bytes

Here is a _very_ quick re-write for d7.

StatusFileSize
new911 bytes

I tested out the D7 version of this drush command and it still had a D6 function call in it. Replaced the function call with the appropriate D7 version and it works like a charm now.