===========================
Description of the plug-ins
===========================

SubscriptionFeed
----------------
[Path]
 /plugins/subscription/feed.rb

[Abstract]
 Subscribe to feed.

[Syntax]
  - module: SubscriptionFeed
    config:
      feeds:
        - FEED
        - FEED ...
      retry: RETRY_COUNT
      interval: INTERVAL_FOR_RETRY (in seconds.)


SubscriptionLink
----------------
[Path]
 /plugins/subscription/link.rb

[Abstract]
 Subscribe urls and extract there links.

[Syntax]
  - module: SubscriptionLink
    config:
      urls:
        - URL
        - URL ...
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry: RETRY_COUNT


SubscriptionXml
---------------
[Path]
 /plugins/subscription/xml.rb

[Abstract]
 Subscribe XML API with GET method.
 This plug-in store encoded XML in content_encoded of RSS feed.

[Syntax]
  - module: SubscriptionXml
    config:
      urls:
        - URL
        - URL ... (XML base API)
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry: RETRY_COUNT


SubscriptionTumblr
------------------
[Path]
 /plugins/subscription/tumblr.rb

[Abstract]
 Subscribe tumblr and extract the links.
 If pages specified, including past pages.

[Syntax]
  - module: SubscriptionTumblr
    config:
      urls:
        - URL
        - URL ...
      pages: PAGES
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry: RETRY_COUNT


SubscriptionTwitter
-------------------
[Path]
 /plugins/subscription/twitter.rb

[Abstract]
 Subscribe twitter and extract there statuses and the links.

[Syntax]
  - module: SubscriptionTwittter
    config:
      urls:
        - URL
        - URL ...
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry: RETRY_COUNT


SubscriptionTwitterSearch
-------------------------
[Path]
 /plugins/subscription/twitter_search.rb

[Abstract]
 The search results of a twitter are acquired.

[Syntax]
  - module: SubscriptionTwitterSearch
    config:
      search:             search word
      opt:                option
      consumer_key:       'your_consumer_key'
      consumer_secret:    'your_consumer_secret'
      oauth_token:        'your_oauth_token'
      oauth_token_secret: 'your_oauth_token_secret'
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry: RETRY_COUNT


SubscriptionWeather
-------------------
[Path]
 /plugins/subscription/weather.rb

[Abstract]
 Subscribe weather (using gem weather_hacker) by zipcode.

[Syntax]
  - module: SubscriptionWeather
    config:
      zipcode: ZIPCODE (ex. 166-0003)
      day:     DAY (ex. 'today', 'tomorrow')
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry: RETRY_COUNT


SubscriptionText
----------------
[Path]
 /plugins/subscription/text.rb

[Abstract]
 Create new feeds from urls, titles, feeds on text.
 Reading data from TSV (sep = '\t') formatted files.

[Syntax]
  - module: SubscriptionText
    config:
      titles:
        - 'title'
      urls:
        - 'url'
      feeds:
        -
          title: 'title'
          url:   'url'
        -
          title: 'title'
          url:   'url'
      files:
        - 'somefile1.tsv'
        - 'somefile2.tsv'


SubscriptionPocket
------------------
[Path]
 /plugins/subscription/pocket.rb

[Abstract]
 Pocket API is struck and it is creation of feed.

[Syntax]
  - module: SubscriptionPocket
    config:
      consumer_key: 'your_consumer_key'
      access_token: 'your_access_token'
      optional:     # see http://getpocket.com/developer/docs/v3/retrieve
        favorite: 1
        count:    2
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry:    RETRY_COUNT


SubscriptionGGuide
------------------
[Path]
 /plugins/subscription/g_guide.rb

[Abstract]
 search keyword to the G guide (information on a TV program) rss

[Syntax]
  - module: SubscriptionGGuide
    config:
      keyword: 'anime,shogi' # search word (',' dividing and coming out two or more search)
      station: '地上波' # (It means terrestrial broadcasting in Japanese.)
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry:    RETRY_COUNT


SubscriptionChanToru
--------------------
[Path]
 /plugins/subscription/chan_toru.rb

[Abstract]
 Search keyword to CHAN-TORU (information on a TV program) rss
 (SubscriptionGGuide Plug-in dependence)

[Syntax]
  - module: SubscriptionChanToru
    config:
      keyword: 'anime' # search word
      station: '地上波' # (It means terrestrial broadcasting in Japanese.)
      interval: INTERVAL_FOR_SCRAPING (in seconds.)
      retry:    RETRY_COUNT


FilterClear
-----------
[Path]
 /plugins/filter/clear.rb

[Abstract]
 Clear Pipeline.

[Syntax]
  - module: FilterClear


FilterSort
----------
[Path]
 /plugins/filter/sort.rb

[Abstract]
 Sort feed by date asc or desc.
 If desc is specified, it's sort feed by date desc.

[Syntax]
  - module: FilterSort
    config:
      sort: asc or desc


FilterIgnore
------------
[Path]
 /plugins/filter/ignore.rb

[Abstract]
 Exclude the NG word.

