Differences

This shows you the differences between two versions of the page.

Link to this comparison view

lpfm:caroline [2018/06/05 17:47] (current)
sam created
Line 1: Line 1:
 +===== Caroline Files =====
  
 +<​note>​
 +This is in place until I start writing real documentation.
 +</​note>​
 +
 +==== ktah-1.xml ====
 +
 +<code xml>
 +<​!-- ​
 +
 +Tags:
 + station: Parent tag. 
 + required attr:
 + id: a name for the station schedule
 +
 + schedule: contains place tags
 + no attrs, can only exist once.
 +
 + subtag place: associates blocks with times
 + required attr:
 + block: block id to play
 + time: time to associate with
 + optional:​
 + day: weekday to associate with block, cronstyle 0-7 with sunday being 0 and 7.
 +
 + subtag fill: as below, but without duration. ​ if blankspace at end of a playlist, fill with this.
 +
 + block: a basic playlist block
 + required attr:
 + id: to be used with place block. ​ fallback is REQUIRED and is what plays if there is no placement
 + duration:​ number of seconds defined in the playlist
 +
 + subtag show: play one file from a collection
 + required attr:
 + collection:​ which collection to pull from
 + type: how to choose (descibed below)
 + optional attr:
 + duration:​ if set, only play files less than this size.  If not set, allow to fill to end of show, but truncate.
 +
 +
 + subtag file: play a specified file
 + requires one tag of:
 + file: full path name to file
 + id: library id of file, should have precendence
 + optional attr:
 + duration:​ only play this much of file
 +
 +
 + subtag fill: fill with content
 + required attr:
 + type: how to choose files (described below)
 + optional attr:
 + duration:​ how much time to fill.  if fill is last tag, duration isn't required and will fill to end of block
 +
 + subtag collection:
 + content:​ name of collection to include in fill
 +
 +type attribute:
 + this attribute selects the methodology caroline will use to choose media
 +
 + name       ​| ​  ​description ​                                            | availability
 + _____________________________________________________________________________________
 + mostrecent | Always play the most recent file.                         | show
 + random ​    | Choose completely at random ​                              | fill, show
 + fresh ​     | Choose files that haven'​t been played recently ​           | fill, show
 + obscure ​   | Choose files that haven'​t been played often or recently ​  | fill, show
 + perennial ​ | [FUTURE] Choose files that have been marked as perennial ​ | fill, show
 + episodic ​  | [FUTURE] Cycle through fixed playlist of files            | show
 +
 +
 +And now, a test example:
 +-->
 +<station id="​KTAH-LP Version 0">
 + <​schedule>​
 + <place block="​rtinterviews_recent" ​   time="​00:​00"​ />
 + <place block="​candyteeth_back" ​       time="​01:​00"​ />
 + <place block="​ohbehave_back" ​         time="​02:​00"​ />
 + <place block="​aaa_back" ​              ​time="​03:​00"​ />
 + <place block="​cannabiscorner_back" ​   time="​04:​00"​ />
 + <place block="​handsfreefootball_back"​ time="​05:​00"​ />
 + <place block="​sustainabletacoma_back"​ time="​06:​00"​ />
 + <place block="​ohbehave_back" ​         time="​07:​00"​ />
 + <place block="​aaa_back" ​              ​time="​08:​00"​ />
 + <place block="​handsfreefootball_back"​ time="​09:​00"​ />
 + <place block="​cannabiscorner_back" ​   time="​10:​00"​ />
 + <place block="​rtinterviews_back" ​     time="​11:​00"​ />
 + <place block="​rtinterviews_recent" ​   time="​12:​00"​ />
 + <place block="​candyteeth_back" ​       time="​13:​00"​ />
 + <place block="​ohbehave_back" ​         time="​14:​00"​ />
 + <place block="​aaa_back" ​              ​time="​15:​00"​ />
 + <place block="​cannabiscorner_back" ​   time="​16:​00"​ />
 + <place block="​handsfreefootball_back"​ time="​17:​00"​ />
 + <place block="​rtinterviews_recent" ​   time="​18:​00"​ />
 + <place block="​ohbehave_back" ​         time="​19:​00"​ />
 + <place block="​aaa_back" ​              ​time="​20:​00"​ />
 + <place block="​handsfreefootball_back"​ time="​21:​00"​ />
 + <place block="​cannabiscorner_back" ​   time="​22:​00"​ />
 + <place block="​rtinterviews_back" ​     time="​23:​00"​ />
 +
 + <place block="​ohbehave_back" ​           time="​03:​00"​ day="​1"​ />
 + <place block="​aaa_recent" ​              ​time="​07:​00"​ day="​1"​ />
 + <place block="​aaa_recent" ​              ​time="​15:​00"​ day="​7"​ />
 +
 + <place block="​handsfreefootball_recent"​ time="​05:​00"​ day="​5"​ />
 + <place block="​handsfreefootball_recent"​ time="​09:​00"​ day="​5"​ />
 + <place block="​handsfreefootball_recent"​ time="​17:​00"​ day="​5"​ />
 + <place block="​handsfreefootball_recent"​ time="​21:​00"​ day="​5"​ />
 +
 +
 + <fill type="​obscure">​
 + <​collection>​microids</​collection>​
 + <​collection>​silence</​collection>​
 + <​collection>​harkcuts</​collection>​
 + </​fill>​
 + </​schedule>​
 +
 +
 + <!-- a fallback block must be defined -->
 + <block id="​fallback"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <fill type="​fresh"​ duration="​150">​
 + <​collection>​announce</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + <show collection="​shows"​ type="​obscure"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 + <block id="​rtinterviews_recent"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​rtinterviews"​ type="​mostrecent"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​rtinterviews_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​rtinterviews"​ type="​obscure"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 +
 + </​block>​
 +
 + <block id="​aaa_recent"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​askanatheist"​ type="​mostrecent"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​aaa_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​askanatheist"​ type="​obscure"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 + <block id="​cannabiscorner_recent"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​cannabiscorner"​ type="​mostrecent" ​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​cannabiscorner_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​cannabiscorner"​ type="​obscure" ​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​candyteeth_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​candyteeth"​ type="​obscure" ​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 +
 + <block id="​handsfreefootball_recent"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​handsfreefootball"​ type="​mostrecent"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​handsfreefootball_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​handsfreefootball"​ type="​obscure"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​sustainabletacoma_recent"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​sustainabletacoma"​ type="​mostrecent"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​sustainabletacoma_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​sustainabletacoma"​ type="​obscure"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​ohbehave_recent"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​ohbehave"​ type="​mostrecent"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +
 + <block id="​ohbehave_back"​ duration="​3600">​
 + <show type="​random"​ duration="​30"​ collection="​ids"​ />
 + <fill type="​fresh"​ duration="​120"​ collection="​announce"​ />
 + <fill type="​fresh"​ duration="​30"​ collection="​psas"​ />
 + <show collection="​ohbehave"​ type="​obscure"​ />
 + <fill type="​fresh">​
 + <​collection>​music</​collection>​
 + <​collection>​shows</​collection>​
 + </​fill>​
 + <fill type="​fresh">​
 + <​collection>​ids</​collection>​
 + <​collection>​psas</​collection>​
 + </​fill>​
 + </​block>​
 +
 +</​station>​
 +</​code>​
 +
 +==== caroline.ini ====
 +
 +<code ini>
 +[settings]
 +ffprobe ​   = "/​usr/​bin/​ffprobe -v quiet -print_format json -show_format -show_streams -i "
 +ffmpeg ​    = /​usr/​bin/​ffmpeg
 +mplayer ​   = /​usr/​bin/​mplayer
 +file_regex = "/​\.(flac|mp3|ogg|wav|opus|m4a|aac)$/​i"​
 +library ​   = /​var/​local/​libraries
 +tmpdir ​    = /tmp
 +reportdir ​ = /​var/​local/​reports
 +
 +[db]
 +host=localhost
 +user=caroline
 +pass="​password"​
 +name=caroline
 +
 +[collections]
 +all=%
 +otr=Filler/​OTR/​%
 +blackmuseum=Filler/​OTR/​Black_Museum%
 +dimx=Filler/​OTR/​Dim-X%
 +soundofwar=Filler/​OTR/​Sound_of_War/​%
 +xminusone=Filler/​OTR/​X-1%
 +ytjd=Filler/​OTR/​YTJD%
 +ytjdepisodic=Filler/​OTR/​YTJD/​Episodic%
 +ytjdstandalone=Filler/​OTR/​YTJD/​Standalone%
 +notytjd=Filler/​OTR/​Black_Museum%,​Filler/​OTR/​Dim-X%,​Filler/​OTR/​Sound_of_War/​%,​Filler/​OTR/​X-1%
 +announce=KTAH-LP/​Announcements/​%
 +ids=KTAH-LP/​IDs%
 +microids=KTAH-LP/​MicroIDs%
 +music=Content/​Music/​%
 +artshow=Content/​Shows/​Art/​%
 +askanatheist=Content/​Shows/​Ask_an_Atheist/​%
 +cannabiscorner=Content/​Shows/​Cannabis_Corner/​%
 +candyteeth=Content/​Shows/​Candy_Teeth_Radio%
 +handsfreefootball=Content/​Shows/​Hands_Free_Football%
 +ohbehave=Content/​Shows/​Oh_Behave%
 +rtinterviews=Content/​Shows/​Radio_Tacoma_Interviews%
 +sustainabletacoma=Content/​Shows/​Sustainable_Tacoma%
 +shows=Content/​Shows/​%
 +silence=Filler/​Silence/​%
 +harkcuts=Filler/​HarkCuts/​%
 +psas=Content/​PSAs/​%
 +</​code>​