Re: scoring top posters

2015-09-20 Thread Matthias Apitz
El día Saturday, September 19, 2015 a las 07:46:53PM -0700, Ian Zimmerman 
escribió:

> Back to my bad habit of resurrecting old threads :)
> 
> Do you really score "bad" messages with _negative_ scores?  The manual
> says (section 3.24):
> 
>  A message's final score is the sum total of all matching score
>  entries. However, you may optionally prefix value with an equal sign
>  (“=”) to cause evaluation to stop at a particular entry if there is a
>  match. Negative final scores are rounded up to 0.
> 
> ... so, no matter how "bad" a message is (let's say, a top post, a
> thread hijack, an ALL CAPS subject, and unlimited line length LOL), the
> worst it can score is 0.  Am I right?  I haven't used mutt scoring yet,
> so I am trying to learn how to best put it to my purposes.  It seems
> to me that for flagging "badness" positive scores would be much more
> convenient.  Am I missing something as usual?

You missed, that you can score as well positive values and the rules are
summed up to a final score value, "rouded" to zero if at the end of the
day negative. See my score part of my ~/.muttrc (some mail addrs
overwritten with ).

matthias


...
# scoring:
#
# see http://www.mutt.org/doc/devel/manual.html#score-command
#
# the start was also loosely based on: 
http://www.strcat.de/dotfiles/mutt.scoring
#
#
# Note: Scoring on a (X-)Header or Body won't work due to performance issue, 
only
# information from the Index (like Subject: To: From: ,,,) can be scored.

# this will show the score value (%4N) on the left of the Index
#
set index_format="%4N %4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s"

# set the threshold values
#
set score_threshold_delete=0# delete messages with score 0
set score_threshold_flag=50 # auto-flag messages w/ score >= 50
set score_threshold_read=5  # mark messages w/ score <= 5 as read

# First remove all scorings
#
unscore *

# Default - Scoring
#
score '~A'+10 # all messages start with 
score 10
score '~g|~G' +2  # PGP signed / encrypted 
messages
score ~F  +20 # flagged mails are 
important
score ~D  =0  # this is a deleted email
score ~S  =0  # superseded messages

# The good ones
#
score '~t g...@unixarea.de'   +20 # i'm quite important
score '~f g...@unixarea.de'   +20 # i'm quite important
score '~s ubuntu-phone'   +10 # 
score '~f webmas...@cubaliteraria.cu' +10 # Cuba Literaria
score '~f epilob...@aol.com'  +30 # needs +30 due to -30 
for AOL

# SPAM(er)
#
score '~f xxx...@gmail.com'   -30 #
score '~f x...@hiwaay.net' -30 #
score '~f @aol.com'   -30 # 
score '~f webmaster@*'-10 # Webmasters kidnapped by 
evil cult :>
score '~s ^test$' -   # all messages w/ subject 
"test" are killed
score '~s sex | ~s adult' -   # STFU
score '~f anonymous'  -   # Yeah. Sure. Evil hackers
score '~='-   # all duplicates are 
killed
score '~s ^unsubscribe$ !(~p|~P|~Q|~F)'   -   # all msgs w/ subject 
"unsubscribe" not by myself are killed
score '~s "for sale"' -   # sale yout compter. 
moron..
score '!~f@'  -   # no mail address present?
score "~f '^([^ <>@]+ ){5,}'" -   # a realname consisting 
of >=5 portions is invalid, too

# threads I do not want anymore becaused I'm tired of the Subject:
#
score '~s "Gmirror/graid or hardware raid"'   -
score '~s "Questions about freebsd-update"'   -
score '~s "Microsoft Now OpenBSD Foundation"' -
score '~s "Building TB from source code"' -
score '~s "^Facebook$"'   -
score '~s "^Re: Facebook$"'   -
score '~s "How to change mouse cursor to standard hand cursor"'   -
score '~s "USB stick and some help with it"'  -
score '~s "interesting comment from a poster on phoronix"'   -
score '~s "HTTPS on freebsd.org, git, reproducible builds"'   -
...

-- 
Matthias Apitz, ✉ g...@unixarea.de, 🌐 http://www.unixarea.de/  ☎ 
+49-176-38902045
No! Nein! ¡No! Όχι! -- Ευχαριστούμε!


Re: header cache annoyance

2015-09-20 Thread Christian Ebert
* Ian Zimmerman on Saturday, September 19, 2015 at 17:28:18 -0700
> On 2015-09-20 01:43 +0200, Christian Ebert wrote:
>> printf '%s' "/full/path/to/directory" | md5 | xargs rm -r

The `-r` should have been omitted of course.

> Thanks for the tip, it almost works :P On which system is there a md5
> program?

BSD-like Mac OS X, sorry, hadn't thought of that. Conversely it
doesn't come with md5sum.

> Here:
> 
> [9+0]~$ folder=Mail/inbox
> [10+0]~$ printf '%s' `readlink -f $folder` | md5sum
> 6937aaf0469360e061c78ffae25359d2  -
> [11+0]~$ printf '%s' `readlink -f $folder` | md5sum | awk '{print $1;}'
> 6937aaf0469360e061c78ffae25359d2

That would not work here because readlink doesn't have an -f
option and afaics no way to display the full path. I would
probably do something like to handle a relative path:

$ printf '%s/%s' "$PWD" "$folder" | md5 | xargs rm

-- 
\black\trash movie _SAME  TIME  SAME  PLACE_
 --->> http://www.blacktrash.org/underdogma/stsp.php
\black\trash audio   _ANOTHER  TIME  ANOTHER  PLACE_
--->> http://www.blacktrash.org/underdogma/atap.html


Press any key to continue

2015-09-20 Thread Ian Zimmerman
Mutt asks me this after any pipe-message command.  I can see how it is
necessary for commands that produce output; otherwise I wouldn't get a
chance to see the output.  But what about commands that produce nothing
on stdout?  Some non-interactive commands may save their output in a
file, so their stdout is empty.  And then there are commands with an
interactive UI loop of their own, like lynx.  For both of these types
the extra prompt to close the output is useless and annoying.  Can I get
rid of it?

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.


Re: Press any key to continue

2015-09-20 Thread Cameron Simpson

On 20Sep2015 21:36, Ian Zimmerman  wrote:

Mutt asks me this after any pipe-message command.  I can see how it is
necessary for commands that produce output; otherwise I wouldn't get a
chance to see the output.  But what about commands that produce nothing
on stdout?  Some non-interactive commands may save their output in a
file, so their stdout is empty.  And then there are commands with an
interactive UI loop of their own, like lynx.  For both of these types
the extra prompt to close the output is useless and annoying.  Can I get
rid of it?


I have:

 set wait_key=no

In principle you can write macros to turn this on (or off) around specific 
actions.


The price for the above, absent special macros, is that I need to pipe commands 
through less if I care to review their output.


Cheers,
Cameron Simpson