Wordpress Import #7

Closed
optikfluffel opened this Issue Dec 5, 2011 · 15 comments

Comments

Projects
None yet
8 participants
@optikfluffel

An import from an existing wordpress-blog would be great ;D

@tdreyno

This comment has been minimized.

Show comment
Hide comment
@tdreyno

tdreyno Dec 6, 2011

Member

This project may be helpful:
https://github.com/davidwinter/wordpress-to-jekyll

Any markdown generated that works with jekyll should work with Middleman.

Member

tdreyno commented Dec 6, 2011

This project may be helpful:
https://github.com/davidwinter/wordpress-to-jekyll

Any markdown generated that works with jekyll should work with Middleman.

@bhollis

This comment has been minimized.

Show comment
Hide comment
@bhollis

bhollis Dec 12, 2011

Member

I've tried out wordpress-to-jekyll but I had to modify it a bit to populate frontmatter with the correct info and output files in the right directory structure, as well as to ignore non-published posts. That script is also pretty primitive - it dumps the raw HTML without converting to Markdown, though for my purposes I don't really care what format old posts are in as long as they still display correctly.

If there were a nice way for Middleman extensions to contribute Thor actions to the main middleman executable I'd be willing to write a quick wordpress importer command in Ruby. Failing that, I might just write a standalone one. What do you think?

Member

bhollis commented Dec 12, 2011

I've tried out wordpress-to-jekyll but I had to modify it a bit to populate frontmatter with the correct info and output files in the right directory structure, as well as to ignore non-published posts. That script is also pretty primitive - it dumps the raw HTML without converting to Markdown, though for my purposes I don't really care what format old posts are in as long as they still display correctly.

If there were a nice way for Middleman extensions to contribute Thor actions to the main middleman executable I'd be willing to write a quick wordpress importer command in Ruby. Failing that, I might just write a standalone one. What do you think?

@tdreyno

This comment has been minimized.

Show comment
Hide comment
@tdreyno

tdreyno Dec 12, 2011

Member

Excellent idea regarding expanding the middleman executable. Shouldn't be hard, though the whole CLI needs a refactor badly.

I'll make a ticket.

Member

tdreyno commented Dec 12, 2011

Excellent idea regarding expanding the middleman executable. Shouldn't be hard, though the whole CLI needs a refactor badly.

I'll make a ticket.

@ghost ghost assigned bhollis Mar 5, 2012

@bhollis

This comment has been minimized.

Show comment
Hide comment
@bhollis

bhollis Mar 16, 2012

Member

Jekyll now has its own migrators that should produce middleman-compatible posts:
https://github.com/mojombo/jekyll/tree/master/lib/jekyll/migrators

There's also this python thing that looks hard to run:
https://github.com/thomasf/exitwp

I wonder whether it's worth having our own importer - it'd basically be a duplicate of Jekyll's. Perhaps just instructions on how to use their importer to create the posts?

Member

bhollis commented Mar 16, 2012

Jekyll now has its own migrators that should produce middleman-compatible posts:
https://github.com/mojombo/jekyll/tree/master/lib/jekyll/migrators

There's also this python thing that looks hard to run:
https://github.com/thomasf/exitwp

I wonder whether it's worth having our own importer - it'd basically be a duplicate of Jekyll's. Perhaps just instructions on how to use their importer to create the posts?

@tdreyno

This comment has been minimized.

Show comment
Hide comment
@tdreyno

tdreyno Mar 16, 2012

Member

Maybe we can wrap their migrators with a middleman-migrator extension which provides a CLI?

Member

tdreyno commented Mar 16, 2012

Maybe we can wrap their migrators with a middleman-migrator extension which provides a CLI?

@nathema

This comment has been minimized.

Show comment
Hide comment
@nathema

nathema Aug 5, 2013

I used exitwp to convert my Wordpress export to markdown. I had to postprocess URL's and some frontmatter.

nathema commented Aug 5, 2013

I used exitwp to convert my Wordpress export to markdown. I had to postprocess URL's and some frontmatter.

@karlfreeman

This comment has been minimized.

Show comment
Hide comment
@karlfreeman

karlfreeman Aug 28, 2013

Member

Looks like some progress has been made by @salmansqadeer with wordpress-to-middleman 👍

Member

karlfreeman commented Aug 28, 2013

Looks like some progress has been made by @salmansqadeer with wordpress-to-middleman 👍

