Re: RFS: patmv -- a bulk renaming tool

2004-04-28 Thread Brian Nelson
Jay Berkenbilt [EMAIL PROTECTED] writes:

   On Mon, Apr 26, 2004 at 08:13:32PM +0200, Thomas Viehmann wrote:
So: I suggest you submit it for addition to renameutils.
As a side effect, renameutils and your package get a comaintainer.

   Hmmm.  Maybe you should see if the renameutils maintainer is
   willing/interested in including it first; if not I will look at it.  

   I agree that it makes sense for it to be separate from perl; but perhaps
   not separate from renameutils.

 I have to assert, respectfully, that I don't think patmv belongs with
 renameutils or any other existing package.  I guess I'm confused as to
 why the suggestion of including it in another package has come up at
 all.  patmv is its own package with a life outside of these other
 packages.  That should, in my opinion, be sufficient reason to have it
 be a separate package.  I think most upstream authors would be
 reluctant to have their software added to Debian by being combined
 with some other package that they don't have anything to do with.  If
 you disagree, please let me know; I'm definitely open to hearing
 compelling arguments to the contrary.

Tiny packages are generally frowned upon in Debian since they
unnecessarily bloat the Packages file.  So, small scripts like yours
tend to be collected into a single package with other related scripts.

If everyone packaged their pet scripts into separate packages, the
already very large number of packages in Debian would grow enormously.

-- 
You win again, gravity!



Re: RFS: patmv -- a bulk renaming tool

2004-04-28 Thread Brian Nelson
Jay Berkenbilt [EMAIL PROTECTED] writes:

   On Mon, Apr 26, 2004 at 08:13:32PM +0200, Thomas Viehmann wrote:
So: I suggest you submit it for addition to renameutils.
As a side effect, renameutils and your package get a comaintainer.

   Hmmm.  Maybe you should see if the renameutils maintainer is
   willing/interested in including it first; if not I will look at it.  

   I agree that it makes sense for it to be separate from perl; but perhaps
   not separate from renameutils.

 I have to assert, respectfully, that I don't think patmv belongs with
 renameutils or any other existing package.  I guess I'm confused as to
 why the suggestion of including it in another package has come up at
 all.  patmv is its own package with a life outside of these other
 packages.  That should, in my opinion, be sufficient reason to have it
 be a separate package.  I think most upstream authors would be
 reluctant to have their software added to Debian by being combined
 with some other package that they don't have anything to do with.  If
 you disagree, please let me know; I'm definitely open to hearing
 compelling arguments to the contrary.

Tiny packages are generally frowned upon in Debian since they
unnecessarily bloat the Packages file.  So, small scripts like yours
tend to be collected into a single package with other related scripts.

If everyone packaged their pet scripts into separate packages, the
already very large number of packages in Debian would grow enormously.

-- 
You win again, gravity!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Adam Kessel
On Mon, Apr 26, 2004 at 11:17:17AM -0400, Jay Berkenbilt wrote:
 I'd like to request a sponsor for my patmv package.  patmv is a Perl
 script that can be used to do bulk renames on files based on a Perl
 expression (pattern).  I've been using this script for about 10
 years, and it has a small following among current and former
 co-workers.  The idea was inspired by a short example that was
 included with perl 5.000 or one of its betas, but my script is an
 expansion on the original concept.

Can you clarify what the difference is between this script and the
'rename' script currently including in the Debian perl package?  All of
the examples you gave, as far as I can tell, would work just as well with
the 'rename' that is already in Debian.
-- 
Adam Kessel
http://adam.rosi-kessel.org



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

I'd like to request a sponsor for my patmv package.  patmv is a Perl
script that can be used to do bulk renames on files based on a Perl
expression (pattern).  I've been using this script for about 10
years, and it has a small following among current and former
co-workers.  The idea was inspired by a short example that was
included with perl 5.000 or one of its betas, but my script is an
expansion on the original concept.

   Can you clarify what the difference is between this script and the
   'rename' script currently including in the Debian perl package?
   All of the examples you gave, as far as I can tell, would work
   just as well with the 'rename' that is already in Debian.

