Needs work
Project:
Nodequeue
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2011 at 21:53 UTC
Updated:
19 May 2011 at 16:48 UTC
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
| Comment | File | Size | Author |
|---|---|---|---|
| nodequeue_drush_support.patch | 3.27 KB | johnennew |
Comments
Comment #1
johnennew commentedFor 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"
Comment #2
kbell commented+1 on this feature
-Kelly Bell
Comment #3
jonhattanThere'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...