[Syntax]
  - module: FilterIgnore
    config:
      link:
        - KEYWORD
        - KEYWORD ...
      description:
        - KEYWORD
        - KEYWORD ...


FilterAccept
------------
[Path]
 /plugins/filter/accept.rb

[Abstract]
 Contain the OK word.

[Syntax]
  - module: FilterAccept
    config:
      link:
        - KEYWORD
        - KEYWORD ...
      description:
        - KEYWORD
        - KEYWORD ...


FilterImage
-----------
[Path]
 /plugins/filter/image.rb

[Abstract]
 Extract images from the link.
 If not image, the permalink will be nil.

[Syntax]
  - module: FilterImage


FilterImageSource
-----------------
[Path]
 /plugins/filter/image_source.rb

[Abstract]
 Rewrite the permalink to source of the image in the contents.
 If there is no source of image, the permalink will be nil.

[Syntax]
  - module: FilterImageSource


FilterOne
---------
[Path]
 /plugins/filter/one.rb

[Abstract]
 Select a item from items.

[Syntax]
  - module: FilterOne
    config:
      pick: last (If none, pick the first item.)


FilterRand
----------
[Path]
 /plugins/filter/rand.rb

[Abstract]
 Randomize the array of the feed items.

[Syntax]
  - module: FilterRand


FilterSanitize
--------------
[Path]
 /plugins/filter/sanitize.rb

[Abstract]
 Strip the html tags.
 Reference: https://github.com/rgrove/sanitize

[Syntax]
  - module: FilterSanitize
    config:
      mode: basic or relaxed or restricted
            (default: restricted)


FilterFullFeed
--------------
[Path]
 /plugins/filter/full_feed.rb

[Abstract]
 Get full text of feed entry.

[Syntax]
  - module: FilterFeed
    config:
      siteinfo: your siteinfo file's path


FilterAbsoluteURI
-----------------
[Path]
 /plugins/filter/absolute_uri.rb

[Description]
 Rewrite relative path to absolute one.

[Syntax]
  - module: FilterAbsoluteURI
    config:
      url: http://targethost.com/


FilterTumblrResize
------------------
[Path]
 /plugins/filter/tumblr_resize.rb

[Abstract]
 Rewrite the permalink to the maximum size of
 the Tumblr (High Res).

[Assumption]
 It has already been rewritten to perm link image link

[Syntax]
  - module: FilterTumblrResize


FilterDescriptionLink
---------------------
[Path]
 /plugins/filter/description_link.rb

[Abstract]
 Pickup http or https URL from description.
 Re-write link to the URL.

[Syntax]
  - module: FilterDescriptionLink
    config:
      clear_description: 1 # Set empty to description.
      get_title: 1 # Get title after re-write link.


FilterGoogleNews
----------------
[Path]
 /plugins/filter/google_news.rb

[Abstract]
 Re-write Google News link to a new link of the redirect.

[Syntax]
  - module: FilterGoogleNews


StorePermalink
--------------
[Path]
 /plugins/store/permalink.rb

[Abstract]
 Save a permanent link.
 The duplicate permalink will be discarded.

[Syntax]
  - module: StorePermalink
    config:
      db: DB_NAME


StoreFullText
-------------
[Path]
 /plugins/store/full_text.rb

[Abstract]
 Save a full text of contents.

 Saved text can be viewed in the viewer below
 https://github.com/id774/blog_viewer

[Syntax]
  - Module: StoreFullText
    config:
      db: DB_NAME


StoreFile
---------
[Path]
 /plugins/store/file.rb

[Abstract]
 Store target to local file system.
 This emulate "Right click to save"
 If scheme begin with "s3n://", get file from Amazon S3.
 Re-write URI scheme to file URI scheme and return feeds.

[Syntax]
  - Module: StoreFile
    config:
      path: SAVE_TO_PATH
      retry: RETRY_COUNT
      interval: INTERVAL_FOR_DOWNLOAD (in seconds.)
      access_key: ACCESS_KEY_ID (Only using S3)
      secret_key: SECRET_ACCESS_KEY (Only using S3)
      bucket_name: AMAZONS3_BUCKET_NAME (Only using S3)


PublishConsole
--------------
[Path]
 /plugins/publish/console.rb

[Abstract]
 Output pipeline to the console.

[Syntax]
  - module: PublishConsole


PublishAmazonS3
---------------
[Path]
 /plugins/publish/amazon_s3.rb

[Abstract]
 Upload file to Amazon S3.

[Description]
 Read file URI scheme and upload it to aws.
 Postulate feed link must be file URI scheme.

[Syntax]
  - module: PublishAmazonS3
    config:
      access_key: ACCESS_KEY_ID
      secret_key: SECRET_ACCESS_KEY
      bucket_name: AMAZONS3_BUCKET_NAME
      target_path: PATH_ON_BUCKET


PublishFluentd
--------------
[Path]
 /plugins/publish/fluentd.rb

[Abstract]
 Output to fluentd with fluent-logger.

[Description]
 This plugin outputs feed to fluentd.
 Following fluentd config example.

  <source>
    type forward
    port 9999
  </source>

