Topic: https://brettterpstra.com/2012/09/16/easy-command-line-github-flavored-markdown/
hide preview

What's next? verify your email address for reply notifications!

James Gardner 12y, 76d ago

Cool. I get cert issues though:

C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `block in connect'        from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:in `timeout'        from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:in `timeout'        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `connect'        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:in `do_start'        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:in `start'        from flavor.rb:52:in `<main>'

Not familiar with ruby at all to know how to go about fixing this.

hide preview

What's next? verify your email address for reply notifications!

Peter Groves 12y, 156d ago

It's worth mentioning that you need to dig into the script and change the line
output['mode'] ='gfm'
to
output['mode'] ='markdown'

in order to get README.md's to render properly. The 'gfm' mode doesn't support using hash tags as header definitions and some other minor issues.

Otherwise, works great. Thanks for putting it together.

hide preview

What's next? verify your email address for reply notifications!

John 12y, 182d ago

On a side note: the only problem with Markdown versions is that lack of standardization: multimarkdown is extremely handy, but doesn't support -code blocks. GFL, on the other side, does support-code blocks but lacks footnotes.

Choose your converter wisely, as they say...

remark link
hide preview

What's next? verify your email address for reply notifications!

John 12y, 182d ago

Oops, sorry. That should be GFM, not GLF, and 'three backticks code blocks'.

hide preview

What's next? verify your email address for reply notifications!

John 12y, 182d ago

On a side note: the only problem with Markdown versions is that lack of standardization: multimarkdown is extremely handy, but doesn't support -code blocks. GFL, on the other side, does support-code blocks but lacks footnotes.

Choose wisely, as they say...

hide preview

What's next? verify your email address for reply notifications!

John 12y, 184d ago

It gives Error 500.

(It also says "warning: peer certificate won't be verified in this SSL session" but that seems to be fixable).

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 12y, 183d ago

The peer certificate warning just goes to STDERR, so I don't worry about it on a script this simple. Doesn't get passed to pbcopy or redirection.

Does the Error 500 happen every time, or just with certain code blocks?

remark link parent
hide preview

What's next? verify your email address for reply notifications!

John 12y, 182d ago

On error 500: sorry, it was indeed an error in the markdown document I was trying to convert (``` code section wasn't closed).

hide preview

What's next? verify your email address for reply notifications!

Caleb McDaniel 12y, 185d ago

Thanks for the link to bcat. How did I not know about this useful tool?! I wasted half an hour just this past week trying to figure out how to do what it does. Fantastic!

hide preview

What's next? verify your email address for reply notifications!