*/ $baseUrl = "http://unflyingobject.com/blog"; $rwSitePath = "/Users/filipp/Sites/unflyingobject.com/files"; $categories = array ( "Random" => 1, "Code" => 2, "Software" => 3, "OS X Server" => 4, "Mac OS X" => 5, "Hardware" => 6, "Debian" => 7, "OnTrees" => 8, "Media" => 9, "Uncategorised" => 10); /// That's all you should have to edit /// include "../lib/boeuf.php"; init (); global $c; $rwSiteDir = opendir ($rwSitePath); $i = 0; while (false !== ($file = readdir ($rwSiteDir))) { $fp = $rwSitePath . "/$file"; if (preg_match ('/\.html$/', $file) && !preg_match ('/archive|category-\d+\.html/', $file)) { echo "* Importing: $file\n"; $html = file_get_contents ($fp); preg_match ('/