[pmwiki-users] How to Create Wiki File from Shell . . .

Patrick R. Michaud pmichaud at pobox.com
Thu Jun 30 09:32:56 CDT 2005


On Wed, Jun 29, 2005 at 01:58:02PM -0500, Jeremy Sproat wrote:
> On 6/27/05, Dominique Faure <dominique.faure.1 at free.fr> wrote:
> > grep '^text=' wiki.d/Main.WikiSandbox | sed -e 's/^text=//' | tr '\262' '\012'
> 
> Don't you first need to parse the "newline=" line to figure out the
> separator?  

Yes, if your site is changing PmWiki's default separator (e.g., sites
running utf-8 character encodings).

> Now, I'm assuming that, for each file I create for wiki.d/ , the only
> fields I need to populate are:
> 
> * newline=
> * text=
> * (perhaps) name=
> 
> If I created the files and dropped them into wiki.d/, would PmWiki be
> able to figure out the rest (e.g. "targets=")?  Are there other fields
> which I need to worry about?

PmWiki will figure out the rest of the fields (e.g., "targets=")
the first time someone edits+saves the page, but until then they
won't be there.  I might be able to come up with an "?action=resync"
that causes the pagefile to be regenerated based on its current values.

I can't think of any other fields that need to be worried about.
If you're using PmWiki's default newline character, you only need text=
and name=, otherwise if you're not using the default newline you also
need newline= (which can be anything you want that doesn't conflict
with other character sequences in the text).

Pm



More information about the pmwiki-users mailing list