No commit activity in last 3 years
No release in over 3 years
niconico link for html-pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
= 0.79.0

Runtime

 Project Readme

Html::Pipeline::NicoLink

An HTML::Pipeline filter for niconico(http://www.nicovideo.jp) description links.

niconicoの動画説明文中のオートリンクです。mylist2.jsの定義を参考にしています。

Installation

Add this line to your application's Gemfile:

gem 'html-pipeline-nico_link'

And then execute:

$ bundle

Or install it yourself as:

$ gem install html-pipeline-nico_link

Usage

To use this filter on its own

require 'html/pipeline/nico_link'

filter = HTML::Pipeline::NicoLinkFilter.new('伝説の動画: sm9')
filter.call.to_s # => '伝説の動画: <a href="http://www.nicovideo.jp/watch/sm9">sm9</a>'

To use this filter with HTML::Pipeline

pipeline = HTML::Pipeline.new [
  HTML::Pipeline::MarkdownFilter,
  HTML::Pipeline::NicoLinkFilter,
]
pipeline.call('**伝説の動画はこちら→** sm9') # => '<b>伝説の動画はこちら→</b> <a href="http://www.nicovideo.jp/watch/sm9">sm9</a>'

Contributing

  1. Fork it ( https://github.com/rutan/html-pipeline-nico_link/fork )
  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 a new Pull Request