[dokuwiki] Re: Importing pages using curl from a shell

  • From: "Gabriel Birke" <Gabriel.Birke@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 8 Jul 2008 10:19:25 +0200

 
> On Mon, Jul 7, 2008 at 7:20 PM, Franklin Ankum
> <franklin_ankum@xxxxxxxxxxx> wrote:
> > Is there a way to import pages into DokuWiki using a tool 
> > like "curl" from a shell or windows command?
> 
> That is the most troublesome way. Better use the XMLRPC interface or
> the bin/dwpage.php script to create pages from a script.
 
I would like to elaborate on that a bit:
If you just download pages with curl into data/pages the pages will have no
meta information, things like "what headlines are in this page, who created
this page and when, what's the revision history of the page". Also, the
pages probably won't show up in "recent changes" and if you have action
plugins that act on saving a page, you're out of luck.

If you use a shell script, you can still use curl to download contents, but
then you should use a temporary directory and the use the bin/dwpage.php
script to insert the pages from the temp dir into the wiki. This will create
the pages with all neccessary metadata and action plugin calls.

HTH, 
Gabriel

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: