[afew] announcing afew, an universal tagging solution with some fancy features
Justus Winter
4winter at informatik.uni-hamburg.de
Mon Dec 19 06:13:51 PST 2011
Hey Pazz :)
Quoting Patrick Totzke (2011-12-14 17:59:43)
>Hi Justus,
>
>I have just tried your script and have some questions/remarks about it:
>
>* mkdir -p ~/.config/afew ~/.local/share/afew/categories
> As far as I can see, this is not needed if one doesn't use ClassifyingFilter,
> so its OK not to do this directly from the setup.py somehow.
> But it would be nice if a first run uf `afew --learn` would
> create these (or die gracefully instead of raising the afew.DBACL.BackendError).
Ah yes. Good point...
>* if you renamed the README & co to include the suffix ".md" github would nicely
> render them on the project page.
Will do that.
>* I need some more info on how the config works: first, the order in which the
> sections are defined specifies the filter-pipeline yes?
Yes.
> Secondly, what exactly is a "filter object" in the config?
Well, you can define filter types either in the configuration file or
in pure python code (see afew/filters). To use them, you need to
create instances of these types.
The config file is just another way of defining python classes and
creating objects. See afew/Settings.py for details.
> Specifically, what do these 3 lines do:
> https://github.com/teythoon/afew/blob/master/docs/tag_filters#L39
They create two objects (ShitFilter.0 and ShitFilter.1) of type
ShitFilter (defined in line 32-33). ShitFilter inherits from
SpamFilter and adjusts the message field. ShitFilter.1 also customizes
the message.
>* this is surely a user error: I cannot use afew for initial tagging as expected:
> I installed as stated in the README,
> trained some of my existing tags and called `afew --update-reference` and `afew --update`.
> The test with `afew --classify -- ..` works nicely.
> Now I tagges all my mails with is:new, and called `afew --tag --new`.
> This returns immediately without output and all my messages are still tagged new.
> Also, -vv does not result in any output..
> ideas?
Is your new tag called 'is:new'? Mine is just called 'new'. That could
be a problem since 'new' as tag for new mails is currently hardcoded
at various locations. I thought it was universally accepted, but then
again hardcoding these things is obviously a bad practice...
Cheers,
Justus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .signature
Type: application/octet-stream
Size: 17 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111219/240d2652/attachment.obj>
More information about the notmuch
mailing list