Re: Automatic zipping of attachments

2004-09-21 Thread dAniel hAhler
Hello TBTECH,

on Tue, 21. Sep 2004 at 09:57:26 +0100 Foster, Graham wrote:

 Isn't there a Python plugin already which might be able to handle
 this??

see http://kaishaku.org/software/tbpyxie/

A really great plugin which allows executing Python code in templates (I
use it quite a lot in my centric template setup and it was the reason to
explore the Python programming experience).

You could parse the list of attachments, zip them and generate a new
message, but it probably needs a manual filter to create a new message
where the zip gets attached.

Unfortunately the plugin author moved over to Becky and the plugin is
not available for download anymore.
You can make a donation and if it reaches 70 USD the source will be
released under GPL.

What a pity.. it's a great plugin and a big loss of a plugin author.
Simply because the TB plugin system did not seem to get any development
attention for a long time now and the Becky plugin API seems to provide
much more flexibility.


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
ICQ#152282665
Random software tip: [***] The Bat! - EMail client
(http://www.ritlabs.com/the_bat/)

Lifted with The Bat! 2.12.03 on Windows XP Service Pack 2.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: RegEx for null or no body in message

2004-08-09 Thread dAniel hAhler
Hello TBTECH,

on Sun, 8. Aug 2004 at 19:20:31 -0400 Cricket wrote:

 Any way to search for a null body in a message, or no body in a
 message with TB?
d Have you tried using a manual filter with the RegExp '^$' for 'Text'?
 That would match any message that has a blank line in it .. like this
 one. It has 5 blank lines.

You're right. This is because of multiline mode, so this RegExp would do
it instead:
(?-m)^$

probably it may be good to allow whitespace-only in the body:
(?-m)^\s*$


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
Lifted with The Bat! 2.12.03 on Windows XP Service Pack 1.
Random software tip: [***] WinAmp Advanced Controls
(http://www.niversoft.com/products/nadvctrls-en.html)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: RegEx for null or no body in message

2004-08-08 Thread dAniel hAhler
Hello TBTECH,

on Sun, 8. Aug 2004 at 09:39:10 -0500 Greg Strong wrote:

 Any way to search for a null body in a message, or no body in a
 message with TB?

Have you tried using a manual filter with the RegExp '^$' for 'Text'?


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
Lifted with The Bat! 2.12.03 on Windows XP Service Pack 1.
Random software tip: [***] The Bat! - EMail client
(http://www.ritlabs.com/the_bat/)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: View Modes

2004-07-18 Thread dAniel hAhler
Hello TBTECH,

on Sat, 17. Jul 2004 at 10:47:49 +0100 Morgan Pugh wrote:

   Is anyone else having problems with 2.12.00 regarding View Modes?
 what do you mean?
 I set things like threads but they don't work when I load that view
 mode :(

You mean you chose Thread by References for example?

Instructions to reproduce what you mean might help to track the problem
down..


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
Lifted with The Bat! 2.12 RC/4 on Windows XP Service Pack 1.
Random software tip: [***] jEdit, for software development
(http://www.jedit.org)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: View Modes

2004-07-16 Thread dAniel hAhler
Hello TBTECH,

on Thu, 15. Jul 2004 at 22:12:00 +0100 Morgan Pugh wrote:

   Is anyone else having problems with 2.12.00 regarding View Modes?

not that I know of.. what do you mean?


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
Lifted with The Bat! 2.12 RC/4 on Windows XP Service Pack 1.
Random software tip: [***] PowerPro (http://www.windowspowerpro.com)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: RegEx Coach

2004-06-30 Thread dAniel hAhler
Hello TBTECH,

on Wed, 30. Jun 2004 at 14:18:14 +0200 Roland Burger wrote:

 on the Polish TheBat list is mentioned the URL for RegEx Coach:
 http://www.weitz.de/regex-coach/
 I don't know if this is good or not. Does anyone know it?

Yup. Excellent program.. but rather for testing/modelling than for
tutorial-use.


-- 
:dAniel_hAhler: shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
Lifted with The Bat! 2.12 Beta/1 on Windows XP Service Pack 1.
Random software tip: [***] jEdit, for software development
(http://www.jedit.org)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Reply addressing cleanup macro

2004-04-15 Thread dAniel hAhler
Hello bats,

on Thu, 15. Apr 2004 at 09:24:52 +0200 Krzysztof Kudlacik wrote:

 I'd use a python script for that.
 Hmmm ... :(
 Is  there any other way to obtain this behaviour of TB!? It means: without
 Python?

You just want to kill more than just one address? Take a look at the
MyMacros plugin. It has while() and StrReplace() - both could be used
for that.


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Reply addressing cleanup macro

2004-04-15 Thread dAniel hAhler
Hello bats,

on Thu, 15. Apr 2004 at 12:26:32 +0200 Krzysztof Kudlacik wrote:

 You just want to kill more than just one address?
 Yes. I want to remove them from CC list, if they are present.

Try this:
-8
%_s1=''%-
%_newCC=%CCLIST%-
%SETPATTREGEXP='(?i)(yourpattern)'%-
%until(s1, , %-
%%RegExpBlindMatch(%%_newCC)%%-
%%_s1=%%SUBPATT(1)%%-
%%IF:'%%_s1''':#%%_newCC='%%_s1'#%%-
)%-
%CC=''%-
%SETPATTREGEXP='(.*?)(\s*,\s*$)'%-
%IF:RegExpMatch='%_newCC':%CC=%SUBPATT(1):%-
%CC=%_newCC%-
-8

Just apply yourpattern, eg [^,^]*(@domain\.tld\s*[,$]). The part in
the round parenthesis is going to be removed.
in case we remove the last address we'll have to make sure to kill the
remaining ',', this is checked after %CC=''.

I did not test this, so there might be some syntax error or even a
infinite loop with the until-part, let me now.. :)

 Take a look at the MyMacros plugin. It has while() and StrReplace() -
 both could be used for that.
 :)  thx for your tips, but I am not a programmer - only end user. Then I
 have to use stuff prepared by others.

I understood.. :o)

Things would be a lot easier if MyMacros' StrReplace would support
RegExps.
Perhaps a good idea to ask the author to implement this, for future
tasks.


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Reply addressing cleanup macro

2004-04-14 Thread dAniel hAhler
Hello bats,

on Tue, 13. Apr 2004 at 13:49:10 -0700 Januk Aggarwal wrote:

 If not, I'll write my own, but I thought I'd check here before wasting
 the hour or two.

I have not exactly what you're looking for, but this is sth that I've
put up to kill %FROMADDR from the recipient list (TO + CC) - useful when
I reply-to-all and don't want to send it also to myself:

-8
%REM=___kill %FROMADDR from CCLIST; for reply-to-all%-
%SETPATTREGEXP='(.*)?((,|^).*%FROMADDR[^\w]*)(.*)?'%-
%REGEXPBLINDMATCH='%CCLIST'%-
%IF:%SUBPATT='0':%CC=''%CC=%SUBPATT='1':''%-
%IF:%SUBPATT='4':%CC=%SUBPATT='4':''%-
%-
-8


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Reply addressing cleanup macro

2004-04-14 Thread dAniel hAhler
Hello bats,

on Wed, 14. Apr 2004 at 16:13:16 +0200 Krzysztof Kudlacik wrote:

 I have not exactly what you're looking for, but this is sth that I've
 put up to kill %FROMADDR from the recipient list (TO + CC) - useful when
 I reply-to-all and don't want to send it also to myself:
 It works nice ;)
 But  it  has  one disadventage - it kills only one e-mail address which is
 defined in properties of account. It fails if I use also some aliases. Can
 it  be improved to clear also some other aliases not mentioned directly in
 account properties?

I'd use a python script for that.
First you'll need the TBPyxie (http://www.google.com?q=tbpyxie) plugin
and can then use something like this:

-8
%Py(
from re import sub
from string import strip

cclist = '''%CCLIST'''
cclist = '''huibla, [EMAIL PROTECTED], daniel [EMAIL PROTECTED], [EMAIL PROTECTED], 
hoschi, '''

killlist = ['bla', 'oschi']

for kill in killlist:
  cclist = sub( r'[^,^]*' + kill + r'[^,$]*,?', '', cclist )

cclist = strip(cclist, ', ')
)%-
%CC=''%CC='%PYX(cclist)'%-
-8

That's quite powerful.
We put the %CCLIST into a python variable. killlist is a list of strings
that should be killed.
We loop through every string in this list and do a re.sub on that. First
param is a regex pattern to match, second is the replacement and the
third param is the string we want to be replaced.
After looping we strip commas and spaces from cclist, then delete the
old %CC and put the new in there instead.

Please note: the whole thing is very hungry. everything put into
killlist will kill an address, if it's in there. So if you want to kill
every address on a specific domain you should set killlist =
['@domain.tld'].

btw: the 'r' in front of a string simply means: raw string, so
backslashes won't be replaced. I think we would not need it here, but
for regexps you should always use raw strings.

HTH, I replaced my old CCLIST-killer with this one, too.. :)


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Changing SMTP server on the fly: is the %SMTP macro worth introducing?

2004-04-14 Thread dAniel hAhler
Hello bats,

on Thu, 15. Apr 2004 at 00:05:37 +0300 Maksym Kozub wrote:

 I am interested in whether anybody else thinks of that as a useful
 feature worth posting as a wish on bugtrack.

It would be nice, of course, to have such a macro.

But I think it's not easy to implement, because every message would have
to be assigned to a specific smtp server then.
I think this is related to the fact that drafts in the Outbox don't
remember their Privacy (PGP, ..) settings.

Sure, it could be done and is definitely worth a wish (please mention
the Privacy settings then, because it can be combined and surely
extended with other useful per message settings in the future).

But I think your problem and that for the novice users would be much
better targeted at with a dropdown list, where you can enter the server
you want and that provides all the servers from your accounts to quick
configure. This box would be a global override (when sending out
actually) and should be use account specific smtp servers by default.
This editable dropdown list should then be available for the toolbars,
which should have been customizable long ago.


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Reply addressing cleanup macro

2004-04-14 Thread dAniel hAhler
Hello bats,

on Wed, 14. Apr 2004 at 10:39:21 -0700 Januk Aggarwal wrote:

DH That's quite powerful.
 That does look good.  If only I didn't have to install a program in
 addition to the plugin...

The plugin simply provides an interface to the other program. It's a
very powerful scripting language and since I installed it for TheBat I
found many uses for other tasks here.
Even Google is powered by Python.. 8)


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: using different smtps

2004-03-12 Thread dAniel hAhler
Hello bats,

on Thu, 11. Mar 2004 at 22:57:17 -0800 K. Shantanu  wrote:

 Maybe a small example. What is QT?

Roelof explained it quite good, but the example is missing.. you would
create a QT in the QT editor (ctrl-shift-q or through the menu) and
name it 'A1' (for 'Account 1') and simply put a line like this into
it:
-8
ACCOUNT=Accountname
-8
where Accountname should be the name of the account you want to send
from.

Then, while writing the message just type A1 (with surrounding
whitespace) and hit ctrl-space. this should do the same as chosing the
account from Options/Active account.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast .




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: BUG: Pyxie plugin output is dismissed in filter's new-message-templates

2004-03-04 Thread dAniel hAhler
Hello bats,

on Thu, 04. Mar 2004 at 10:46:39 +0100 Carsten Thönges wrote:

 Thanks for your answer, but are you sure that you tested it with a
 Sorting Filter (and not plain QT)?
 Hm, no, sorry :-)

So this is a bug, right?

 text = '''%TEXT'''
[...]
 if not search(r'(\n\n)', text):
text = text + '\n\n' + 'Non-text-portions stripped..'
 For tasks like that you might want to take a look at Python's email
 module.

Thanks for the hint, but as there is no way to get the full message
source anyway (without exporting to an external file), this is far
enough for me that way.
The only feature I could get out of this, would be to really strip
non-text MIME parts.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Mar2004 (4.1.357).




http://www.silverstones.com/thebat/TBUDLInfo.html


BUG: Pyxie plugin output is dismissed in filter's new-message-templates

2004-03-03 Thread dAniel hAhler
Hello bats,

(..reposted from tbudl..)

I want to setup a filter that sends a message to Spamcop, but removes
data that could let me get more spam.

For this I want to use the (greatgreatgreat :) Python plugin Pyxie:

-8 template for Forward to filter action 8-
%Subj=%OSubj%-
%From='[EMAIL PROTECTED]'%-
%PY(
from string import replace
from re import sub
text = tb.macro(r'%%TEXT')

text = replace(text, '\nDelivered-To: GMX delivery to xxx)', '')
text = re.sub('[EMAIL PROTECTED]', 'protected', text)

print text
)%-
-8

But I get an empty message in the outbox.
Even a simple
-8
%Py(
print 5
)
-8
fails.

Fortunately the MyMacros plugin works and I can use it's %StrReplace
function..

Another bug I discovered:
when executing my filter on a message in the outbox (just for faster
testing), the original mail gets hidden!! - until I press ESC or move
to another folder and back to outbox again.
This is because I do this on a draft and the filter moves the message
to SPAM (that's were I want to use the filter and you _have to_ move
actually), where it appears as a parked message.
I think it's good, that a draft gets not moved out of Outbox, but it
shouldn't get hidden.
So this is bug #2.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: BUG: Pyxie plugin output is dismissed in filter's new-message-templates

2004-03-03 Thread dAniel hAhler
Hello bats,

on Wed, 03. Mar 2004 at 22:27:44 +0100 Carsten Thönges wrote:

 -8 template for Forward to filter action 8-
 [...]
 %PY(
 from string import replace
 from re import sub
   ^^
 a) import re

 text = tb.macro(r'%%TEXT')

 text = replace(text, '\nDelivered-To: GMX delivery to xxx)', '')
 text = re.sub('[EMAIL PROTECTED]', 'protected', text)
  ^^^ or b) »text = sub(...«
 print text
 )%-
 -8
 I get an error with your code. But it works with either
 modification a) or b).

