Updated the docs for migrators so they're at least a bit more helpful.
This commit is contained in:
parent
19461bc186
commit
9aca84c55b
|
@ -70,7 +70,7 @@ $ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpressdotcom";
|
||||||
If you want to import using a direct connection to the Wordpress MySQL server, here's how:
|
If you want to import using a direct connection to the Wordpress MySQL server, here's how:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/wordpress";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
||||||
JekyllImport::WordPress.process("database", "user", "pass")'
|
JekyllImport::WordPress.process("database", "user", "pass")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ your access based on `localhost` and `127.0.0.1` not being equivalent in its
|
||||||
authentication system:
|
authentication system:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/wordpress";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
||||||
JekyllImport::WordPress.process("database", "user", "pass", "127.0.0.1")'
|
JekyllImport::WordPress.process("database", "user", "pass", "127.0.0.1")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -105,28 +105,37 @@ might be useful to you:
|
||||||
|
|
||||||
## Drupal
|
## Drupal
|
||||||
|
|
||||||
If you’re migrating from [Drupal](http://drupal.org), there is [a
|
If you’re migrating from [Drupal](http://drupal.org), there are two migrators
|
||||||
migrator](https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/drupal.rb)
|
for you, depending upon your Drupal version:
|
||||||
for you too:
|
- [Drupal 6](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal6.rb)
|
||||||
|
- [Drupal 7](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal7.rb)
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/drupal";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
||||||
JekyllImport::Drupal.process("database", "user", "pass")'
|
JekyllImport::Drupal6.process("dbname", "user", "pass"))'
|
||||||
|
# ... or ...
|
||||||
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
||||||
|
JekyllImport::Drupal7.process("database", "user", "pass")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
<div class="note warning">
|
If you are connecting to a different host or need to specify a table prefix for
|
||||||
<h5>Warning: Drupal Version Compatibility</h5>
|
your database, you may optionally add those two parameters to the end of either
|
||||||
<p>This migrator was written for Drupal 6.1 and may not work as expected with
|
Drupal migrator execution:
|
||||||
newer versions of Drupal. Please update it and send us a pull request if
|
|
||||||
necessary.</p>
|
{% highlight bash %}
|
||||||
</div>
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
||||||
|
JekyllImport::Drupal6.process("dbname", "user", "pass", "host", "table_prefix"))'
|
||||||
|
# ... or ...
|
||||||
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
||||||
|
JekyllImport::Drupal7.process("database", "user", "pass", "host", "table_prefix")'
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
## Movable Type
|
## Movable Type
|
||||||
|
|
||||||
To import posts from Movable Type:
|
To import posts from Movable Type:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/mt";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mt";
|
||||||
JekyllImport::MT.process("database", "user", "pass")'
|
JekyllImport::MT.process("database", "user", "pass")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -135,7 +144,7 @@ $ ruby -rubygems -e 'require "jekyll/migrators/mt";
|
||||||
To import posts from Typo:
|
To import posts from Typo:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/typo";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/typo";
|
||||||
JekyllImport::Typo.process("database", "user", "pass")'
|
JekyllImport::Typo.process("database", "user", "pass")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -146,7 +155,7 @@ This code has only been tested with Typo version 4+.
|
||||||
To import posts from TextPattern:
|
To import posts from TextPattern:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/textpattern";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/textpattern";
|
||||||
JekyllImport::TextPattern.process("database_name", "username", "password", "hostname")'
|
JekyllImport::TextPattern.process("database_name", "username", "password", "hostname")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -162,14 +171,14 @@ sticky.
|
||||||
To import posts from Mephisto:
|
To import posts from Mephisto:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/mephisto";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
||||||
JekyllImport::Mephisto.process("database", "user", "password")'
|
JekyllImport::Mephisto.process("database", "user", "password")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
If your data is in Postgres, you should do this instead:
|
If your data is in Postgres, you should do this instead:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/mephisto";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
||||||
JekyllImport::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
|
JekyllImport::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -197,7 +206,7 @@ alternatives:
|
||||||
To import posts from your primary Posterous blog:
|
To import posts from your primary Posterous blog:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/posterous";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
||||||
JekyllImport::Posterous.process("my_email", "my_pass")'
|
JekyllImport::Posterous.process("my_email", "my_pass")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -205,7 +214,7 @@ For any other Posterous blog on your account, you will need to specify the
|
||||||
`blog_id` for the blog:
|
`blog_id` for the blog:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/posterous";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
||||||
JekyllImport::Posterous.process("my_email", "my_pass", "blog_id")'
|
JekyllImport::Posterous.process("my_email", "my_pass", "blog_id")'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -218,30 +227,19 @@ that maintains permalinks and attempts to import images too.
|
||||||
To import posts from Tumblr:
|
To import posts from Tumblr:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/tumblr";
|
$ ruby -rubygems -e 'require "jekyll/jekyll-import/tumblr";
|
||||||
JekyllImport::Tumblr.process("http://www.your_blog_url.com", true)'
|
JekyllImport::Tumblr.process(url, format, grab_images, add_highlights, rewrite_urls)'
|
||||||
{% endhighlight %}
|
# url - String: your blog's URL
|
||||||
|
# format - String: the output file extension. Use "md" to have your content
|
||||||
There is also [a modified Tumblr
|
# converted from HTML to Markdown. Defaults to "html".
|
||||||
migrator](https://github.com/stephenmcd/jekyll/blob/master/lib/jekyll/migrators/tumblr.rb)
|
# grab_images - Boolean: whether to download images as well. Defaults to false.
|
||||||
that exports posts as Markdown and preserves post tags.
|
# add_highlights - Boolean: whether to wrap code blocks (indented 4 spaces) in a Liquid
|
||||||
|
"highlight" tag. Defaults to false.
|
||||||
The migrator above requires the `json` gem and Python's `html2text` to be
|
# rewrite_urls - Boolean: whether to write pages that redirect from the old Tumblr paths
|
||||||
installed as follows:
|
to the new Jekyll paths. Defaults to false.
|
||||||
|
|
||||||
{% highlight bash %}
|
|
||||||
$ gem install json
|
|
||||||
$ pip install html2text
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
Once installed, simply use the format argument:
|
|
||||||
|
|
||||||
{% highlight bash %}
|
|
||||||
$ ruby -rubygems -e 'require "jekyll/migrators/tumblr";
|
|
||||||
JekyllImport::Tumblr.process("http://www.your_blog_url.com", format="md")'
|
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
## Other Systems
|
## Other Systems
|
||||||
|
|
||||||
If you have a system for which there is currently no migrator, consider writing
|
If you have a system for which there is currently no migrator, consider writing
|
||||||
one and sending us a pull request.
|
one and sending us [a pull request](https://github.com/jekyll/jekyll-import).
|
||||||
|
|
Loading…
Reference in New Issue