Project

irc-string

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
mIRC decoration string parser
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

IrcString

mIRC decoration string parser.

Installation

Add this line to your application's Gemfile:

gem 'irc-string'

And then execute:

$ bundle

Or install it yourself as:

$ gem install irc-string

Usage

require 'irc-string'

str = IrcString.parse("\u001F\u000304hello\u000F \u0002\u000308,03world\u000F")

str.to_html # => "<span class=\"underline color_4\">hello</span> <span class=\"bold color_8 bg_color_3\">world</span>"

str.to_html('irc_') # => "<span class=\"irc_underline irc_color_4\">hello</span> <span class=\"irc_bold irc_color_8 irc_bg_color_3\">world</span>"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request