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

Ben Wilson dausha at gmail.com
Thu Aug 24 09:31:15 CDT 2006


On 8/24/06, Thomas -Balu- Walter <list+pmwiki-users at b-a-l-u.de> wrote:
> Hello all,
>
> is there a way to create / update a page using an external script?

That depends on the direction you're coming from. If you're trying to
post through the web interface, it is a fairly trivial task. Pywe[1]
and pmwe both interface externally via the web server (i.e. both
applications post as a web client). Both also deal with password
protected pages. I wrote Pywe anticipating that it could be used to
post data to a password-protected wiki from the command line.[2] It's
default behavior is to retrieve a wiki page, feed that page to a text
editor for manual editing, then repost when complete. I use Pywe all
the time to edit (using Vim) wiki pages because I just don't like
using textareas.

However, with a command-line option, you could tell Pywe to take a
text-file and post its contents to a wiki. Although, looking at the
documentation page, I see I have negected to fully document its
features. That's the story of my life.

The only feature I could think to add would be to allow you to
concatenate a wiki page with text input. Hmm, that's the Unix way of
doing things. I'll put that in v.1.3.0, but it may be a week or two
before I could get to it. This is the week leading up to my last
semester of law school, so I have about 500 pages of text to read by
Monday. I also have a commitment to return a feature to GMA. Actually,
knowing me I'll probably end up doing it late, late tonight.

However, I know there used to be a way to do the same sort of behavior
via the back-end. It used common household unix commands such as sed.
I couldn't find it when searching PmWiki, but I think it predates
version 2 and would likely need to be updated.

[1]: http://pmwiki.org/wiki/Cookbook/Pywe
[2]: Actually, it's designed to handle multiple domains via an RFC
standard configuration file format.

> The idea is to daily ask our routers for their configuration and update
> their corresponding wiki pages. Simply POSTing a new page will get
> difficult as all pages are password protected.
>
> What I've noticed while playing with this idea is that pmwiki pages get
> saved even if nothing was changed. I wonder if this should be changed so
> it only get's saved if the content differs?
>
>      Balu
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>


-- 
Ben Wilson
"All this worldly wisdom was once the unamiable heresy of some wise man." HDT




More information about the pmwiki-users mailing list