Can't create .nfo file
Chris Walker
cdw_pcmail at the-walker-household.co.uk
Wed Nov 25 07:07:41 EST 2020
On Wed, 2020-11-25 at 11:50 +0000, Terence Leadbetter wrote:
> 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?
> >
> You don't say if you are using Windows or Linux.
Ah. I expect people to be able to read my mind ;-)
I'm using 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.
Plainly it looks like it can be done in one go but I still can't make it
work like that. I too run a script to move files from one part of a NAS
to another and when doing so, create another file which one of my Humax
machines uses. What I'm in the process of doing is rewriting that script
to (a) make it more readable and (b) create the nfo file. It then moves
the various files. I pass it the full filename and split out the various
parts to check if those folders exist on the NAS in the final location.
I've now used GiP to create the xml using the command --metadata.
I'll try doing what you're doing though to see where my system is
failing so thanks for the tip.
--
__ __| |_ __ __ .------------------------------------------------.
/ _/ _` \ V V / | mailto:cdw_pcmail at the-walker-household.co.uk |
\__\__,_|\_/\_/ |________________________________________________|
More information about the get_iplayer
mailing list