Updated Drupal CCK Import script

I've been receiving mail regarding my CCK node import script. So far it's been positive feedback. In particular, I received an email from Esteban Acosta Villafañe in Argentina today. He passed on some changes he made to my script that allow files to be attached to the imported nodes, and determines the mimetype as well. To make this happen, both the import script and the include file needs to be changed. Here are the revised files:

  • The import script (this is a PHP command line script.
  • The include file (strip the .txt extension off that, and rename the "documents" part to match your node type)

I have to say, it is very gratifying to see others a) use some of my work, b) tell me about how it helped them, and c) contribute back improvements. Isn't Open Source a great thing?? :)

But, Drupal 6.0 was released on the 13th, so I have no clue if this script still applies. I have yet to try it against the 6.0 version, but will soon. Also, I have not tested out Esteban's modifications myself yet. I felt it was important to make the improvements available so others can benefit from them.

Thank you very much Esteban! And to the others who have taken the time to send me an email.