Thanks for your answer, but are you sure that you tested it with a
Sorting Filter (and not plain QT)?

It does not even work with a simple %PY(print 5) for the forward/new
message template here.. (message will be created, but with empty body.

I'm now using %QINCLUDE(!protext) for the forward template, which is
this:
-8
%IF:'%FOLDERNAME''SPAM':'%FROM=!! only from SPAM folder%TO=':#%-
%Subj=%OFullSubj%-
%From='[EMAIL PROTECTED]'%-

%PY(
from re import sub, search
from string import strip
text = '''%TEXT'''

text = sub('(?i)(Delivered-To: xxx'\
'|((X-POPFile-Link|X-Text-Classification|X-GMX-Antispam|X-GMX-Antivirus): 
))[^\n]*\n', '', text)
text = sub('(?i)(To|Message-ID|References|In-Reply-To): [^\n]*\n', r'\1: snip\n', 
text)
text = sub('(?i)((|xx)\s*)?[^\s]*xx[^\s;]*', 'snip', text)

text = text.strip()

if not search(r'(\n\n)', text):
   text = text + '\n\n' + 'Non-text-portions stripped..'

)%-
%PYX(text)%-
#%-
-8

That works, but sometimes (has probably to do with opening sorting
office/QT manager) the filter does not work anymore: it changes read
status and colour group, but does not put the messages to Outbox.
Then I cannot close TB, it simply hangs, but without high CPU load.
This seems connected to the problem that Pyxie-plugin output does not
get redirected in general.

