Creating a month from the GiP filename

Jeremy Nicoll - ml gip jn.ml.gti.91 at wingsandbeaks.org.uk
Thu Oct 13 08:38:54 PDT 2022


On 2022-10-13 11:40, Chris Walker wrote:

> I sort them into the relevant year using <nameshort>/<firstbcastyear>
> but I then have to run a bash script to create a folder for the 
> relevant
> month with this code :-
> newdir=$month" "$(date -d $month/01 +%b) where the month has been
> extracted earlier such that I get a folder named '10 Oct'.
> 
> But of course GiP already provides the firstbcastmonth so is there any
> way for GiP to create the month in the format I desire?

What IS the format you desire?

What happens if instead of

   <nameshort>/<firstbcastyear>

you use

   <nameshort>/<firstbcastyear>/<firstbcastmonth>

(or possibly something like

   <nameshort>
    /<firstbcastyear>/<firstbcastday> <firstbcastmonth>

if the latter variable also exists?



It's been a long time since I used get_iplayer, but I approached this
sort of problem by generating and issuing get_iplayer commands which
contained explicit filepaths invented to suit whatever I was fetching
rather than expecting get_iplayer to work out what to do with each
file.

-- 
Jeremy Nicoll - my opinions are my own



More information about the get_iplayer mailing list