Sha256: 01d31aa9441b614180786a0c019ad1668d52f574fb3724de2e0ab7240d40abd0

Contents?: true

Size: 1.24 KB

Versions: 3

Compression:

Stored size: 1.24 KB

Contents

# slacken [![Build Status](https://travis-ci.org/increments/slacken.svg)](https://travis-ci.org/increments/slacken)

## Description
This gem translates a html source into a markup text for Slack.

Official description of Slack message formatting is [here](https://api.slack.com/docs/formatting).

## Examples

Sample input source and output texts are in `examples/`.

```
> require 'slacken'
> puts Slacken.translate(File.read('examples/source.html'))
# *Slacken*
#
# This gem translates a html source into *a markup text for Slack*.
# <http://qiita.com|Qiita> uses this gem to decorate notification messages to Slack :trollface:.
#
# *Examples*
#
# *List*
#
# 1. Item 1
# 2. _Item 2 (italic)_
#     • [x] Checked
#     • [ ] Unchecked
# 3. *Item 3 (bold)*
#     • Nested Item 1
#     • Nested Item 2
#
# *Citation*
#
# > Qiita is a technical information sharing site for programmers.
# >  Kobito is an application for technical information recording.
#
# *Source Code*
#
# ```class World
#   def hello
#     puts 'Hello, world!'
#   end
# end
# ```
#
# *Image*
#
# This is a Qiita logo.
#
# -----------
#
# <http://cdn.qiita.com/assets/siteid-reverse-1949e989f9d8b2f6fad65a57292b2b01.png|Qiita logo>
```

## Install

```
$ gem install slacken
```

## License
MIT

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slacken-0.1.3 README.md
slacken-0.1.2 README.md
slacken-0.1.1 README.md