I'm also using avast! macros and MyMacros.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Mar2004 (4.1.357).




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-25 Thread dAniel hAhler
Hello Januk,

on Wed, 25. Feb 2004 at 09:38:19 -0800 you wrote:

AL As solution can be used trick with creating 128+ macros (one macro for
AL each encoded char), but I'm not _so_ crazy
 Why not just escape the %?  %% inserts the character % instead of
 evaluating a macro.

You then would have to use sth like PHP's addslashes(), like
%addescapes() which would escape all %s in the string you want to
decode - but passing that string to the %addescapes()-function would
not work either.
TB itself would have to provide a special macro for that.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342).




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-24 Thread dAniel hAhler
Hello Alexander,

on Wed, 25. Feb 2004 at 07:04:01 +0500 you wrote:

dh So this is a problem of the plugin API?
 Is it not API bug, it's back side of power - any parameter will be
 interpreted before passing to internal function, and % is prefix for TB
 macroses, thus - in case of paramater value (for example)
[...]
 Peter%20Palmreuther
[...]
 As solution can be used trick with creating 128+ macros (one macro for
 each encoded char), but I'm not _so_ crazy

And it wouldn't help, AFAICS, as TB tries to express the macro
%20Palmreuther in the above case, not just %20.

Glad we have Python.. *g


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342).




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-22 Thread dAniel hAhler
Hello dAniel,

