I'm dealing with a couple CSV files full of taxonomy data that needs a little bit of cleaning up on it's way into Drupal. Editing the files before I import is one option. But I know these files will be updated from time to time, so it's desirable to work with the files as they are given to me by my client.

So I've written some hooks to make the changes I need to the data before taxonomy_csv creates new taxonomies and terms. I had to make the small changes to taxonomy_csv shown in the attached file to make this work.

Basically I am just asking that taxonomy_csv call drupal_alter() on some of the data it is importing. This approach is used throughout drupal, so it should be a pretty familiar way to customize the module's behavior.

CommentFileSizeAuthor
taxonomy_csv_alters.diff983 bytesDave Cohen
Support from Acquia helps fund testing for Drupal Acquia logo