Page MenuHomePhabricator

mail-to-wiki gateway: add and create wiki pages from e-mail
Closed, ResolvedPublic

Description

For special applications, such as "dumping" backup log or status messages to a
wiki page and to allow users to simply send mail to a wiki page, instead of
editing, we developed a script (bot) editpage.php.

Basically, the idea of mail-to-wiki is not new, see for example [1], [2].

The script can be run from commandline with parameters, can read from a file or
from stdin. The latter allows to commence script execution from a simple call
via POSTIFX -> PROCMAIL -> .procmailrc

Commands are placed into the first lines of the mail; the currently implemented
commands are

  • append the mail body to a wiki page (default), append:page
  • prepend the mail body to a wiki page prepend:page
  • create a new wiki page create:page

A keyword Summary: allows to define an wiki edit summary; if summary is empty,
the mail _Subject_ is copied as edit summary and appears in recent changes (as
usual).

The code is stable, tested for Mediawiki 1.3.7, 1.3.11, CVS HEAD 1.5 and will be
published tomorrow. It works with both the new and old edit collision detection
mechanisms, because it takes care of wpEdittime _and_ wp EditToken and treats
them both for user convenience.

References, which also show mail-to-wiki gateways:

[1] http://collab.blueoxen.net/cgi-bin/wiki.pl?Mail2wiki#nid1GA
[2] http://c2.com/cgi/wiki?CvWiki

Tom and Markus


Version: unspecified
Severity: enhancement
URL: http://meta.wikimedia.org/wiki/Mail-to-wiki_gateway

Details

Reference
bz1675
TitleReferenceAuthorSource BranchDest Branch
Add notebook from Spike: Figure feasibility to emit (wiki_db, revision_id) pairsrepos/data-engineering/dumps/mediawiki-content-dump!29xcollazoadd-notebook-emit-feasibilitymain
Update test data to make sure we include examples of 'all-edit-types'repos/generated-data-platform/aqs/aqs-docker-cassandra-test-env!23xcollazoadd-all-edit-categoriesmain
jobs-api: Rollback tools to 0.0.305repos/cloud/toolforge/toolforge-deploy!335taavitaavi/jobs-api-rollbackmain
Customize query in GitLab

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:15 PM
bzimport set Reference to bz1675.

My first version is ready for download, it works with 1.3.7, 1.3.10, 1.5 (1.4
currently untested).

Download from http://www.tgries.de/mw/editpage.php (current version 1.14)

You can

  • submit to the script pagename, text and optional summary as commandline parameters
  • or from a file
  • or, most important, from stdin (basically, this is used when PROCMAIL

transfers a mail file to the script)

Description: http://meta.wikimedia.org/wiki/Mail-to-wiki_gateway

Tom

jeluf wrote:

*** This bug has been marked as a duplicate of 831 ***

This bugzilla ... to be deleted now, please.
Tom

(In reply to comment #1)

Download from http://www.tgries.de/mw/editpage.php (current version 1.14)

typo correction, URL must be http://www.wikinaut.de/mw/editpage.tgz

You can ...

  • append the mail body to a wiki page (default), append:page
  • prepend the mail body to a wiki page prepend:page
  • create a new wiki page create:page
epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:24 AM
epriestley added a commit: Unknown Object (Diffusion Commit).