[Syntax]
  - module: PublishFluentd
    config:
      host: HOSTNAME
      port: PORT_NUMBER
      tag:  TAGS (example: automatic.feed)


ProvideFluentd
--------------
[Path]
 /plugins/provide/fluentd.rb

[Abstract]
 This plugin output content_encoded to fluentd.

[Description]
 Provide::Fluentd is different from Publish::Fluentd.

 Publish::Fluentd -> Output feed to flulentd.
 Provide::Fluentd -> Output content_encoded to fluentd.

[Syntax]
  - module: ProvideFluentd
    config:
      host: HOSTNAME
      port: PORT_NUMBER
      tag:  TAGS (example: automatic.feed)


PublishMemcached
----------------
[Path]
 /plugins/publish/memcached.rb

[Abstract]
 Output feeds converted hash to memcached with dalli.

[Syntax]
  - module: PublishMemcached
    config:
      host: HOSTNAME
      port: PORT_NUMBER
      key:  KEY


PublishHatenaBookmark
---------------------
[Path]
 /plugins/publish/hatenabookmark.rb

[Abstract]
 Bookmarking to Hatena Bookmark (Social Bookmark).

[Description]
 Generate the XML for submission to
 Hatena Bookmark API.

[Syntax]
  - module: PublishHatenaBookmark
    config:
      username: HATENA_ID
      passowrd: PASSWORD
      interval: INTERVAL_FOR_BOOKMARK (in seconds.)


PublishTwitter
--------------
[Path]
 /plugins/publish/twitter.rb

[Abstract]
 Publish to twitter.

[Syntax]
  - module: PublishTwitter
    config:
      consumer_key:       'your_consumer_key'
      consumer_secret:    'your_consumer_secret'
      oauth_token:        'your_oauth_token'
      oauth_token_secret: 'your_oauth_token_secret'
      tweet_tmp:          'tweet text {link}'
      interval:           INTERVAL_FOR_RETRY (in seconds.)
      retry:              RETRY_COUNT


PublishPocket
-------------
[Path]
 /plugins/publish/pocket.rb

[Abstract]
 Register an appointment to Pocket.

[Description]
 Submission to Pocket API. (using gem pocket-ruby)

[Syntax]
  - module: PublishPocket
    config:
      consumer_key: CONSUMER_KEY
      access_token: ACCESS_TOKEN
      interval: INTERVAL_FOR_RETRY (in seconds.)
      retry: RETRY_COUNT


PublishInstapaper
-----------------
[Path]
 /plugins/publish/instapaper.rb

[Abstract]
 Register an appointment to Instapaper.

[Description]
 Submission to Instapaper API.

[Syntax]
  - module: PublishInstapaper
    config:
      email: INSTAPAPER_ACCOUNT
      password: PASSWORD
      interval: INTERVAL_FOR_RETRY (in seconds.)
      retry: RETRY_COUNT


PublishGoogleCalendar
---------------------
[Path]
 /plugins/publish/google_calendar.rb

[Abstract]
 Register an appointment to Google Calendar.

[Description]
 Register item.title to Google Calendar.

[Syntax]
  - module: PublishGoogleCalendar
    config:
      username: GOOGLE_ACCOUNT
      password: PASSWORD
      interval: INTERVAL


PublishEject
------------
[Path]
 /plugins/publish/eject.rb

[Abstract]
 eject by the feed link count.

[Syntax]
  - module: PublishEject
    config:
      interval: INTERVAL


PublishHipchat
--------------
[Path]
 /plugins/publish/hipchat.rb

[Abstract]
 Register a message to HipChat

[Description]
 Using HipChat API (https://www.hipchat.com/docs/api),
 post a message to specific room.

[Syntax]
  - module: PublishHipchat
    config:
      api_token: API token of HipChat (required)
      room_id: ID or name of the room. (required)
      username: Name the message will appear be sent from. (required)
      color: Background color for message (default: yellow)
      notify: Whether or not this message should trigger a notification for people in the room (0 => false, 1 => true, default: 0)
      interval: INTERVAL_FOR_RETRY (in seconds.)
      retry: RETRY_COUNT


NotifyIkachan
-------------
[Path]
 /plugins/notify/ikachan.rb

[Abstract]
 Send a message to ikachan.

[Description]
 POST to ikachan via HTTP.
 ikachan is: http://blog.yappo.jp/yappo/archives/000760.html

[Syntax]
  - module: NotifyIkachan
    config:
      url: http://sample.com
      port: 4979             # port number, the default is 4979.
      channels: foo,bar,#baz # '#' is priced automatically, multiple by ','
      command: notice        # privmsg,notice etc..
      interval: 5            # post interval. (s)


CustomFeedSVNLog
----------------
[Path]
 /plugins/custom_feed/svn_log.rb

[Abstract]
 Get new revision info from SVN.

[Description]
 Get the number that is specified by fetch_items.

[Syntax]
  - module: CustomFeedSVNLog
    config:
      target: http://redmine.rubyforge.org/svn
      fetch_items: 2 # If not specified, 30


