I think it would be great if I could create nodequeues on the command line using the drush utility. Attached is a first attempt for people interested in reviewing or providing thoughts on this idea.
John

CommentFileSizeAuthor
nodequeue_drush_support.patch3.27 KBjohnennew

Comments

johnennew’s picture

For example:

$ drush nodequeue-create "My new nodequeue" --types=page,story --size=10 --name=mnnc

This command creates a new node queue called "My new nodequeue"

kbell’s picture

+1 on this feature
-Kelly Bell

jonhattan’s picture

Status: Active » Needs work

There're several things to improve in the code:
* Do not use dt() in hook_command()
* Validate command line options in drush_nodequeue_create_validate() --for reference see the validation of drush dl http://api.drush.ws/api/function/drush_pm_download_validate/4.x
* Support machine_name.
* leverage http://api.drush.ws/api/function/_convert_csv_to_array/4.x for cli options accepting csv.
* leverage http://api.drupal.org/api/drupal/modules--node--node.module/function/nod... to validate --type.

Also I'd be more ambitious and implement other commands. Just a quick brainstorm:
* nodequeue-list (list all nodequeues).
* nodequeue-alter (change types, roles..).
* nodequeue-list-nodes (a table of id|title or only ids if --pipe).
* other ones: nodequeue-empty, nodequeue-pop, nodequeue-push ... in the future: export, import...