Import class schedule and auto-create nodes

Events happening in the community are now at Drupal community events on www.drupal.org.
gettysburger's picture

I've been trying to figure out a way to sync my college's class schedules with nodes in Drupal. We use Datatel and, on our current non-Drupal site, dump the data into a mySql database and use a simple form to search the classes. I'd like to set it up in our new forthcoming Drupal site, to have nodes created from the records in the mySql database.

Is there some module for importing databases => nodes?

Is there a way to sync the database to Drupal directly so when the db is updated, Drupal is updated?

Thanks,
Stephen Recker

Comments

Node Import

dwees's picture
  1. To do the first thing, the easy way is to:
  • Install CCK + Node import + Calendar + Date + Views
  • Create a new content type and add a date field to it using CCK
  • Do a dump to csv of your scheduling information, making sure that each line of the csv file corresponds to the kind of information stored in a node. At a minimum you should have a title, and a date/time field (note the date/time field is combined in this instance).
  • Import the information into your Drupal site using Node Import
  • Use Views to display your data, this may take some fiddling but there is a tutorial on this site on how to do it I've read
  1. As for the 2nd thing, you'll need to create a custom script, which I would put into a Drupal module or have run as a Cron job, which does the syncing for you. You can construct nodes via SQL, but I think it would be easier to put the script into a Drupal module (and have it be called via something called hook_cron) and have Drupal do the syncing for you, because it is way easier to save the node info through Drupal.

Dave

Node import via cron can be

dealancer's picture

Node import via cron can be use to automatize import. User or bot should append content to the existent files for tasks. I hope it will be useful for you.

Drupal in Education

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: