[RDD] Breaking News

Robert Jeffares jeffares.robert at gmail.com
Sat Dec 4 15:29:01 EST 2010

bit of experimenting and fast learning  and I came up with this ..

there is no real need to blank the cart if it is not being played but it 
covers against any accident. one remote user has managed to freeze the 
system twice now, and all I can track and trace is it happens when he 
logs in but, jock that he is, he can't remember what he hit, just that 
it didn't work! Bullet proof is good.

cron is set to call this script every 8 minutes on my system

this is run as superuser because a number of users may load files. 
Remote Access to the dropbox which is behind 2 firewalls is port shifted 
passworded and not advertised.

the news file is called 'breaking' and may be wav ogg or mp3  the blank 
1 sec is called 'silence.wav'

thanks for the comments and suggestions.


Robert Jeffares
Big Valley Radio [Now! With Breaking News!]
New Zealand


#Test if the file exists otherwise cart silence because no rml to delete 
cart or cut
if [ -f   /path/to/dropbox/breaking.* ]

#if the file is there is it still being loaded thanks Frederick J H
      lsof  /path/to/dropbox/breaking.* &>/dev/null

      if [ $? -eq 1 ] ;


rdimport  --to-cart=breaking news cart --delete-cuts 
--normalization-level=-7 --delete-source GROUP 

rmlsend --to-host=localhost --to-port=5858 "PX 1 breaking news cart!"
#needed the quotes to get it to work in bash on SUSE 10.2


#if there is no breaking news cart 1 second silence. Yes the rml play 
next should only happen if there is a fresh cut to play but this covers 
any errors.
rdimport  --to-cart=breaking news cart --delete-cuts 
--normalization-level=0 NEWS "/path/to/dropbox/silence.*"

exit 0

On 01/12/2010 04:42, Frederick Henderson wrote:
> On Tue, 30 Nov 2010 15:56:48 +0100, sjm<sjm.mlists at gmail.com>  wrote:
>>> I would write a script to do the following and schedule it with cron.
>>> Check ftpsite or local folder for a breaking news file, if not present
>>> exit the script, if present use RDImport to import it into the breaking
>>> news cart, cut 1. Then use RMLsend and a Add Next command(PX) to load it
>>> in the main log.
>> To be slightly more robust, you probably need to add a little bit of
>> logic.  The dropboxes have this logic already built in, so you might add
>> them into the mix.  It's the logic that makes sure the filesize isn't
>> changing before you import the audio into RD so you don't get only part
>> of an audio file.
> Good idea sjm. You can use lsof and the filename for that. Something like
> this that you could put inside an endless loop that you would exit out of
> when you finally process the file.
> #Check if file is in use
>     lsof "$filepath"&>/dev/null
> 	if [ $? -eq 1 ] ; then     # If the file is not in use then process it,
> otherwise go on.
> 		# Do the other stuff you want to the file
> 	fi
> I also meant to say have the script delete the file after it has been
> imported as well.
> Greetings,
> Frederick
>> Something like putting the breaking news audio into a dropbox and using
>> "touch" to flag that the news file is available and checking for that
>> flag.
>> _______________________________________________
>> Rivendell-dev mailing list
>> Rivendell-dev at lists.rivendellaudio.org
>> http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

More information about the Rivendell-dev mailing list