Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ravicious/clothmark
An old project I did when I write a command-line utility. With ClothMark you can easily convert your files formatted with Markdown, Textile or BBCode to HTML files.
https://github.com/ravicious/clothmark
Last synced: about 2 months ago
JSON representation
An old project I did when I write a command-line utility. With ClothMark you can easily convert your files formatted with Markdown, Textile or BBCode to HTML files.
- Host: GitHub
- URL: https://github.com/ravicious/clothmark
- Owner: ravicious
- License: mit
- Created: 2009-08-19T09:39:24.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-08-22T10:18:22.000Z (over 15 years ago)
- Last Synced: 2024-03-15T02:14:39.747Z (10 months ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this 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:
* RedCloth[http://redcloth.org/]
* BlueCloth[http://www.deveiate.org/projects/BlueCloth]
* bb-ruby[http://github.com/cpjolicoeur/bb-ruby/]== 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.htmlIt 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
Copyright (c) 2009 Rafal Cieslak. See LICENSE for details.