Use First Broadcast Date in Filenames? Capitalisation?

Jeremy Nicoll - ml get_iplayer jn.ml.gti.91 at wingsandbeaks.org.uk
Sat Jan 3 13:08:20 PST 2015


"C E Macfarlane" <c.e.macfarlane at macfh.co.uk> wrote:

>1)	First Broadcast Date
>
>AFAICS, there is no way to get the first broadcast date from the XML
>metadata into the filename.

There is, but a more fundamental problem is that the BBC are not consistent
in how they use the value - sometimes it really is the first time something
was broadcast, but other times it's the date of the first recent repeat.

You code a --fileprefix   argument detailing which bits of info you want in
what order, mixing literal values and symbolic ones as you desire.  I use a
fileprefix argument that's built by a script; for my 2745th fetch, issued
yesterday from a machine I call 'SN130', it used:

 --file-prefix "$GRAB-SN130-002745 R=<nameshort> [20150102 Jan02]
S<seriesnum> E<episodenum> - E=<episodetitle> 'E=<episode>' P=<pid> M=<mode>
Z=<duration> F=<firstbcastdate> L=<lastbcastdate>"

which is probably much more complicated than you want...

(This sort of complicated filename means that successive attempts to fetch
the same programme end up with different filenames - because of the sequence
number at the start, deliberately.  This also makes it easier to find the
right instances of commands in my script's log files etc.)

ALthough it looks as if I've needlessly duplicated series & episode number
info, I end up with filenames that usually do have those numbers in them
somewhere.  The literals like "E=" and "'E=" are deliberately slightly
different so I know which part of the template name yielded which values in
the resulting name.  The "R=" only appears in radio downloads I do, "T=" in
TV ones. 


>2)	Capitalisation
>
>Is there an option to get ...
>		Letter From America By Alistair Cooke

>... instead of the default ...
>		Letter from America by Alistair Cooke

Don't you think the BBC's way of listing the programme name is the correct
way?  

-- 
Jeremy Nicoll - my opinions are my own.



More information about the get_iplayer mailing list