[pmwiki-users] create pages externally through bash- / php-script?

Thomas -Balu- Walter list+pmwiki-users at b-a-l-u.de
Thu Aug 24 16:15:04 CDT 2006

Hello all,

thanks Ben and Jean-Fabrice - your suggestions are really interesting,
but they both won't really work for me because of one reason: I don't
know Perl or Python yet :)

On Thu, Aug 24, 2006 at 11:44:21AM -0500, Patrick R. Michaud wrote:
> On Thu, Aug 24, 2006 at 11:44:54AM +0200, Thomas -Balu- Walter wrote:
> > is there a way to create / update a page using an external script?
> It's not difficult if whatever is doing the POST can send a long a
> password as well.  :-)  And it's not at all hard to send along a 
> password, the password just goes in an "authpw" field along with 
> the rest of the posted content (i.e., one doesn't have to check for
> an authorization prompt and send the password in a separate POST,
> maintain cookies, etc.).

Ok, that really sounds easy. I was afraid of having to maintain the
session cookies, etc. 

> Of course, it's possible to get PmWiki to update the pages as well--
> write a recipe that adds a new ?action= that queries the routers
> for configuration and rewrites the appropriate pages (via calls
> to WritePage).  Then arrange for cron(1) to call PmWiki once per day
> with the special ?action= value to do the updates.  

This is IMHO the most elegant solution - and the easiest too I guess :) 

> PmWiki used to save changes only if content differed, but sometimes
> we want to force a page save because of attributes being updated or
> other changes in the configuration.
> Still, it's not at all hard to configure PmWiki to save pages only
> when the content changes -- let me know if you need the code for
> this and I'll post it as a recipe.

Hm, now while seeing the reason for this, I'm not yet sure if I still
want that. But on the other hand it would perhaps be nice to have the

In my case it would be stupid to change the page history if the
router config did not change, because the main idea was to have all the
changes in the history. A new daily saved page with no changes would
make that difficult.

What about changing the history only if some attribute, or the content
was changed (or if it is forced with a parameter somehow)?


More information about the pmwiki-users mailing list