appendWikiPage is a bash script that will take an email message (or any other file piped into it), and create a PmWiki page. In combination with procmail, it will allow you to setup a special email address to which you can send information that you'd like to have included in your PmWiki, without having to create the page manually.
Download the script here.
- Copy the downloaded file, appendWikiPage, somewhere convenient. I keep mine in my ~/bin directory.
- Copy the program pmwe from the pmwiki/scripts directory, to a location in your $PATH. Verify that pmwe works by running it and editing a wiki page. Typing "pmwe", from the command line, should allow you to edit the Main.WikiSandbox page located at http://www.pmichaud.com/wiki/Main/WikiSandbox.
- Verify that the following programs are available on your system, somewhere in your $PATH:
echo, grep, & sed
- Edit the following variable in appendWikiPage:
- Add the following receipe to your .procmailrc:
# send 'wiki' files to wiki :0 * ^TOappendWikiPage@mydomain.com | /home/tom/bin/appendWikiPage
- You'll need to setup the proper alias in your MTA to forward any mail that is sent to appendWikiPage@mydomain.com (for example) to your regular email address (so that the procmail receipe will be executed). Alternately, setup a new user named appendWikipage and put the procmail recipe there.
- Setup is complete.
A WikiPage will be created from any mail sent to appendWikiPage@mydomain.com. The title of Group.Page will be determined by the following markup, containing within the email message itself:
- If the WikiPage already exists, the selected text is appended to the end of the existing page.
- Feel free to send email to firstname.lastname@example.org.
from IP: 188.8.131.52 ip should be disabled by default for security reasons