[Users] Python script access to file(s) inside folder?
Pierre Fortin
pf at pfortin.com
Sun Aug 11 19:17:53 CEST 2013
On Thu, 8 Aug 2013 23:02:54 +0200 Holger Berndt wrote:
>On Do, 08.08.2013 16:35, Pierre Fortin wrote:
>
>>I'm trying to setup individual .signature files on a per folder basis;
>
>Claws Mail has folder-specific templates built in, via folder
>properties. Maybe that's what you're looking for?
Not quite... I was trying to get part way towards what I think might be
a better .signature setup which ultimately could act something like this:
1. if no .signature file exists, don't display the Signature button on
compose/reply/forward.
2. if a .signature file exists within the folder where the
compose/reply/forward is originating from, use that one[1].
3. otherwise, use the account's specified default .signature[1].
[1] or... while still respecting the "Automatically insert signature"
option, provide a Signature dropdown to allow picking either the
folder's or account's .signature (or 2 buttons)
All notwithstanding the use of templates which could co-exist with such a
scheme...
>>but am missing the magic for understanding the difference between
>>OS_path [/home/pfortin/Mail/...] and claws_path [#mh/Mailbox/...]
>
>What you call "claws_path" is an identifier. It is a string that Claws
>Mail can use to uniquely refer to a folder. It may or may not correspond
>to a filesystem folder on your harddisc.
From everything I can see:
/home/pfortin/Mail/Linux/claws-mail is the same directory|folder as
#mh/Mailbox/Linux/claws-mail
but, I still can't get at the latter... probably some subtle syntactical
issue I keep tripping over...
Doh!!! OS!! os.listdir() works on the former; but not the latter for
[now] obvious reasons... <red-faced>
Would this require replicating the os module functions, such as:
clawsmail.listdir() etc...? Or... could os.<function>() be hinted
to use #mh/Mailbox as a "symlink" to /home/pfortin/Mail?
Not asking for implementation, just trying to grok better... :)
Don't suppose there's a way to copy a file, such as:
#mh/Mailbox/Linux/claws-mail/.signature into a compose window at will..?
>Holger
Thanks,
Pierre
More information about the Users
mailing list