Installing Station Archive

Last updated on
30 April 2025

You'll need to complete the following steps to setup the station archive:

  1. Enable the taxonomy module. The archive uses a vocabulary to assign days and times to the audio files.
  2. Download and enable the audio module. You'll want to follow the instructions to setup the audio_getid3 sub-module, it is strongly recommended.
  3. Enable the station and station_archive modules.
  4. Configure the station module at admin >> settings >> station. If the schedule module is running on another machine, you'll want to set the XMLRPC URL.
  5. Download and install the StreamRipper executable.
  6. Edit the station/archive/scripts/ripper.inc file. Set your web stream's URL, the full path of the import directory, and the full path to the stream ripper executable.
  7. Test running the ripper script on the command line. You'll need to determine the full path to the file and pass that to PHP as the first parameter. So, if you've installed the module into /usr/local/www/drupal/modules then you'd run it by typing: php /usr/local/www/drupal/modules/station/archive/scripts/ripper.php
    If you see any error messages you'll need to correct those. If not, it'll grind away ripping the stream for up-to an hour. Let it run for a few minutes then stop it by pressing CTRL+C. Look in the import directory and make sure you've got an .MP3 file. If there's a .CUE file with the name, delete it.
  8. Setup Drupal's cron job. The audio files are automatically imported as part of a cron task.
  9. Run Drupal's cron script to import this test file then check that an audio node was created by visiting Home > > audio.
  10. Add two cron jobs to run the ripper script. One for even, and one for odd hours. Here's a sample that rips every hour from 9am through 2am the next day:
    # note that times start one minute before the hour
    # run the even hourly stream rip
    59 9,11,13,15,17,19,21,23 * * * /usr/local/bin/php /usr/local/www/drupal/modules/station/archive/scripts/ripper.php
    # run the odd hourly stream rip
    59 0,8,10,12,14,16,18,20,22 * * * /usr/local/bin/php /usr/local/www/drupal/modules/station/archive/scripts/ripper.php
    

    You might be able to do it with a single cronjob I've gotten mixed results using a single one.

Help improve this page

Page status: Not set

You can: