[mythtv-users] MythWeb filename to actual filename

Robert McNamara robert.mcnamara at gmail.com
Wed Apr 8 05:38:46 UTC 2009


On Tue, Apr 7, 2009 at 10:36 PM, Michael T. Dean
<mtdean at thirdcontact.com> wrote:
> On 04/07/2009 11:07 PM, David Fishburn wrote:
>>
>> My rudimentary shell scripting produced this script which does what I
>> need.
>> If someone can offer any improvements on it terrific.
>> I actually have to check 2 locations, since I stored recordings in 2
>> different locations.  I just removed the second check from the script.
>> I don't know if it is possible to ask Myth for the recording directory
>> locations (to make the script more generic) but it is a simple change
>> as is if things move.
>>
>
> ...
>>
>> # Example call
>> # /home/mythtv/bin/mythweb_file.sh
>> http://fishburns.homedns.org/mythweb/tv/detail/1010/1238025600
>>
>
> Or, after running mythrename.pl (i.e. in a cron job at 5 and 35--or 1 and 31
> or 2 and 32--after the hour or whatever), you can just say:
>
> $ ls -l /path/to/pretty/views/original_airdate/Chuck*
>
> and look at the link reference:
>
> lrwxrwxrwx 1 me group 59 2009-04-08 01:04
> /path/to/pretty/views/original_airdate/Chuck-20090406-_Chuck_Versus_the_Dream_Job.mpg
> -> /path/to/recordings/1021_20090406200000.mpg
>
> Or, if you wanna get fancy:
>
> $ ls -l /path/to/pretty/views/original_airdate/Chuck* |
>  awk '{ print $10 }'
>
> /path/to/recordings/1021_20090406200000.mpg
>
> Or if you want both the link name and the file name:
>
> $ ls -l /path/to/pretty/views/original_airdate/Chuck* |
>  awk '{ print $8 "\n" $10 }'
>
> /path/to/pretty/views/original_airdate/Chuck-20090406-_Chuck_Versus_the_Dream_Job.mpg
> /path/to/recordings/1021_20090406200000.mpg
>
> Or, you can just use the link with the pretty name to do whatever you
> need...
>
> cp /path/to/pretty/views/original_airdate/Chuck-20090406-* /some/other/place
> scp /path/to/pretty/views/original_airdate/Chuck-20090406-* laptop:TV/
>
> or whatever...
>
> (And by running mythrename.pl multiple times--each time specifying a
> different format--you can have separate views sorted by different criteria,
> such as original airdate, start time, recgroup, category, title, ...)
>
> mythrename.pl --link /path/to/pretty/views/original_airdate \
>             --format '%T-%oY%om%od-%S' --underscores \
>             --separator '-' --replacement '_'
>
> just try it...  :)
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Mike, I do believe that's the fourth time you've given the simple,
working, well established answer in this thread.  I admire your
patience.

Remember, you can give a man a fire and he'll be warm for a night.
But *set* a man on fire and he'll be warm for the rest of his life.

Robert


More information about the mythtv-users mailing list