on Fri, 20. Feb 2004 at 23:52:31 +0100 I wrote:

d Installed Python now, but having a last issue.. the %Py macro seems to
d make up a new line.

It's print, as I just read in the tutorial. Adding a trailing comma
should avoid a newline.. says the tutorial..

JFI.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342).




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote:

 Is it possible to convert %20 back to space or any other special chars
 to its real value?
C Python.

I was sure you would come up with that.. :)

Now I'm just installing Python. I hope it works with the cygwin
version?! We'll see..

C --8---cut here---start-8---
C %_tbvar=Peter%%20Palmreuther

C %Py(
C import urllib

C quoted_string = tb.macro(r'%%_tbvar')

what's the 'r' for?

C print urllib.unquote(quoted_string)

simple.. :)


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 18:24:04 +0500 Alexander Leschinsky wrote:

dh Any suggestions please? :)
A Macro from MyMacros

do you mean %StrReplace?
That would probably be bad to setup..


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 18:16:07 +0100 I wrote:

d Now I'm just installing Python. I hope it works with the cygwin
d version?! We'll see..

It does not.. the plugin requires python23.dll and shuts TB down if
it's not found.

So I will have to install windows binaries, but that can wait.

Thanks anyway.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 22:17:00 +0500 Alexander Leschinsky wrote:

CT Python.
A And plugin for executing Python scripts (mentioned in KB)

What's KB? Knowledge Base? which?


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 18:55:01 +0100 Carsten Thönges wrote:

 Now I'm just installing Python. I hope it works with the cygwin
 version?! We'll see..
C I bet it won't work.

You won.. :)

C But the native Windows version is OK. You should also look for a
C good editor as the provided editor »Idle« is not very good (SPE,
C Boa Constructor, Emacs, ...)

I'll use my beloved JEdit for that..


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote:

 Is it possible to convert %20 back to space or any other special chars
 to its real value?
C Python.

C --8---cut here---start-8---
C %_tbvar=Peter%%20Palmreuther

C %Py(
C import urllib

C quoted_string = tb.macro(r'%%_tbvar')
C print urllib.unquote(quoted_string)
C )
C --8---cut here---end---8---

Installed Python now, but having a last issue.. the %Py macro seems to
make up a new line.

I have this:
-8
%SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL 
PROTECTED])(?:(?:\?\w)||$)(?:.*from=(.*?))?%-
%REGEXPBLINDMATCH=%ClipBoard%-
%IF:%SUBPATT=2'':#%-
%Py(%-
import urllib
quoted_string = tb.macro(r'%%SUBPATT=2')
print urllib.unquote(quoted_string)
)%-
%__%IF:'%_lang'='deutsch': schrieb in:%-
%__ wrote in# %-
mid:%SUBPATT=1;
-8

