Re: [mythtv-users] mythtools v0.2

2005-05-17 Thread Ryszard
will be included in the next rel.

On 5/16/05, John Williams <[EMAIL PROTECTED]> wrote:
> > If anybody knows how to do a little text processing using perl/mysql,
> > and can throw together something to go through the database, select
> > all plots, and remove whitespace before and after, and put it back in,
> > that would be awesome too!
> 
> It should look something like this
> 
> 
> update tablename set descriptioncolumnname = trim(descriptioncolumnname)
> 
> this will update the description column to contain the same
> information with leading and trailing spaces removed. You will have to
> determine the column name and table name yourself. I'n m not near my
> Myth system.
> 
> --
> I have plenty of Gmail invites. Ask me if you'd like one. G Mail rocks
> for  email lists.
> ___
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [mythtv-users] mythtools v0.2

2005-05-16 Thread Mat Mrosko
sorry for all the replies, but I almost forgot to credit the author...


White Space Removal Function by Shailesh N. Humbad
http://www.somacon.com/p114.php

:)

-Mat


On 5/16/05, Mat Mrosko <[EMAIL PROTECTED]> wrote:
> Welp... found a snipit of code, and easily added it, tested it, and it
> seems to work great... still don't know anything about perl, but
> here's my diff...
> 
> On 5/16/05, Mat Mrosko <[EMAIL PROTECTED]> wrote:
> > > as usual, i'm open to features, bug fixes, patches en so on.
> >
> > I know absolutely no perl, otherwise I'd toss a patch for this
> > suggestion, but I think it would be great if you stripped the white
> > space from the end of the "Description" field... I'm running this on
> > my Simpsons Episodes, and I've noticed there's a good 20-40 characters
> > of whitespace at the end of some of them... I guess I'm nit-picky like
> > that... :)  Plus, I'm not sure if there's whitespace before, but in
> > the MythVideo setup interface, the plot looks like it starts one line
> > below... There is also a newline at the beginning after checking via
> > mysql directly... the "edit" in mythweb did not show it, but it is
> > there.
> >
> > If anybody knows how to do a little text processing using perl/mysql,
> > and can throw together something to go through the database, select
> > all plots, and remove whitespace before and after, and put it back in,
> > that would be awesome too!
> >
> > -Mat
> >
> 
> 
>
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [mythtv-users] mythtools v0.2

2005-05-16 Thread John Williams
> If anybody knows how to do a little text processing using perl/mysql,
> and can throw together something to go through the database, select
> all plots, and remove whitespace before and after, and put it back in,
> that would be awesome too!

It should look something like this


update tablename set descriptioncolumnname = trim(descriptioncolumnname)

this will update the description column to contain the same
information with leading and trailing spaces removed. You will have to
determine the column name and table name yourself. I'n m not near my
Myth system.

-- 
I have plenty of Gmail invites. Ask me if you'd like one. G Mail rocks
for  email lists.
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [mythtv-users] mythtools v0.2

2005-05-16 Thread Mat Mrosko
Welp... found a snipit of code, and easily added it, tested it, and it
seems to work great... still don't know anything about perl, but
here's my diff...

On 5/16/05, Mat Mrosko <[EMAIL PROTECTED]> wrote:
> > as usual, i'm open to features, bug fixes, patches en so on.
> 
> I know absolutely no perl, otherwise I'd toss a patch for this
> suggestion, but I think it would be great if you stripped the white
> space from the end of the "Description" field... I'm running this on
> my Simpsons Episodes, and I've noticed there's a good 20-40 characters
> of whitespace at the end of some of them... I guess I'm nit-picky like
> that... :)  Plus, I'm not sure if there's whitespace before, but in
> the MythVideo setup interface, the plot looks like it starts one line
> below... There is also a newline at the beginning after checking via
> mysql directly... the "edit" in mythweb did not show it, but it is
> there.
> 
> If anybody knows how to do a little text processing using perl/mysql,
> and can throw together something to go through the database, select
> all plots, and remove whitespace before and after, and put it back in,
> that would be awesome too!
> 
> -Mat
>
57a58,65
> sub trimwhitespace($)
> {
> my $string = shift;
> $string =~ s/^\s+//;
> $string =~ s/\s+$//;
> return $string;
> }
> 
80c88
< $sth->execute($args{plot}, $args{rating}, $args{title}, $args{director}, 
$args{year}, $args{length}, $args{coverfile}, $args{intid});
---
> $sth->execute(trimwhitespace($args{plot}), $args{rating}, $args{title}, 
> $args{director}, $args{year}, $args{length}, $args{coverfile}, $args{intid});
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [mythtv-users] mythtools v0.2

2005-05-16 Thread Mat Mrosko
> as usual, i'm open to features, bug fixes, patches en so on.

I know absolutely no perl, otherwise I'd toss a patch for this
suggestion, but I think it would be great if you stripped the white
space from the end of the "Description" field... I'm running this on
my Simpsons Episodes, and I've noticed there's a good 20-40 characters
of whitespace at the end of some of them... I guess I'm nit-picky like
that... :)  Plus, I'm not sure if there's whitespace before, but in
the MythVideo setup interface, the plot looks like it starts one line
below... There is also a newline at the beginning after checking via
mysql directly... the "edit" in mythweb did not show it, but it is
there.

If anybody knows how to do a little text processing using perl/mysql,
and can throw together something to go through the database, select
all plots, and remove whitespace before and after, and put it back in,
that would be awesome too!

-Mat
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


[mythtv-users] mythtools v0.2

2005-05-16 Thread Ryszard
Hi all,

here is the latest version of mythtools - 0.2.  the biggest change in
this release is a new script 'getepdetails.pl'

to paraphrase myself:
--8<---
A very handy little script that will do the tvtome parsing, and
produce when the next episode of your favourite series will air.
--8<---

i use this to display the next air date of various series on my mobile
phone using the really cool bluemote daemon..
http://www.geocities.com/saravkrish/progs/bluemote/ which is the
inspiration behind getepdetails.pl

thanks to those who have contrib's and made suggestions.

as usual, i'm open to features, bug fixes, patches en so on.

regs
Ryszard


mythtools-v0.2.tar.bz2
Description: BZip2 compressed data
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users