# Mcbean 0.4.0 Released

**URL:** <https://www.ruby-forum.com/t/mcbean-0-4-0-released/195790>\
**Category:** Ruby\
**Created:** [September 30, 2010, 8:53am UTC](https://www.ruby-forum.com/t/mcbean-0-4-0-released/195790 "2010-09-30T08:53:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [September 30, 2010, 8:53am UTC](https://www.ruby-forum.com/t/mcbean-0-4-0-released/195790/1 "2010-09-30T08:53:03Z")

</div>

mcbean version 0.4.0 has been released!

- [GitHub - flavorjones/mcbean: McBean converts HTML into Markdown or Textile (and vice-versa).](http://github.com/flavorjones/mcbean)
- [http://mcbean.heroku.com/doc/index.html](http://mcbean.heroku.com/doc/index.html) (rdocs)
- [http://mcbean.heroku.com](http://mcbean.heroku.com) (live demo!)

McBean can convert documents from one format to another. McBean  
currently  
supports:

- HTML
- Markdown (a subset)
- Textile (a subset)
- Creole (a subset)

with the help of Loofah, Nokogiri, RDiscount, RedCloth and Creole.

“You can’t teach a Sneetch.” – Sylvester McMonkey McBean

== Changes

## 0.4.0 (2010-09-30)

Features:

- Support for Creole (a wiki format)

== Features

- Transforms HTML into Markdown
- Transforms HTML into Textile
- Transforms HTML into Creole
- Textile ↔ Markdown, Textile ↔ Creole, Creole ↔ Markdown (thanks  
to  
RDiscount, RedCloth and Creole)
- Emitted HTML is sanitized (thanks to Loofah).
- Fancy-pants command line utility, “mcbean”.

== Problems

- Only supports a limited subset of Markdown, Textile and Creole.  
Patches  
welcome.

== Synopsis

=== Short version

To convert HTML into Markdown, for example:

McBean.fragment(html).to\_markdown

Or get fancy and convert Textile into Markdown:

McBean.textile(textile).to\_markdown

=== Longer version

Create a McBean from your string, using the appropriate constructor:

mcbean = McBean.fragment your\_html\_fragment  
or  
mcbean = McBean.document your\_html\_document  
or  
mcbean = McBean.markdown your\_markdown  
or  
mcbean = McBean.textile your\_textile  
or  
mcbean = McBean.creole your\_creole

And then generate the desired markup format:

mcbean.to\_html  
mcbean.to\_markdown  
mcbean.to\_textile  
mcbean.to\_creole

=== Command Line

Also, +mcbean+ provides a command-line utility installed into your gem  
path:

$ mcbean --html="  
[The Sneetches and Other Stories - Wikipedia](http://en.wikipedia.org/wiki/The_Sneetches_and_Other_Stories)"  
–to-markdown  
$ mcbean --markdown=“treetop-1.4.2/doc/grammar\_composition.markdown”  
–to-textile

You can try out McBean at the live demo site: [http://mcbean.heroku.com](http://mcbean.heroku.com)
