Personal computing discussed
Moderators: renee, SecretSquirrel, notfred
!/usr/bin/perl
use warnings;
use strict;
use DBI;
my $storage_path = '/mnt/hdd/mythtv/'; # Or whatever
my $dlna_path = '/home/user/dlna/'; #Or whatever
my $dbh = DBI->connect(
"dbi:mysql:dbname=mythconverg",
"mythtv", # Or whatever you installed it as
"mythtv", # Or whatever you installed it as
{ RaiseError => 1 },
) or die $DBI::errstr;
my $sth = $dbh->prepare("SELECT title, season, episode, originalairdate, basename FROM recorded;");
$sth->execute();
while (my @data = $sth->fetchrow_array()) {
my $title = $data[0];
my $season = $data[1];
my $episode = $data[2];
my $airdate = $data[3];
my $basename = $data[4];
symlink("$storage_path$basename","$dlna_path$title-S${season}E${episode}_$airdate");
}
$sth->finish();
$dbh->disconnect();
exit();
symlink("$storage_path$basename","$dlna_path$title-S${season}E${episode}");
just brew it! wrote:At least it's not Fortran.
Captain Ned wrote:just brew it! wrote:At least it's not Fortran.
FORTRAN and SQL can co-habitate? Damn, time to whip out my circa-1978 buggy-whip BASIC leet skills.
Captain Ned wrote:FORTRAN and SQL can co-habitate?
JBI wrote:I'd be willing to bet there's a (rather tortuous, but workable nonetheless) way to write web applications in Fortran...
Glorious wrote:JBI wrote:I'd be willing to bet there's a (rather tortuous, but workable nonetheless) way to write web applications in Fortran...
I'm open for wagers if you are ready to lose.
JBI wrote:Wait, what? You're saying you think it is impossible to write a web application in Fortran? If so, I'm sure I could prove you wrong, but there might be some glue logic written in something else. Or you're claiming it isn't tortuous? I'd believe that (but would be somewhat surprised).