and btw: how would I give a TB macro the result of urllib.unquote?
As Python should be straight forward I tried
tb.macro(r'%%_author') = urllib.unquote(quoted_string)
but no luck..


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


MIME(?)-decoding in QT

2004-02-19 Thread dAniel hAhler
Hello bats,

From Peter Palmreuther comes this message-id QT (in
mid:[EMAIL PROTECTED]):

-8
%SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL PROTECTED])(?:(?:\?\w)||$)%-
%REGEXPBLINDMATCH=%ClipBoard%-
mid:%SUBPATT=1;
-8

It supports three ways of inserting msgid from clipboard data and I
extended it to put the emails author in there, too:

-8
%SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL 
PROTECTED])(?:(?:\?\w)||$)(?:.*from=(.*?))?%-
%REGEXPBLINDMATCH=%ClipBoard%-
%IF:%SUBPATT=2'':#%-
%__%IF:'%_lang'='deutsch':%SUBPATT='2' schrieb in:%-
%__%SUBPATT='2' wrote in# %-
mid:%SUBPATT=1;
-8

The problem is, that the Name is MIME(?) encoded, like this:
Peter%20Palmreuther

Is it possible to convert %20 back to space or any other special chars
to its real value?

Any suggestions please? :)


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the domain part from a mail address

2004-02-05 Thread dAniel hAhler
Hello bats,

on Thu, 5. Feb 2004 at 23:49:12 +0100 Arjan de Groot wrote:

 %IF:%TOhasyahoogroups.comin it:%FROM=Arjan de Groot [EMAIL PROTECTED]:
 %FROM=Arjan de Groot [EMAIL PROTECTED]

%SETREGEXPPATT='.*?@(yahoogroups.com)'-
%IF:%REGEXPMATCH='%TO''':%FROM=Arjan de Groot [EMAIL PROTECTED]:%-
%FROM=Arjan de Groot [EMAIL PROTECTED]

A I tried it, but alas, no success. :-(

As Zygmunt wrote, it should be %SETPATTREGEXP instead of
%SETREGEXPPAT, I didn't test it.

Either you try this again or use the (modified) solution of Januk, but
you should get your %IF-solution.. :)

A The %IF part in particular got me puzzled. What does it mean?
A If match matches To-field doesn't match blank

IF regular expression matches THEN %FROM=Arjan de Groot
[EMAIL PROTECTED] ELSE %FROM=Arjan de Groot [EMAIL PROTECTED]

..and the regular expression checks for the pattern
,*?(yahoogroups.com) (anything which ends with @yahoogroups.com)
in %TO..

you should probably include the THEN and ELSE parts of the %IF macro
in ''s, from the beginning of : upto the end, like this:

%SETREGEXPPATT='.*?@(yahoogroups.com)'-
%IF:%REGEXPMATCH='%TO''':'%FROM=Arjan de Groot [EMAIL PROTECTED]':%-
'%FROM=Arjan de Groot [EMAIL PROTECTED]'

Don't know, if this is necessary, as this is try-and-see for myself.

A I'm feeling like I'm in 1st grade all over again.

Don't have to. Check the help. it's not good, but can help though.. :)


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.03 Beta/53 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the domain part from a mail address

2004-02-04 Thread dAniel hAhler
Hello bats,

on Thu, 5. Feb 2004 at 01:24:45 +0100 Arjan de Groot wrote:

A %IF:%TOhasyahoogroups.comin it:%FROM=Arjan de Groot [EMAIL PROTECTED]:
A %FROM=Arjan de Groot [EMAIL PROTECTED]

That should do it:

%SETREGEXPPATT='.*?@(yahoogroups.com)'-
%IF:%REGEXPMATCH='%TO''':%FROM=Arjan de Groot [EMAIL PROTECTED]:%-
%FROM=Arjan de Groot [EMAIL PROTECTED]


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.03 Beta/53 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html