1

is there a way to create specific taxonomy terms the drush way?

the docs mention only a number argument to generate dummy terms.

http://www.drushcommands.com/drush-7x/devel-generate/generate-terms

i have around 150 terms (city - country (parent) - region (parent)) in one location taxonomy vocabulary. would be great if i can write the syntax in a text editor and use this to populate the vocabulary.

thx for any suggestions!

2 Answers 2

2

Try the taxonomy manager module.

https://www.drupal.org/project/taxonomy_manager

It allows for mass insertion of terms.

There's also a taxonomy csv module which allows for import/export of taxonomies to file. That might be worth a try too: https://www.drupal.org/project/taxonomy_csv

Else you can try and write your own module... But that's a rather tougher route.

1
  • thx for your suggestions! the taxonomy_csv is just what i was looking for!!
    – user24957
    Dec 27, 2014 at 11:59
0

For one-offs, a mass insertion module may not be suitable.

Upset that there was no existing simple way to add content in Drush, I created the drush create-content command set, which allows for the one-off creation of vocabularies, nodes and terms.

https://github.com/djcf/drush-create

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.