This is an updater. A program that stores new content and keep it up to date.
- Drupal 7.22
- Drush
- MySQL
- PHP 5.4+
- (Obviously) Tons of XMLs in ODS-AP
Well, it takes each file of a folder (<drupal_site>/harvest/) and runs some xpath queries to get specific content from each XML.
Once it has parsed each XML, Updater maps and clean the data just parsed, then it creates and saves the content as new node.
Repositories and languages, in most of the cases, must be replaced by a readable name for Drupal (or users). You must add, as necessary, new translations of unreadable names at languages.ini and repositories.ini.
- Place at your Drupal folder.
- Make sure you have all harvested XMLs in
harvest/folder. - Run
drush php-script /path/to/updater/updater.php. - Go and have a coffee, launch and do some productive things, it will take a lot of time depending on the harvested XMLs.
- Check your Drupal site for new content.
- Edit the file
updater.phpand changeUPDATER_DEBUG_ENABLEtotrue. - Save it.
- Run the script.