New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown output wraps at 80 characters #6

Open
albill opened this Issue Sep 17, 2011 · 9 comments

Comments

Projects
None yet
5 participants
@albill

albill commented Sep 17, 2011

The markdown output files that the script creates from my wordpress.xml all wrap normal text paragraphs are 80 characters (or less if a word will go across the boundary). Unfortunately, when I import this into my Jekyll blog (or any other markdown interpreter), these new lines are preserved. So, rather than getting paragraphs naturally following screen width when converted from markdown to HTML, I get formatting that is wrapped at the same point.

The only except seems to be image urls, which are not wrapped.

Can the script be updated to not wrap lines at 80 characters?

@thomasf

This comment has been minimized.

Show comment
Hide comment
@thomasf

thomasf Oct 3, 2011

Owner

It should really not do this.. Strange.

Owner

thomasf commented Oct 3, 2011

It should really not do this.. Strange.

@thomasf thomasf closed this Oct 3, 2011

@thomasf thomasf reopened this Oct 3, 2011

@albill

This comment has been minimized.

Show comment
Hide comment
@albill

albill Oct 3, 2011

Do you see it?

It made me wind up using a more convoluted (and less useful) method to get data because I didn't have a means of differentiating "wraps at 80" with wanted linebreaks.

albill commented Oct 3, 2011

Do you see it?

It made me wind up using a more convoluted (and less useful) method to get data because I didn't have a means of differentiating "wraps at 80" with wanted linebreaks.

@jamesward

This comment has been minimized.

Show comment
Hide comment
@jamesward

jamesward Dec 11, 2011

Contributor

I'm having this same problem.

Contributor

jamesward commented Dec 11, 2011

I'm having this same problem.

@jamesward

This comment has been minimized.

Show comment
Hide comment
@jamesward

jamesward Dec 12, 2011

Contributor

I was able to fix this by switching to html2text_file instead of html2text.

Contributor

jamesward commented Dec 12, 2011

I was able to fix this by switching to html2text_file instead of html2text.

@chrisnicola

This comment has been minimized.

Show comment
Hide comment
@chrisnicola

chrisnicola Jan 21, 2012

@jamesward could you be more specific about what you've changed. Simply changing the method call doesn't work for me.

@jamesward could you be more specific about what you've changed. Simply changing the method call doesn't work for me.

@chrisnicola

This comment has been minimized.

Show comment
Hide comment
@chrisnicola

chrisnicola Jan 21, 2012

Ok I've solved it. First off the latest html2text doesn't have html2text_file and also causes a whole bunch of additional problems (all the links are inline instead of reference style for example). So you have to get a pre 3.x version. Then you also have to use html2text_file since that solves the problem with 80 character wrapping even with the reference links. I'll submit a pull request of course ;-).

Ok I've solved it. First off the latest html2text doesn't have html2text_file and also causes a whole bunch of additional problems (all the links are inline instead of reference style for example). So you have to get a pre 3.x version. Then you also have to use html2text_file since that solves the problem with 80 character wrapping even with the reference links. I'll submit a pull request of course ;-).

@jamesward

This comment has been minimized.

Show comment
Hide comment
@jamesward

jamesward Jan 21, 2012

Contributor

You can see my fork here: https://github.com/jamesward/exitwp

Contributor

jamesward commented Jan 21, 2012

You can see my fork here: https://github.com/jamesward/exitwp

@gerwitz

This comment has been minimized.

Show comment
Hide comment
@gerwitz

gerwitz Jan 22, 2012

@jamesward thanks! Your shift to html2text_file and exception handling was exactly what I needed.

gerwitz commented Jan 22, 2012

@jamesward thanks! Your shift to html2text_file and exception handling was exactly what I needed.

@thomasf

This comment has been minimized.

Show comment
Hide comment
@thomasf

thomasf Apr 9, 2012

Owner

Pandoc is one of the best parsers i've tried.. thinking of bringing it back instead of html2text.

Owner

thomasf commented Apr 9, 2012

Pandoc is one of the best parsers i've tried.. thinking of bringing it back instead of html2text.

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