[mythtv-users] mythlink.pl for 0.28
Stephen Worthington
stephen_agent at jsw.gen.nz
Mon May 2 14:53:57 UTC 2022
On Mon, 2 May 2022 23:40:31 +1200, you wrote:
>Greetings
>
>I recall a while back using mythlink.pl to get readable filenames for TV
>recordings I wanted to archive but this may have been on 0.26 or 0.27.
>
>I'm about to do a total rebuild of my system and thought it a great time
>to get rid of some of the cruft by just keeping a few TV recordings as
>Video files. I can then rescan music & videos into a totally fresh system
>and start the recording setup from scratch with new tuners.
>
>Problem is all the versions of mythlink I have found fail with the same
>error:
>Can't find string terminator "EOF" anywhere before EOF at ./mythlink.pl
>line 63.
>
>Anyone an idea of what is going on or is there another way I can 'export'
>the recordings as videos with meaningful names?
>
>Thanks
My version of mythlink.pl is a little different (v32), but it looks
like that message is caused by it trying to display the usage message.
That is done by printing from the file all the text after the print
line until it comes to a line with the three characters EOF at the
start of the line. But the print command in never finding the EOF
characters before it reads the end of the file (=EOF). So two
completely different meanings for EOF here confusing things. Your
copy of mythlink.pl seems to be corrupt. What it should look like is
this at around line 63:
# Print usage
if ($usage) {
print <<EOF;
$0 usage:
options:
and then lots more usage text until this:
--help
--usage
Show this help text.
EOF
exit;
}
# Ensure --chanid and --starttime were specified together, if at all
if ((defined($chanid) or defined($starttime)) and
!(defined($chanid) and defined($starttime))) {
die "The arguments --chanid and --starttime must be used
together.\n";
}
The EOF marker characters there just above the "exit;" command seem to
be missing, or do not starting in column 1. Or possibly the line
endings are wrong, so that it is not finding the end of the line prior
to the EOF characters properly. The line endings should be a single
LF character, not CRLF. I am not sure if the EOF characters need to
be the only thing on that line, but check that there are no extra
characters between them and the end of that line.
The mythlink.pl file comes from the mythtv-backend package, so you
could try downloading a copy of the mythtv-backend deb file and
unpacking it somewhere and getting a new copy of mythlink.pl from it.
https://www.cyberciti.biz/faq/how-to-extract-a-deb-file-without-opening-it-on-debian-or-ubuntu-linux/
Then you can compare them and see what is different.
More information about the mythtv-users
mailing list