@tdreyno

This comment has been minimized.

Show comment
Hide comment
@tdreyno

tdreyno Aug 28, 2013

Member

Wonderful @salamansqadeer! When it's stable, we can work to make it into a build-in template or extension.

Member

tdreyno commented Aug 28, 2013

Wonderful @salamansqadeer! When it's stable, we can work to make it into a build-in template or extension.

@salmansqadeer

This comment has been minimized.

Show comment
Hide comment
@salmansqadeer

salmansqadeer Aug 29, 2013

Thanks guys! Glad to see that you find it useful. I have currently made it as stable as I think I will be able to get it in the near term. The translation from HTML to markdown is a little bit broken, but I fear that is more the fault of the html2md gem that Im using as opposed to any details in my actual code. I'll look into finding a better gem / writing my own html to markdown converter down the line to make sure this is seamless.

I also need to add support for downloading images and saving them in the right folder structure, but I would be happy to get some advice on how best to implement that as it may be a bit beyond my skill set.

Cheers!

Thanks guys! Glad to see that you find it useful. I have currently made it as stable as I think I will be able to get it in the near term. The translation from HTML to markdown is a little bit broken, but I fear that is more the fault of the html2md gem that Im using as opposed to any details in my actual code. I'll look into finding a better gem / writing my own html to markdown converter down the line to make sure this is seamless.

I also need to add support for downloading images and saving them in the right folder structure, but I would be happy to get some advice on how best to implement that as it may be a bit beyond my skill set.

Cheers!

@karlfreeman

This comment has been minimized.

Show comment
Hide comment
@karlfreeman

karlfreeman Nov 7, 2013

Member

Just stumbled on the ruby-wpdb gem. Looks like it might help.

Member

karlfreeman commented Nov 7, 2013

Just stumbled on the ruby-wpdb gem. Looks like it might help.

@mdb

This comment has been minimized.

Show comment
Hide comment
@mdb

mdb Dec 19, 2013

Inspired by @salmansqadeer's initial work, I built upon wordpress-to-middleman to create a wp2middleman gem. The gem creates a wp2mm command line utility that migrates the posts contained in a Wordpress XML export file to middleman-style markdown files.

This is just a rough first pass; I haven't yet released it to Rubygems. Please let me know if you have any feedback or further ideas. Hopefully it's relevant in some capacity to this issue.

Thanks!

mdb commented Dec 19, 2013

Inspired by @salmansqadeer's initial work, I built upon wordpress-to-middleman to create a wp2middleman gem. The gem creates a wp2mm command line utility that migrates the posts contained in a Wordpress XML export file to middleman-style markdown files.

This is just a rough first pass; I haven't yet released it to Rubygems. Please let me know if you have any feedback or further ideas. Hopefully it's relevant in some capacity to this issue.

Thanks!

@tdreyno

This comment has been minimized.

Show comment
Hide comment
@tdreyno

tdreyno Dec 19, 2013

Member

👍

Member

tdreyno commented Dec 19, 2013

👍

@karlfreeman

This comment has been minimized.

Show comment
Hide comment
@karlfreeman

karlfreeman Dec 19, 2013

Member

@bhollis Thoughts on closing this? Looks like there are now a few options for doing this which weren't available 2 years ago...

@mdb Another 👍 from me 😄

Member

karlfreeman commented Dec 19, 2013

@bhollis Thoughts on closing this? Looks like there are now a few options for doing this which weren't available 2 years ago...

@mdb Another 👍 from me 😄

@tdreyno

This comment has been minimized.

Show comment
Hide comment
@tdreyno

tdreyno Dec 19, 2013

Member

Honestly, I'd really love if we could pick a solution and either move it into core or depend on the gem. Then we'd add official docs for it.

Member

tdreyno commented Dec 19, 2013

Honestly, I'd really love if we could pick a solution and either move it into core or depend on the gem. Then we'd add official docs for it.

@iwarner

This comment has been minimized.

Show comment
Hide comment
@iwarner

iwarner Feb 10, 2016

Member

Seems these have not been kept up to date though and the documentation is now out of sync for these - its there any progress on an official one?

Member

iwarner commented Feb 10, 2016

Seems these have not been kept up to date though and the documentation is now out of sync for these - its there any progress on an official one?

@tdreyno tdreyno closed this Feb 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment