[pmwiki-users] RFC -- POP3 to PmWiki
Patrick R. Michaud
pmichaud at pobox.com
Fri Oct 6 08:47:48 CDT 2006
On Fri, Oct 06, 2006 at 04:48:36AM -0400, Crisses wrote:
> On Oct 5, 2006, at 2:31 PM, Patrick R. Michaud wrote:
> >Of course, this isn't the only approach -- we can emulate any
> >of the authentication/authorization capabilities in PmWiki,
> >including authentication (i.e., "id:gateway") or simple
> >shared passwords ("set a group/page edit password to 'secret_key'").
> I think this is what I'm saying. We need the same API, regardless of
> whether the post is a post-from-self or a post-from-remote, so that
> individual sites with a variety of auth mechanisms can accept posts
> consistently, and regardless of the email processing end, the emails
> can be sent to other sites consistently. ...
I'm saying we already *have* an API -- the one PmWiki uses now.
But I'll elaborate...
> So essentially we know the information being passed is:
> a target page (with possible GET vars)
> a username
> a secret_key
> page contents
These really need to be POST vars, because of the size limits on
GET requests. But here's the current "post-to-pmwiki" API:
target page n=Main.WikiSandbox
page contents text=New text of page
action selector action=edit
post request post=1
This API is the same regardless of the type of
(PmWiki) authentication being used on the receiving end.
> Somewhere in there needs to be the choice between insert contents vs
> replace contents? Some sites may want to allow both. This could be
> in the GET vars.
For replace contents, it's always ?action=edit with the new text
to replace the old one.
For insert contents, there are two ways it could be done. One would
be to use the new ?action=insert capability that is being developed.
It will have some options available (and some site-configurable
defaults) to specify where in the page things should be inserted.
The other way is to have the mail-to-wiki gateway issue perform
the insert locally by issuing an ?action=source request to get the
current text, adding/inserting the new text into the current text,
and then issuing a "replace contents" request with the modified
Thus far I've been thinking that ?action=insert will be an
optional feature for sites, whereas using ?action=edit and
replace contents would work on every site. So, since
?action=insert is still evolving, I was thinking that the
gateways would do the source/local insert/replace sequence
for now. We can update them to use ?action=insert on the
receiving end as that feature becomes better understood or
> But we also need to figure out a common API for the email end.
Yes. I'm very open for suggestions here. My only major request
for the email end is that authors not be restricted to submitting
whole messages -- I definitely want a way to delimit sections to
be posted. It's nice if the delimiters are unobtrusive or
otherwise can make sense to someone reading the mail.
Here is some text for the documentation page...
(:append to PmWiki.Documentation:)
alpha beta gamma
delta epsilon iota
I've used the (:...:) directive form above, but it can be
any string or construct that isn't likely to interfere with
normal email or wiki processing.
More information about the pmwiki-users