bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Extracting selected messages from a po file


From: Martin Quinson
Subject: Re: Extracting selected messages from a po file
Date: Thu, 13 Mar 2003 14:01:47 +0100
User-agent: Mutt/1.5.3i

On Thu, Mar 13, 2003 at 11:34:01AM +0100, Bruno Haible wrote:
> Martin Quinson wrote:
> 
> > I had an idea this night : what about an utility using a LDAP-like syntax to
> > filter some messages from the input file ? It could be renamed msgselect.
> > 
> > The previous request would be expressed with :
> > 
> > msgselect "(|(fuzzy=yes)(translated=no)(comment=.*FIXME.*))'" file.po > 
> > selected.po
> > 
> > which is ways easier to remember and to use, isn't it? Moreover, if we stick
> > to the LDAP syntax, that's a somehow standard.
> 
> The msg* tools up to now view each PO file as a list of records, and
> follow the philosophy of the small bricks that can be glued together
> through pipes. This gives a good deal of flexibility.

That's not completely true. You have to write temp po files and msgcat them,
as discussed in the other thread.

> But you are right, it makes sense to view a PO file as a list of
> records with fields; as a "table" in database speak. For someone with
> no experience with LDAP, this syntax is strange. But one could imagine
> an msgselect with SQL query syntax, something like
> 
>    msgselect 'SELECT fuzzy is yes AND translated is no AND comment has 
> "FIXME"'
> 
> SQL syntax seems more widely known and more legible than LDAP syntax,
> isn't it?

Well, if you implement the SQL syntax, I'll be more than happy. But I like
better the ldap syntax, which is more explicit and less verbose IHMO. 
If you find the time to implement the msgfilter tool, I may consider
implementing a flag to use either SQL syntax or LDAP one. But I doubt I'll
have time for that in the next few centuries :-(

Bye, Mt.

-- 
Freedom is not free.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]