Creating a month from the GiP filename
Chris Walker
cdw_pcmail at the-walker-household.co.uk
Thu Oct 13 10:00:13 PDT 2022
On Thu, 13 Oct 2022 16:38:54 +0100
Jeremy Nicoll - ml gip <jn.ml.gti.91 at wingsandbeaks.org.uk> wrote:
> 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?
I want the format to be <nameshort>/<firstbcastyear>/10 Oct where 10
Oct is derived from the <firstbcastmonth>
> What happens if instead of
>
> <nameshort>/<firstbcastyear>
>
> you use
>
> <nameshort>/<firstbcastyear>/<firstbcastmonth>
Instead of the sub-directory being 10 Oct it would be simply be 10 and
for purely personal reasons I don't want that.
> (or possibly something like
>
> <nameshort>
> /<firstbcastyear>/<firstbcastday> <firstbcastmonth>
>
> if the latter variable also exists?
They all exist for the 2 programmes I identified and indeed I use a
variation of those which already defined as <firstbcastdate>. They form
part of the filename to identify 'Sounds of the 60s with Tony
Blackburn' which would simply overwrite the previous file if I didn't
have the subfolder structure which I've chosen.
> 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.
I don't think I'm expecting GiP to work out what to do with each file.
I have preferences set in general but choose to do things slightly
differently for a few programmes.
--
__ __| |_ __ __ .------------------------------------------------.
/ _/ _` \ V V / | mailto:cdw_pcmail at the-walker-household.co.uk |
\__\__,_|\_/\_/ |________________________________________________|
More information about the get_iplayer
mailing list