Skip to content
Browse files

Add yaml dependency check, and args for run.

  • Loading branch information...
1 parent 613d84a commit cbaa61fc9a7bf8efe37e3e11d0a837aac6e38dec @davidwinter committed Oct 29, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 wordpress-to-jekyll.php
View
11 wordpress-to-jekyll.php
@@ -129,7 +129,14 @@ public function dump($data);
}
-require('SymfonyComponents/YAML/sfYaml.php');
+$sfyaml = __DIR__.'/vendor/yaml/lib/sfYaml.php';
+
+if ( ! file_exists($sfyaml))
+{
+ throw new Exception('Symfony yaml was not found. You may need to initialise the git submodules: git submodule update --init --recursive');
+}
+
+require($sfyaml);
class YamlDumper implements YamlDumperInterface {
@@ -142,7 +149,7 @@ public function dump($data)
}
-$file = (isset($argv[1])) ? $argv[1] : getcwd().'/wordpress-export.xml';
+$file = (isset($argv[1])) ? $argv[1] : getcwd().'/export.xml';
$build = (isset($argv[2])) ? $argv[2] : getcwd().'/posts';
$convert = new WordpressToJekyll($file, new YamlDumper, $build);

0 comments on commit cbaa61f

Please sign in to comment.
Something went wrong with that request. Please try again.