No commit activity in last 3 years
No release in over 3 years
With ClothMark you can easily convert your files formatted with Markdown, Textile or BBCode to HTML files.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.9.3
>= 1.0.0
>= 4.2.2
 Project Readme

ClothMark¶ ↑

With ClothMark you can easily convert your files formatted with Markdown, Textile or BBCode to HTML files.

ClothMark uses three awesome gems:

Installation¶ ↑

gem sources -a http://gems.github.com
sudo gem install ravicious-clothmark

Usage¶ ↑

Basic usage:

$ clothmark [input file]

It converts an input file to HTML using Markdown preprocessor. But you probably want to specify an output file or used preprocessor. Of course you can do this. Look here:

$ clothmark [input file] [-o output file] [-m markup language]

Quick example:

$ clothmark bb_code.txt -m bbcode -o forum_post.html

It converts the input file (bb_code.txt) to the HTML file (forum_post.html) using BBCode preprocessor.

Wanna see help? No problem.

$ clothmark -h
Usage: clothmark [options]
  -h, --help                       Display this screen
  -i, --input FILE                 Specify input file (if it aren't specified, then first argument will be used)
  -o, --output FILE                Specify output file
  -ah, --additional-html           Specify, do additional HTML and CSS will be used (default - false)
  -m, --markup LANG                Specify markup language (markdown, textile or bbcode, default is markdown)

As you see, there are four arguments:

  • -i or –input which specifies input file. If it isn’t typed, then first argument will be used as an input file. This argument is required.

  • -o or –output which specifies output file. You don’t have to specify it, because ClothMark generates filename for output file automatically.

  • -m or –markup which specifies markup language. If you don’t specify it, then Markdown will be used as a choosed language.

  • -ah or –additional-html which specifies, do additional HTML and CSS will be used. Default is set to false, but you can set it to true, just type this argument.

All files will be created in the folder that contains a input file, e.g:

$ clothmark posts/forum_post2 -m bbcode

In this case, the forum_post2.html file will be created in the posts folder.

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it (RSpec). This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 Rafal Cieslak. See LICENSE for details.