Bug#580893: arbtt: Add option to exclude categories

Felipe Sateler fsateler at gmail.com
Sun May 9 22:10:55 CEST 2010


On Sun, May 9, 2010 at 14:56, Joachim Breitner <mail at joachim-breitner.de> wrote:
> Hi,
>
> Am Sonntag, den 09.05.2010, 13:35 -0400 schrieb Felipe Sateler:
>> On Sun, May 9, 2010 at 12:40, Joachim Breitner <mail at joachim-breitner.de> wrote:
>> > Should be easy to implement. I’m inclined to just extend --exclude to
>> > support two kinds of invocations:
>> >  --exclude tag
>> > or
>> >  --exclude category:
>> >
>> > This is in line with the new --intervals feature (not released yet) that
>> > also takes either a tag or a category. Is that what you want?
>>
>>
>> Not really sure about usefulness, but my first attempt at seeing if
>> arbtt supported this was a glob pattern (Program:*). Perhaps someone
>> can come up with a more interesting use for such a feature. I'm happy
>> with being able to do -x category:
>
> I implemented that now, and pushed it to the Darcs repository.
>
> But I’m wondering if --exclude is really what you want. With --exclude,
> you exclude *samples* from being taken into consideration, not the tags
> from the output of the standard --total-time report. So
> $ arbtt-stats --exclude Program:*
> would give you statistics about the time where you were using no program
> at all.

Aah, yes you are right. I do want to filter output, not samples.

>
> If you do want to filter the output, the exclude/include list for that
> should be an option only relevant to the --total-time report. I have to
> think of a good command line syntax for that.

--output-exclude and companion --output-only?

>
> Note that maybe a manual "grep -v" is enough to implement this,
> following the good old Unix philosophy?

That's what I've been doing so far. Maybe I've been doing preemptive
optimization, but if I wanted to filter more than one category, the
invocation line grows substantially.


> Anyways, you got me thinking if maybe the concept of “Category” could
> actually be removed from the arbtt in a way that allows you to get the
> feature youself in categorize.cfg. A new command for that file, maybe
> "exclusive <tag-pattern>" would tell arbtt that it should make sure
> there is at most one tag matching the pattern assigned to a sample. E.g.
> "exclusive Program:*". The colon would have no special meaning to arbtt.
> The asterisk can then be used in --exclude to exclude categories
> (--exclude "Program:*") and other places.
>
> This would allow for hierarchial tags as well. I could make Project:*
> exclusive, and then have pie-chart-like-reports about
> "Project:Debian:*".

Hierarchical tagging sounds useful.

>
> The --every-category flag would be difficult to implement this way,
> though.

What would this flag do? it's not in the man page (or in the binary I
have). Or do you mean --each-category?

>
> But I’m not sure if it is worth the extra complexity on the user
> interface level. Any opinions?

And it would probably mean debugging the configuration file when the
tagging rules are wrong, which may not be desired.

>
>
>> > There is a mailinglist at http://lists.nomeata.de/mailman/listinfo/arbtt
>> > that you might be interested in joining.
>>
>> Hmm, looks low traffic enough. I don't really subscribe to mailing
>> lists, though. I prefer NNTP gateways. Is there one for this list?
>
> I never worked with NNTP gateways... I guess I need an NNTP server for
> that?

You don't. Gmane offers a free one. http://gmane.org/subscribe.php


-- 

Saludos,
Felipe Sateler




More information about the arbtt mailing list