Message ID | 47C1E983.7000000@cadsoft.de |
---|---|
State | New |
Headers |
Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from <Klaus.Schmidinger@cadsoft.de>) id 1JTOvn-0004Tm-OI for vdr@linuxtv.org; Sun, 24 Feb 2008 23:02:47 +0100 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id m1OM2h3D021416 for <vdr@linuxtv.org>; Sun, 24 Feb 2008 23:02:43 +0100 Message-ID: <47C1E983.7000000@cadsoft.de> Date: Sun, 24 Feb 2008 23:02:43 +0100 From: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> Organization: CadSoft Computer GmbH User-Agent: Thunderbird 2.0.0.9 (X11/20070801) MIME-Version: 1.0 To: vdr@linuxtv.org References: <fpskr9$b8b$1@ger.gmane.org> In-Reply-To: <fpskr9$b8b$1@ger.gmane.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sun, 24 Feb 2008 23:02:43 +0100 (CET) Subject: Re: [vdr] vdr-pictures and pic2mpg X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List <vdr@linuxtv.org> List-Id: VDR Mailing List <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Sun, 24 Feb 2008 22:02:47 -0000 Status: O X-Status: X-Keywords: X-UID: 15855 |
Commit Message
Klaus Schmidinger
Feb. 24, 2008, 10:02 p.m. UTC
On 02/24/08 21:42, Stefan Wagner wrote: > the pic2mpg script aceptis only files with lower case caracters. > is it posible to support upper case caracters by default? > > my pictures are named DSCN*.JPG and the script only acepts DSCN*.jpg. (untested). Klaus
Comments
Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote: > On 02/24/08 21:42, Stefan Wagner wrote: >> the pic2mpg script aceptis only files with lower case caracters. >> is it posible to support upper case caracters by default? >> >> my pictures are named DSCN*.JPG and the script only acepts DSCN*.jpg. > > --- PLUGINS/src/pictures/pic2mpg 2008/02/02 11:34:43 1.2 > +++ PLUGINS/src/pictures/pic2mpg 2008/02/24 22:00:18 > @@ -143,7 +143,7 @@ > sub ConvertFile > { > my ($Pict, $Mpeg) = @_; > - (my $Type) = $Pict =~ /\.([^\.]*)$/; > + (my $Type) = lc($Pict) =~ /\.([^\.]*)$/; > if (!defined $PNMCONV{$Type}) { > return if ($Ignore); > die "unknown file type '$Type': '$Pict'\n"; > > > (untested). > > Klaus works fine now with uper and lower case. stefan@mona:/media/daten/burn$ pic2mpg -v 1 /media/daten/burn/ /media/daten/burn/dest/ ./dscn0015.jpg -> /media/daten/burn/dest//./dscn0015.jpg.mpg ./DSCN00051.JPG -> /media/daten/burn/dest//./DSCN00051.JPG.mpg but wen i call the script with relative paths: stefan@mona:/media/daten/burn$ pic2mpg -v 1 ./ dest/ ./dscn0015.jpg -> dest//./dscn0015.jpg.mpg ./DSCN00051.JPG -> dest//./DSCN00051.JPG.mpg removing ./DSCN00051.JPG.mpg removing ./dscn0015.jpg.mpg dest/: No such file or directory why will the script remove the files? they are in dest/ before ending script. stefan
On 02/25/08 06:48, Stefan Wagner wrote: > Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote: >> On 02/24/08 21:42, Stefan Wagner wrote: >>> the pic2mpg script aceptis only files with lower case caracters. >>> is it posible to support upper case caracters by default? >>> >>> my pictures are named DSCN*.JPG and the script only acepts DSCN*.jpg. >> --- PLUGINS/src/pictures/pic2mpg 2008/02/02 11:34:43 1.2 >> +++ PLUGINS/src/pictures/pic2mpg 2008/02/24 22:00:18 >> @@ -143,7 +143,7 @@ >> sub ConvertFile >> { >> my ($Pict, $Mpeg) = @_; >> - (my $Type) = $Pict =~ /\.([^\.]*)$/; >> + (my $Type) = lc($Pict) =~ /\.([^\.]*)$/; >> if (!defined $PNMCONV{$Type}) { >> return if ($Ignore); >> die "unknown file type '$Type': '$Pict'\n"; >> >> >> (untested). >> >> Klaus > > works fine now with uper and lower case. > > stefan@mona:/media/daten/burn$ pic2mpg -v 1 /media/daten/burn/ /media/daten/burn/dest/ > ./dscn0015.jpg -> /media/daten/burn/dest//./dscn0015.jpg.mpg > ./DSCN00051.JPG -> /media/daten/burn/dest//./DSCN00051.JPG.mpg > > but wen i call the script with relative paths: > stefan@mona:/media/daten/burn$ pic2mpg -v 1 ./ dest/ > ./dscn0015.jpg -> dest//./dscn0015.jpg.mpg > ./DSCN00051.JPG -> dest//./DSCN00051.JPG.mpg > removing ./DSCN00051.JPG.mpg > removing ./dscn0015.jpg.mpg > dest/: No such file or directory > > why will the script remove the files? > they are in dest/ before ending script. >From the README file: Just don't make the destination directory a subdirectory of the source directory, because this would surely lead to problems. Klaus
Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote: >> stefan@mona:/media/daten/burn$ pic2mpg -v 1 /media/daten/burn/ /media/daten/burn/dest/ >> ./dscn0015.jpg -> /media/daten/burn/dest//./dscn0015.jpg.mpg >> ./DSCN00051.JPG -> /media/daten/burn/dest//./DSCN00051.JPG.mpg >> >> but wen i call the script with relative paths: >> stefan@mona:/media/daten/burn$ pic2mpg -v 1 ./ dest/ >> ./dscn0015.jpg -> dest//./dscn0015.jpg.mpg >> ./DSCN00051.JPG -> dest//./DSCN00051.JPG.mpg >> removing ./DSCN00051.JPG.mpg >> removing ./dscn0015.jpg.mpg >> dest/: No such file or directory >> >> why will the script remove the files? >> they are in dest/ before ending script. > > From the README file: > > Just don't make the destination directory a subdirectory of > the source directory, because this would surely lead to problems. ok, but with relative paths it don't works. stefan@mona:~/tests$ ls dest source stefan@mona:/tmp$ pic2mpg -v 1 source dest ./DSCN2155.JPG -> dest/./DSCN2155.JPG.mpg ./DSCN2154.JPG -> dest/./DSCN2154.JPG.mpg removing ./DSCN2155.JPG.mpg removing ./DSCN2154.JPG.mpg dest: Datei oder Verzeichnis nicht gefunden the script will create a dest dir in source (/tmp/source/dest/) and delete the files after finishing. the script only works with absolute paths correctly. stefan
--- PLUGINS/src/pictures/pic2mpg 2008/02/02 11:34:43 1.2 +++ PLUGINS/src/pictures/pic2mpg 2008/02/24 22:00:18 @@ -143,7 +143,7 @@ sub ConvertFile { my ($Pict, $Mpeg) = @_; - (my $Type) = $Pict =~ /\.([^\.]*)$/; + (my $Type) = lc($Pict) =~ /\.([^\.]*)$/; if (!defined $PNMCONV{$Type}) { return if ($Ignore); die "unknown file type '$Type': '$Pict'\n";