Command Line Tiki Script
I'm trying to write a command line script that converts from SnipSnap to TikiWiki. I've gotten as far as the following:
Copy to clipboard
require_once('tiki-setup.php'); include_once('lib/wiki/wikilib.php'); function get_value($snip, $name) { $temp = $snip->get_elements_by_tagname($name); return $temp[0]->get_content(); } if (!$dom = domxml_open_file("snipsnap.xml")) { echo "Error while parsing the document\n"; exit; } $root = $dom->document_element(); $snips = $root->get_elements_by_tagname("snip"); foreach($snips as $snip) { $name = get_value($snip,"name"); $oUser = get_value($snip,"oUser"); $cUser = get_value($snip,"cUser"); $mUser = get_value($snip,"mUser"); $cTime = get_value($snip,"cTime"); $mTime = get_value($snip,"mTime"); $viewCount = get_value($snip, "viewCount"); $content = get_value($snip, "content"); echo $name,"\n"; }
When this executes, I get the following output:
Copy to clipboard
PHP Warning: session_start(): open(\\sess_44b2709de24875b216b90ed483380e25, O_RDWR) failed: Invalid argument (22) in c:\devtools\tikiwiki\tikiwiki-1.8.2\tiki-setup_base.php on line 173
I would like to know if this warning will hurt the execution of the tikiwiki library?
My next step is to convert the SnipSnap content into TikiWiki content, and create pages with it. Can any body point me to any TikiWiki scripts that are oriented for the command line and use the TikiWiki library to create pages?
Richard