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

Jeremy Sproat sproaticus at gmail.com
Wed Jun 29 13:58:02 CDT 2005


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?  Some quick hacking:

perl -e "while(<>){if(m(newline=(.+))){$n=$1;}if(m(text=(.+))){$t=$1;}}$t=~s($n)(\n)g;print
$t;" wiki.d/Main.WikiSandbox

But anyway, I actually need to do this in the reverse order.  I have a
directory of JSPWiki files that I need to convert into PmWiki files. 
I've already taken care of the wikisyntax differences.

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?

Thanks,
 Jeremy




More information about the pmwiki-users mailing list