[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: patmv -- a bulk renaming tool

>   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

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

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


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 patmv and
considering sponsoring it.  Thanks.


Jay Berkenbilt <ejb@ql.org>

Reply to: