These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Get iPlayer Info without header lines

user-103

Hi,

I'm another very grateful refugee from Radio Downloader and have been getting on pretty well with get_iPlayer for radio.

I am currently using:
get_iPlayer version 2.83 under Windows 7 Pro.

I load my programme choices into a DOS .bat file and let get_iPlayer do its thing.

I would like to find a way to limit the header and trailer lines that get written to the program information text file.

I use this command to get the current list of radio programmes:
get_iplayer --type=radio --listformat="<index>|<type>|<channel>|<categories>|<name>|<desc>" > "C:\Temp\AvailableRadio.txt"

and I'm 95% there. The --listformat switch limits which fields I want and how they should be delimited. However, I cannot find a way of telling the call to get_iPlayer to skip writing the copyright lines at the top:

get_iplayer v2.83, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.


and the trailer row:
INFO: 3339 Matching Programmes

Is there a switch or switch value that I can add to my command line above to stop the header and trailer being added to my list of programmes ?

Also, is there a switch or switch-value that will cause the first row to be the name of the categories that I have specified in the --listformat switch ?

Many thanks,

DownUnderDave

user-2

Quote:Is there a switch or switch value that I can add to my command line above to stop the header and trailer being added to my list of programmes ?

You can remove the copyright notice with
Code:
--nocopyright
, but there is no way to omit the leading "Matches:" or trailing "INFO: XXX Matching Programmes".

Quote:Also, is there a switch or switch-value that will cause the first row to be the name of the categories that I have specified in the
Code:
-–listformat
switch ?

No

You need to look outside get_iplayer to get the format you want. It looks like you are trying to create a delimited text file with column headers, so first write the header line to your output file, before you run get_iplayer. Then, filter the output from get_iplayer and append it to the output file. You can filter the get_iplayer search results through
Code:
findstr
to remove extraneous lines. You need to include only the lines that begin with one or more digits followed by a pipe symbol, so try something like:

Code:
findstr /b "[0-9][0-9]*|"

You could probably just pull out any lines that begin with a digit:

Code:
findstr /b "[0-9]"

user-103

Hi user-2,

Thanks for the rapid response, piping the delimited file through findstr should get me most of the way.

Cheers,

Dave

These forums are archived

See this post for further info