I can't think of any easy way to do this. In order to make sure things
are kept up to date automatically you would almost need MySQL
replication on LOG tables, CARTS and CUTS.
That means exposing Rivendell's MySQL to the internet which I don't
think is a good idea.
However if you don't mind an internet facing web server you could mock
up a PHP/whatever page to do the work for you. Depending on how far
down this rabbit hole you want to go, you might decide to format it as
an XML feed or RSS feed or something.
What you would need PHP to do is:
* Grab the current days LOG table (START_TIME & CART_NUMBER)
* -> Convert the start time to something fixed in UTC (you can then do
clever things with php/javascript to convert to the time zone of the
person who is visiting your page)
* -> Lookup the CART_NUMBER from the CART table and retrieve (TITLE,
ARTIST, ALBUM anything else you want)
* -> Lookup the CART_NUMBER in the CUTS table and start looking into day
parting etc to figure out what cut you'll be playing (optional, the CART
table might give you enough information)
* Format this in a suitable way for your website (e.g. XML, RSS, JSON)
Then on the wordpress side. To reduce load on your internal server you
create a plugin that does:
* Check wordpress DB to see if we already have today's info, if not grab
it from your internal server and save in the DB
* If you wanted to check for updates throughout the day you could always
say if my local copy is over an hour old, get new information from the
local server
* You could keep the as a simple table on wordpress as DATE, TIME,
TITLE, ARTIST, ALBUM.
To display that on a page it is easier to register short code.
Something like this:
function myPluginName_shortCode(){
return 'All my stuff goes here that I want on the page (HTML)';
}
//Hook into Wordpress
add_shortcode('myPluginName', 'myPluginName_shortCode');
Then you create a new Page on Wordpress and all you have in it is
[myPluginName].
You would normally also have an install and uninstall php file to handle
creating db tables and removing them when the plugin is
installed/removed but you could do this manually if you don't mind
messing directly with MySQL.
Obviously this is quite a bit of work, I'd guess at about 2 - 4 hours
from someone half familiar with Wordpress/PHP.
Alternatively, you could try using Rivendell Reports but I'm not too
familiar with them. In theory you could make it export to a text file
then run a post report command to upload it to your website. You'll
still have to use Wordpress plugins to format the results and I'm not
sure how you would automate the reports every day.
Regards,
Wayne
On 18/02/16 12:37, Chris Howard - CBR wrote:
I have a question.
First, you should know that we aren't a music-playing
station. We are playing audio-books (of a sort).
My hours generally start out with a long selection,
from 30 minutes to an hour long. Then I have
a few medium length selections, then an overstuff
of short (3 minutes or less) selections.
I have hard lines drawn at :40 and :50 where I shift
length of selection.
So for any given hour I could end up playing a lot
less then what is on the log for that hour.
Ok, enough explanation.
My question is: Is there a built-in way of getting
a schedule for an hour (or the whole day) short
of replicating the logic used by RDAirPlay as the
wall-clock progresses (assuming no interruptions)?
And if not, does anyone have a sample query or sample
logic I could use?
Thanks very much! (You guys are a very helpful bunch)
p.s. : what I'm eventually aiming for is a way
to update our WordPress website with a "post" which
shows the daily schedule. I haven't gotten into the
WordPress API yet, so any hints on that end also
would be appreciated.
Chris Howard
WMFH-LP
Classic Book Radio
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev