RS
2018-10-29 20:39:46 UTC
My main PC dual boots between Windows 10 1803 and kubuntu 18.04.1 LTS.
I would like to be able to run get_iplayer on whichever OS happens to be
running, as I do, for example, with Thunderbird, where I have both
profiles pointing to the same message base.
In the case of get_iplayer I would need to point the --profile-dir for
both installations to the same NTFS directory containing the files
options, tv.cache, radio.cache and download_history.
We had a long discussion back in March about file formats, because when
I copied the get_iplayer files from Windows 10 to ubuntu the options
file was interpreted wrongly. Ralph diagnosed the problem.
http://lists.infradead.org/pipermail/get_iplayer/2018-March/011536.html
It was that the files written in Windows used CRLF as a line terminator
(DOS format) and files written in Linux used LF as a line terminator
(Unix format). The files tv.cache, radio.cache and download_history
rely on separators to separate records and fields, so the different line
terminators do not matter. The options file does rely on the line
terminator LF to separate records and for some options the presence of a
CR causes the option to be wrongly interpreted.
Ralph kindly suggested some code to convert files from DOS format to
Unix format.
into the Linux nano text editor it tells me if there are some DOS format
lines. When I save it I can type alt-D to toggle between saving it in
Unix format and saving it in DOS format.
That is not the end of the problem. Ralph also pointed out that if Perl
thought it was running under Windows it would convert LF to CRLF when
writing a file. I think I have now found a solution. Windows 10 now
supports the Linux Bash Shell and I have used it to install ubuntu to
run under Windows 10. That does seems to work, and Perl is generating
files in Unix format, so it does not seem to recognise that it is
running under Windows, which is what I wanted.
At present I am still testing it with default file locations. I have
run into a problem I have so far been unable to solve; it hangs while
tagging. If I repeat the run with get_iplayer --force --tag-only
--verbose it displays the metadata it has processed followed by
Started writing to temp file.
Progress: > 0% ------------------------------------------------------|
It does not move from 0%. I have probably done something silly so that
I have prevented the temp file from being created or written to,
although I would then have expected an error message. I have looked at
the get_iplayer v3.17 script to try to see what it is doing when it
prints those strings. There is a comment "Tagger Class" at line 8814.
I cannot see the strings "Started" or "temp " or "Progress:" there or
anywhere else in the script.
Any ideas?
Best wishes
Richard
I would like to be able to run get_iplayer on whichever OS happens to be
running, as I do, for example, with Thunderbird, where I have both
profiles pointing to the same message base.
In the case of get_iplayer I would need to point the --profile-dir for
both installations to the same NTFS directory containing the files
options, tv.cache, radio.cache and download_history.
We had a long discussion back in March about file formats, because when
I copied the get_iplayer files from Windows 10 to ubuntu the options
file was interpreted wrongly. Ralph diagnosed the problem.
http://lists.infradead.org/pipermail/get_iplayer/2018-March/011536.html
It was that the files written in Windows used CRLF as a line terminator
(DOS format) and files written in Linux used LF as a line terminator
(Unix format). The files tv.cache, radio.cache and download_history
rely on separators to separate records and fields, so the different line
terminators do not matter. The options file does rely on the line
terminator LF to separate records and for some options the presence of a
CR causes the option to be wrongly interpreted.
Ralph kindly suggested some code to convert files from DOS format to
Unix format.
`od -c foo' will show them, and they can be removed with
`sed -i 's/\r$//' foo'.
I have since found an easier way to do the conversion. If I load a file`sed -i 's/\r$//' foo'.
into the Linux nano text editor it tells me if there are some DOS format
lines. When I save it I can type alt-D to toggle between saving it in
Unix format and saving it in DOS format.
That is not the end of the problem. Ralph also pointed out that if Perl
thought it was running under Windows it would convert LF to CRLF when
writing a file. I think I have now found a solution. Windows 10 now
supports the Linux Bash Shell and I have used it to install ubuntu to
run under Windows 10. That does seems to work, and Perl is generating
files in Unix format, so it does not seem to recognise that it is
running under Windows, which is what I wanted.
At present I am still testing it with default file locations. I have
run into a problem I have so far been unable to solve; it hangs while
tagging. If I repeat the run with get_iplayer --force --tag-only
--verbose it displays the metadata it has processed followed by
Started writing to temp file.
Progress: > 0% ------------------------------------------------------|
It does not move from 0%. I have probably done something silly so that
I have prevented the temp file from being created or written to,
although I would then have expected an error message. I have looked at
the get_iplayer v3.17 script to try to see what it is doing when it
prints those strings. There is a comment "Tagger Class" at line 8814.
I cannot see the strings "Started" or "temp " or "Progress:" there or
anywhere else in the script.
Any ideas?
Best wishes
Richard