Hmm.  Looks like rename and patmv have the same common ancestor.  I
didn't realize this already existed, though I tried digging for it in
the perl sources.  (I didn't know what it was called, and I didn't
think to look in the debian/ directory which is where rename is in the
Debian perl distribution.)

There are several differences, though: patmv has logic to handle
recursive renames in an intelligent way and has options for
manipulating the whole path or the last component as an option.  In my
opinion, it also handles file existence cases more robustly and
generates more useful output.

% mkdir -p z
% cd z

With rename:

% mkdir WORK; touch WORK/{1,2,3}.TXT
% rename -v tr/A-Z/a-z/ `find WORK -print`
WORK renamed as work
Can't rename WORK/1.TXT work/1.txt: No such file or directory
Can't rename WORK/2.TXT work/2.txt: No such file or directory
Can't rename WORK/3.TXT work/3.txt: No such file or directory

With patmv:

% rm -rf work
% mkdir WORK; touch WORK/{1,2,3}.TXT
% patmv tr/A-Z/a-z/ `find WORK -print`
mv WORK work
mv work/1.TXT work/1.txt
mv work/2.TXT work/2.txt
mv work/3.TXT work/3.txt

patmv generates output that could be re-executed if needed (though
I've seldom used this feature) and that handles the need for quoting
intelligently:

% touch Someone's Goofy Filename
% patmv tr/A-Z '/a-z_-/ S*
mv 'Someone'\''s Goofy Filename' someone-s_goofy_filename

patmv handles existing file names by prompt the user unless it can't
(in which case it fails without overwriting) or --force is given (in
which case it just renames the file):

% touch 1 2
% rename s/1/2/ 1
1 not renamed: 2 already exists

% patmv s/1/2/ 1
2 exists.  Overwrite? y
mv 1 2

patmv can read files from stdin as well as taking files on the
command-line.  For example, one could convert a large RCS-based source
tree to a CVS repository with something like (untested):

% find . -type f -name '*,v' | grep RCS/  /tmp/1
% tar -c --files-from /tmp/1 -f - | (cd /my/cvs-repo; tar xf -)
% cd /mn/cvs-repo
% find . -type f -print | patmv -w s,RCS/,,

My copyright says that the software can be redistributed and used for
any purpose, which is less restrictive than the Aristic license.  At
the time I wrote my version of the script, I wrote it from scratch
without using any of the original example code which was only a few
lines long anyway.  I could probably be convinced to use the Artistic
license, though for something so short, I see no need to maintain any
kind of artistic control.  (I don't view myself as having violated the
original copyright since I didn't use any of the code and since the
idea was so simple, but if you disagree, by all means let me know.)

--Jay



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Adam Kessel
On Mon, Apr 26, 2004 at 12:00:58PM -0400, Jay Berkenbilt wrote:
 There are several differences, though: patmv has logic to handle
 recursive renames in an intelligent way and has options for
 manipulating the whole path or the last component as an option.  In my
 opinion, it also handles file existence cases more robustly and
 generates more useful output.

Your examples are persuasive that patmv has some advantages over Perl's
rename.  I wonder whether it might be worthwhile to see if patmv could
replace rename in the perl package, though, since it appears to be
intended for an identical purpose.

I suppose on the other hand people might be more aware that the program
exists at all by virtue of a separate package.

(this is a little reminiscent of the recent debate over pdfmerge
http://shorl.com/gumiraladufru).  

I might be willing to sponsor it; let me think about it a bit.
-- 
Adam Kessel
http://adam.rosi-kessel.org



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

There are several differences, though: patmv has logic to handle
recursive renames in an intelligent way and has options for
manipulating the whole path or the last component as an option.  In my
opinion, it also handles file existence cases more robustly and
generates more useful output.

   Your examples are persuasive that patmv has some advantages over Perl's
   rename.  I wonder whether it might be worthwhile to see if patmv could
   replace rename in the perl package, though, since it appears to be
   intended for an identical purpose.

   I suppose on the other hand people might be more aware that the program
   exists at all by virtue of a separate package.

I would prefer it to be a separate package.  I've released it from my
personal software website and have also made a Red Hat package (for my
less enlightened friends have haven't switched yet ;-]).  Also,
rename isn't actually part of the upstream Perl package -- it's
added in Debian by the patch.  In fact, Red Hat distributions also
have a rename command that does something different.  There's no
real reason why patmv should be part of Perl either.  Although it was
definitely inspired by a Perl example, it has, in my opinion, enough
functionality to be a separate package in its own right (in addition
to the good point you make about awareness).  Also, by having it be a
separate package, enhancements or bug fixes can be made without having
to re-release Perl.  (I have every intention of becoming a DD, though
I know this takes some time.)

Although I failed to mention this in my initial post, the thing that
pushed me over the edge and made me decide to submit this package for
sponsorship was the recent inclusion of the renameutils package,
which I learned about in the Debian Weekly News[1] new package list.

1. http://www.debian.org/News/weekly/2004/16/

I feel that patmv is no more special-purpose than renameutils (which
is in its own package) and serves a different cross section of the
Debian user community.

   I might be willing to sponsor it; let me think about it a bit.

I appreciate your consideration.  So that I don't have to come across
as nagging, can you give me some kind of timeframe within which you
expect to respond?  If I don't hear anything within that timeframe,
I'll post a second RFS request. :-)

Thanks!

-- 
Jay Berkenbilt [EMAIL PROTECTED]
http://www.ql.org/q/



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Thomas Viehmann
Hi.

Jay Berkenbilt wrote:
 Although I failed to mention this in my initial post, the thing that
 pushed me over the edge and made me decide to submit this package for
 sponsorship was the recent inclusion of the renameutils package,
 which I learned about in the Debian Weekly News[1] new package list.
Ah. The only thing that kept me from suggesting the same for patmv as
for pdfmerge was that I didn't know which package is would well fit in.
Thanks for taking care of that.
So: I suggest you submit it for addition to renameutils.
As a side effect, renameutils and your package get a comaintainer.

Kind regards

Thomas

P.S.: The case of renameutils is somewhat more generic as it presently
has at least two users. (The upstream and the Debian maintainer.)
-- 
Thomas Viehmann, http://thomas.viehmann.net/


pgplkUv2ayyEY.pgp
Description: PGP signature


Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

   Jay Berkenbilt wrote:
Although I failed to mention this in my initial post, the thing that
pushed me over the edge and made me decide to submit this package for
sponsorship was the recent inclusion of the renameutils package,
which I learned about in the Debian Weekly News[1] new package list.
   Ah. The only thing that kept me from suggesting the same for patmv as
   for pdfmerge was that I didn't know which package is would well fit in.
   Thanks for taking care of that.
   So: I suggest you submit it for addition to renameutils.
   As a side effect, renameutils and your package get a comaintainer.

Thanks for the suggestion.  My preference would still be to have patmv
as its own package as I think patmv and renameutils have different
audiences.  Also, patmv has its own life outside of perl or
renameutils.  My point about renameutils was only that the fact that
this package was recently included into Debian convinced me that there
was a place for something small and special-purpose like my patmv
command.  As for comaintainership, that's always a good idea, but I've
changed patmv about four times in 10 years, so I don't think it will
generate too much activity. :-)

--Jay



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Adam Kessel
On Mon, Apr 26, 2004 at 08:13:32PM +0200, Thomas Viehmann wrote:
 So: I suggest you submit it for addition to renameutils.
 As a side effect, renameutils and your package get a comaintainer.

Hmmm.  Maybe you should see if the renameutils maintainer is
willing/interested in including it first; if not I will look at it.  

I agree that it makes sense for it to be separate from perl; but perhaps
not separate from renameutils.
-- 
Adam Kessel
http://adam.rosi-kessel.org



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

   On Mon, Apr 26, 2004 at 08:13:32PM +0200, Thomas Viehmann wrote:
So: I suggest you submit it for addition to renameutils.
As a side effect, renameutils and your package get a comaintainer.

   Hmmm.  Maybe you should see if the renameutils maintainer is
   willing/interested in including it first; if not I will look at it.  

   I agree that it makes sense for it to be separate from perl; but perhaps
   not separate from renameutils.

I have to assert, respectfully, that I don't think patmv belongs with
renameutils or any other existing package.  I guess I'm confused as to
why the suggestion of including it in another package has come up at
all.  patmv is its own package with a life outside of these other
packages.  That should, in my opinion, be sufficient reason to have it
be a separate package.  I think most upstream authors would be
reluctant to have their software added to Debian by being combined
with some other package that they don't have anything to do with.  If
you disagree, please let me know; I'm definitely open to hearing
compelling arguments to the contrary.

To support my position about patmv and renameutils in particular, I'll
make some additional observations.

patmv and renameutils, in addition to having their own separate lives,
serve different purposes and are likely to be used by different
audiences.

renameutils is a self-proclaimed work in progress.  It appears to be
designed to help people with otherwise interactive renaming tasks.  It
consists of various programs written in C and is built with automake.
It does not use Perl at all.  It helps users perform tasks that could
easily be performed in emacs with keyboard macros or in a shell with
line editing and completion.  It is therefore, in my opinion, targeted
toward more novice users.  The description for renameutils actually
mentions Midnight Commander which I suspect is not as likely to be
used by advanced users who would use patmv.

Here is the description of renameutils:

 The file renaming utilities (renameutils for short) are a set of
 programs designed to make renaming of multiple files faster and less
 cumbersome.

 The file renaming utilities consists two program at the moment, with
 another one in the planning stages. These programs are `qmv' and
 `imv'. The first one, qmv, allows files to be renamed by editing their
 names in any text editor. By changing a letter in a text document, a
 letter in a filename can be changed. Since the files are listed after
 each other, common changes can be made more quickly.

 The second program, imv (interactive mv), is trivial but useful when
 you are too lazy to type (or even complete) the name of the file to
 rename. It allows the filename to be edited in the terminal using the
 GNU readline library. (This is also useful when renaming files in
 Midnight Commander, where the whole filename has to be entered again.)

patmv, on the other hand, is targeted toward people who don't have any
trouble writing a quick perl expression.  It is a tool that performs
its actions without any user intervention (except in the overridable
prompt before override case).  It is very simple and very stable.

The TODO file for renameutils mentions the rename command included
with the Debian distribution of perl a few times and lists the
possibility of including a C-based rename clone.  They seem to be
thinking only of the simple pattern substitution aspects of the
command.  This suggests to me that the renameutils maintainers are not
inclined to include a fancier perl version of the command.  Anyway, a
C clone of patmv could not possibly have the functionality of the perl
patmv program without either being enormously complex or including a
perl interpreter since patmv can take arbitrary perl expressions, not
just s// and tr//.  No simplistic C clone of rename could do something
like:

patmv '$_ = reverse($_) . . . time' *

or

patmv 'if (length  10) { $_ = sprintf(%s..., substr($_, 0, 7)) }' *

As you can see, patmv is not just a pattern substitution program.  It
is not in the same league as renameutils, and I say that without any
disrespect to renameutils, which also serves an important function for
its intended users.

After hearing my arguments, if you still think that patmv should be
combined with another package (perl, renameutils, or otherwise), I'm
definitely open to hearing a compelling argument.  To me, though, it's
clear that patmv is its own package with its own life and, if it is
useful enough to be included in Debian as part of something else, then
it is useful enough to be its own package.

I hope that this email is taken in the positive and respectful spirit
with which it is intended.  Any forcefulness in my language should be
interpreted only as an indication of the strength of my conviction on
this point.  I truly appreciate the suggestions and the implication of
interest that they imply.

Thanks again for listening.

Please let me know if I you are still planning on looking at 

Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Adam Kessel
On Mon, Apr 26, 2004 at 11:17:17AM -0400, Jay Berkenbilt wrote:
 I'd like to request a sponsor for my patmv package.  patmv is a Perl
 script that can be used to do bulk renames on files based on a Perl
 expression (pattern).  I've been using this script for about 10
 years, and it has a small following among current and former
 co-workers.  The idea was inspired by a short example that was
 included with perl 5.000 or one of its betas, but my script is an
 expansion on the original concept.

Can you clarify what the difference is between this script and the
'rename' script currently including in the Debian perl package?  All of
the examples you gave, as far as I can tell, would work just as well with
the 'rename' that is already in Debian.
-- 
Adam Kessel
http://adam.rosi-kessel.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

I'd like to request a sponsor for my patmv package.  patmv is a Perl
script that can be used to do bulk renames on files based on a Perl
expression (pattern).  I've been using this script for about 10
years, and it has a small following among current and former
co-workers.  The idea was inspired by a short example that was
included with perl 5.000 or one of its betas, but my script is an
expansion on the original concept.

   Can you clarify what the difference is between this script and the
   'rename' script currently including in the Debian perl package?
   All of the examples you gave, as far as I can tell, would work
   just as well with the 'rename' that is already in Debian.

Hmm.  Looks like rename and patmv have the same common ancestor.  I
didn't realize this already existed, though I tried digging for it in
the perl sources.  (I didn't know what it was called, and I didn't
think to look in the debian/ directory which is where rename is in the
Debian perl distribution.)

There are several differences, though: patmv has logic to handle
recursive renames in an intelligent way and has options for
manipulating the whole path or the last component as an option.  In my
opinion, it also handles file existence cases more robustly and
generates more useful output.

% mkdir -p z
% cd z

With rename:

% mkdir WORK; touch WORK/{1,2,3}.TXT
% rename -v tr/A-Z/a-z/ `find WORK -print`
WORK renamed as work
Can't rename WORK/1.TXT work/1.txt: No such file or directory
Can't rename WORK/2.TXT work/2.txt: No such file or directory
Can't rename WORK/3.TXT work/3.txt: No such file or directory

With patmv:

% rm -rf work
% mkdir WORK; touch WORK/{1,2,3}.TXT
% patmv tr/A-Z/a-z/ `find WORK -print`
mv WORK work
mv work/1.TXT work/1.txt
mv work/2.TXT work/2.txt
mv work/3.TXT work/3.txt

patmv generates output that could be re-executed if needed (though
I've seldom used this feature) and that handles the need for quoting
intelligently:

% touch Someone's Goofy Filename
% patmv tr/A-Z '/a-z_-/ S*
mv 'Someone'\''s Goofy Filename' someone-s_goofy_filename

patmv handles existing file names by prompt the user unless it can't
(in which case it fails without overwriting) or --force is given (in
which case it just renames the file):

% touch 1 2
% rename s/1/2/ 1
1 not renamed: 2 already exists

% patmv s/1/2/ 1
2 exists.  Overwrite? y
mv 1 2

patmv can read files from stdin as well as taking files on the
command-line.  For example, one could convert a large RCS-based source
tree to a CVS repository with something like (untested):

% find . -type f -name '*,v' | grep RCS/  /tmp/1
% tar -c --files-from /tmp/1 -f - | (cd /my/cvs-repo; tar xf -)
% cd /mn/cvs-repo
% find . -type f -print | patmv -w s,RCS/,,

My copyright says that the software can be redistributed and used for
any purpose, which is less restrictive than the Aristic license.  At
the time I wrote my version of the script, I wrote it from scratch
without using any of the original example code which was only a few
lines long anyway.  I could probably be convinced to use the Artistic
license, though for something so short, I see no need to maintain any
kind of artistic control.  (I don't view myself as having violated the
original copyright since I didn't use any of the code and since the
idea was so simple, but if you disagree, by all means let me know.)

--Jay


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Adam Kessel
On Mon, Apr 26, 2004 at 12:00:58PM -0400, Jay Berkenbilt wrote:
 There are several differences, though: patmv has logic to handle
 recursive renames in an intelligent way and has options for
 manipulating the whole path or the last component as an option.  In my
 opinion, it also handles file existence cases more robustly and
 generates more useful output.

Your examples are persuasive that patmv has some advantages over Perl's
rename.  I wonder whether it might be worthwhile to see if patmv could
replace rename in the perl package, though, since it appears to be
intended for an identical purpose.

I suppose on the other hand people might be more aware that the program
exists at all by virtue of a separate package.

(this is a little reminiscent of the recent debate over pdfmerge
http://shorl.com/gumiraladufru).  

I might be willing to sponsor it; let me think about it a bit.
-- 
Adam Kessel
http://adam.rosi-kessel.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

There are several differences, though: patmv has logic to handle
recursive renames in an intelligent way and has options for
manipulating the whole path or the last component as an option.  In my
opinion, it also handles file existence cases more robustly and
generates more useful output.

   Your examples are persuasive that patmv has some advantages over Perl's
   rename.  I wonder whether it might be worthwhile to see if patmv could
   replace rename in the perl package, though, since it appears to be
   intended for an identical purpose.

   I suppose on the other hand people might be more aware that the program
   exists at all by virtue of a separate package.

I would prefer it to be a separate package.  I've released it from my
personal software website and have also made a Red Hat package (for my
less enlightened friends have haven't switched yet ;-]).  Also,
rename isn't actually part of the upstream Perl package -- it's
added in Debian by the patch.  In fact, Red Hat distributions also
have a rename command that does something different.  There's no
real reason why patmv should be part of Perl either.  Although it was
definitely inspired by a Perl example, it has, in my opinion, enough
functionality to be a separate package in its own right (in addition
to the good point you make about awareness).  Also, by having it be a
separate package, enhancements or bug fixes can be made without having
to re-release Perl.  (I have every intention of becoming a DD, though
I know this takes some time.)

Although I failed to mention this in my initial post, the thing that
pushed me over the edge and made me decide to submit this package for
sponsorship was the recent inclusion of the renameutils package,
which I learned about in the Debian Weekly News[1] new package list.

1. http://www.debian.org/News/weekly/2004/16/

I feel that patmv is no more special-purpose than renameutils (which
is in its own package) and serves a different cross section of the
Debian user community.

   I might be willing to sponsor it; let me think about it a bit.

I appreciate your consideration.  So that I don't have to come across
as nagging, can you give me some kind of timeframe within which you
expect to respond?  If I don't hear anything within that timeframe,
I'll post a second RFS request. :-)

Thanks!

-- 
Jay Berkenbilt [EMAIL PROTECTED]
http://www.ql.org/q/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Thomas Viehmann
Hi.

Jay Berkenbilt wrote:
 Although I failed to mention this in my initial post, the thing that
 pushed me over the edge and made me decide to submit this package for
 sponsorship was the recent inclusion of the renameutils package,
 which I learned about in the Debian Weekly News[1] new package list.
Ah. The only thing that kept me from suggesting the same for patmv as
for pdfmerge was that I didn't know which package is would well fit in.
Thanks for taking care of that.
So: I suggest you submit it for addition to renameutils.
As a side effect, renameutils and your package get a comaintainer.

Kind regards

Thomas

P.S.: The case of renameutils is somewhat more generic as it presently
has at least two users. (The upstream and the Debian maintainer.)
-- 
Thomas Viehmann, http://thomas.viehmann.net/


pgp0.pgp
Description: PGP signature


Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

   Jay Berkenbilt wrote:
Although I failed to mention this in my initial post, the thing that
pushed me over the edge and made me decide to submit this package for
sponsorship was the recent inclusion of the renameutils package,
which I learned about in the Debian Weekly News[1] new package list.
   Ah. The only thing that kept me from suggesting the same for patmv as
   for pdfmerge was that I didn't know which package is would well fit in.
   Thanks for taking care of that.
   So: I suggest you submit it for addition to renameutils.
   As a side effect, renameutils and your package get a comaintainer.

Thanks for the suggestion.  My preference would still be to have patmv
as its own package as I think patmv and renameutils have different
audiences.  Also, patmv has its own life outside of perl or
renameutils.  My point about renameutils was only that the fact that
this package was recently included into Debian convinced me that there
was a place for something small and special-purpose like my patmv
command.  As for comaintainership, that's always a good idea, but I've
changed patmv about four times in 10 years, so I don't think it will
generate too much activity. :-)

--Jay


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Adam Kessel
On Mon, Apr 26, 2004 at 08:13:32PM +0200, Thomas Viehmann wrote:
 So: I suggest you submit it for addition to renameutils.
 As a side effect, renameutils and your package get a comaintainer.

Hmmm.  Maybe you should see if the renameutils maintainer is
willing/interested in including it first; if not I will look at it.  

I agree that it makes sense for it to be separate from perl; but perhaps
not separate from renameutils.
-- 
Adam Kessel
http://adam.rosi-kessel.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: RFS: patmv -- a bulk renaming tool

2004-04-26 Thread Jay Berkenbilt

   On Mon, Apr 26, 2004 at 08:13:32PM +0200, Thomas Viehmann wrote:
So: I suggest you submit it for addition to renameutils.
As a side effect, renameutils and your package get a comaintainer.

   Hmmm.  Maybe you should see if the renameutils maintainer is
   willing/interested in including it first; if not I will look at it.  

   I agree that it makes sense for it to be separate from perl; but perhaps
   not separate from renameutils.

I have to assert, respectfully, that I don't think patmv belongs with
renameutils or any other existing package.  I guess I'm confused as to
why the suggestion of including it in another package has come up at
all.  patmv is its own package with a life outside of these other
packages.  That should, in my opinion, be sufficient reason to have it
be a separate package.  I think most upstream authors would be
reluctant to have their software added to Debian by being combined
with some other package that they don't have anything to do with.  If
you disagree, please let me know; I'm definitely open to hearing
compelling arguments to the contrary.

To support my position about patmv and renameutils in particular, I'll
make some additional observations.

patmv and renameutils, in addition to having their own separate lives,
serve different purposes and are likely to be used by different
audiences.

renameutils is a self-proclaimed work in progress.  It appears to be
designed to help people with otherwise interactive renaming tasks.  It
consists of various programs written in C and is built with automake.
It does not use Perl at all.  It helps users perform tasks that could
easily be performed in emacs with keyboard macros or in a shell with
line editing and completion.  It is therefore, in my opinion, targeted
toward more novice users.  The description for renameutils actually
mentions Midnight Commander which I suspect is not as likely to be
used by advanced users who would use patmv.

Here is the description of renameutils:

 The file renaming utilities (renameutils for short) are a set of
 programs designed to make renaming of multiple files faster and less
 cumbersome.

 The file renaming utilities consists two program at the moment, with
 another one in the planning stages. These programs are `qmv' and
 `imv'. The first one, qmv, allows files to be renamed by editing their
 names in any text editor. By changing a letter in a text document, a
 letter in a filename can be changed. Since the files are listed after
 each other, common changes can be made more quickly.

 The second program, imv (interactive mv), is trivial but useful when
 you are too lazy to type (or even complete) the name of the file to
 rename. It allows the filename to be edited in the terminal using the
 GNU readline library. (This is also useful when renaming files in
 Midnight Commander, where the whole filename has to be entered again.)

patmv, on the other hand, is targeted toward people who don't have any
trouble writing a quick perl expression.  It is a tool that performs
its actions without any user intervention (except in the overridable
prompt before override case).  It is very simple and very stable.

The TODO file for renameutils mentions the rename command included
with the Debian distribution of perl a few times and lists the
possibility of including a C-based rename clone.  They seem to be
thinking only of the simple pattern substitution aspects of the
command.  This suggests to me that the renameutils maintainers are not
inclined to include a fancier perl version of the command.  Anyway, a
C clone of patmv could not possibly have the functionality of the perl
patmv program without either being enormously complex or including a
perl interpreter since patmv can take arbitrary perl expressions, not
just s// and tr//.  No simplistic C clone of rename could do something
like:

patmv '$_ = reverse($_) . . . time' *

or

patmv 'if (length  10) { $_ = sprintf(%s..., substr($_, 0, 7)) }' *

As you can see, patmv is not just a pattern substitution program.  It
is not in the same league as renameutils, and I say that without any
disrespect to renameutils, which also serves an important function for
its intended users.

After hearing my arguments, if you still think that patmv should be
combined with another package (perl, renameutils, or otherwise), I'm
definitely open to hearing a compelling argument.  To me, though, it's
clear that patmv is its own package with its own life and, if it is
useful enough to be included in Debian as part of something else, then
it is useful enough to be its own package.

I hope that this email is taken in the positive and respectful spirit
with which it is intended.  Any forcefulness in my language should be
interpreted only as an indication of the strength of my conviction on
this point.  I truly appreciate the suggestions and the implication of
interest that they imply.

Thanks again for listening.

Please let me know if I you are still planning on looking at