Can't create .nfo file

Terence Leadbetter fetfer at gmail.com
Wed Nov 25 06:50:21 EST 2020


On Tue, 24 Nov 2020 at 14:29, Chris Walker
<cdw_pcmail at the-walker-household.co.uk> wrote:
>
> Using the code shown here -
> https://github.com/get-iplayer/get_iplayer/wiki/usercmd#metadata - I'm
> trying to create a .nfo file but although the xml file is created, I'm
> not getting a .nfo file.
>
> If I then run the command manually, I do get one. So I'm assuming that
> the creation of the .nfo file is failing because at the point it's
> trying to run, there is no xml file.
>
> Am I correct in that assumption? If so, how do I overcome this?
>
> --
>  __ __| |_ __ __  .------------------------------------------------.
> / _/ _` \ V  V /  |  mailto:cdw_pcmail at the-walker-household.co.uk  |
> \__\__,_|\_/\_/   |________________________________________________|
>
>
> _______________________________________________
> get_iplayer mailing list
> get_iplayer at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer

You don't say if you are using Windows or Linux.
I use Linux and this works for me;

I use the option to run a command after the download;
    command ~/scripts/iplay-copy "<fileprefix>" "<dir>"

The fileprefix and dir tell the script where the files are being
downloaded so that can be used to identify where to find the .xml file
and to name the .nfo file. The script then copies the files out to
their final destination.
I keep the template in the .get_iplayer directory.

Here is the part of the script that includes the .nfo creation;
## date format ##
NOW=$(date +"%F")
# add dir and fileprefix to set directory and filename
together="$2"/"$1"

## log files ##
LOGP="$DIRECTORY$NOW-gip-out.log"
LOGerr="$DIRECTORY$NOW-gip-err.log"

## Do it ##

echo "" >> $LOGP
echo "" >> $LOGP
## first create nfo file
echo "creating nfo file for $together" >> $LOGP
xsltproc --output "$together.nfo" ~/.get_iplayer/nfo.xsl
"$together.xml" 2>> $LOGerr 1>> $LOGP
echo "" >> $LOGP
echo "" >> $LOGP

I hope this helps.

Regards



More information about the get_iplayer mailing list