[Pmwiki-users] Fwd: about the makeWikiPage script...
Crisses
crisses
Wed Sep 24 08:59:21 CDT 2003
(Note I attempted to send a mail to the author of the script over a
month ago first, if he's here, HELP? :) )
Is anyone using the makeWikiPage script?
I'm interested in the ability to send mail and have it included in my
wiki...but I'm having some problems with the files put in the Cookbook.
1) I had to include a PATH="..." statement in the bash script because
the bash script was not locating all the programs called by the script.
For safety's sake it might be a good inclusion in the script... Mine
is:
PATH="/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:."
Before I added this, the script broke my wiki by copying my wiki.d
folder to ...tmp and other similar nonsense that is just too messy to
go into. [My website is hosted by someone else, and I'm a paying user
there.]
2) wiki file names are broken from what I can tell. If I write a
normal subject line like "Help Me" and send it to the wiki, it comes
out as a journal entry (which I renamed to "Update-YYYYMMDD" afterwards
by altering the relevant line in the script). So now, it's appending
correctly, it's writing to journal named wiki pages correctly, but the
only thing it ISN'T doing is listening to the subject line of the
emails.
I've been staring at the bash script for a while, not knowing how to
program bash but being an amateur debugger, and willing to figure
things out (that's how I figured out what was going on with the PATH
problem)...but I can't figure out how to understand the complex method
by which this script names pages. I don't see non-alphanumerics being
stripped from the group name or WikiWord title of the page (and
stripping "Re" will leave in ": " on my emails) so I'm unable to debug
that aspect of the script. It's possible the stripping is there
somewhere, and I'm just not recognizing it.
Alternatively, I was wondering if PmWiki might not be able to run a
script that grabs text files created by a procmail recipe in a special
folder:
procmail sends the mail to a bash script that creates a text file in a
folder, let's say a folder named "newmail" in the PmWiki folder.
each time PmWiki is run, it checks if "newmail" folder is empty
when the folder is NOT empty, it takes the text files and creates
new pages from them
it moves the processed file(s) to "oldmail" so that the newmail
folder will be empty when it's done.
This helps preserve recent changes, all recent changes, etc. in the
wiki...otherwise the new pages created are entirely orphaned.
As for the changing of ownership/permissions on files by using a
cronjob: I'm unlikely to get my hosting service to allow me to add a
cronjob that runs every 5 minutes to reset ownership of files...is this
necessary? Is there another way of doing that portion automatically?
Crisses
----
Although attempts to avoid anxiety by creating the illusion that there
is security in life may help us cope with the unknown, we really know
on some level that we are deceiving ourselves when we think we have
found fixed security. We can blunt anxiety by constricting our life
and thus reducing choices. Opening up to new life, however, means
opening up to anxiety. We pay a steep price when we short-circuit
anxiety.
-- Gerald Corey, Theory and Practice of Counseling and Psychotherapy,
6th ed, 2001 on existentialism
More information about the pmwiki-users
mailing list