Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

earch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

earch

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Earch

This application monitors the Twitter timeline and notifies Slack according to the conditions.

Installation

$ gem install earch

Usage

You must be prepared the configuration file first(The details will be described later). Save configuration file and run the following command.

$ earch -s setting.yml

Configuration File

Configuration file is YAML format file. YAML key and their allowable values are described below.

Example

twitter:
  stream_options:
    replies: all
  screen_name: flum_        #require
  api_key:
    consumer_key:           #require
    consumer_secret:        #require
    access_token:           #require
    access_token_secret:    #require
slack:
  api_key:
    token:                  #require
    websocket_ping: 5
  user_icon: ':earch:'
  notify_channel: '#earch'  #require
  icon: ':flum_:'
rules:                      #require
  - text: !ruby/regexp /test.*/
    screen_name: twitterdev
  - hashtag:
      - test
      - events
    favorite_count: 50
  - lang: ja
    retweet: false
    quote: false
    reply: true

twitter

This key is for Twitter configuration.

ArgumentRequiredDescription
stream_optionsOptionalRefer to Streaming API request parameters
api_keyRequiredGet from Twitter Application Management

slack

This key is for Slack configuration.

ArgumentRequiredDescription
api_keyRequiredGet from Bots
user_iconOptionalSet the Slack emoji
notify_channelRequiredSpecify the notification channel
iconOptionalSet your Twitter account icon

rules

The value corresponding to a key is need to Array. You can use multiple rules and conditions.

ArgumentDataTypeExampleComments
textStringtext: tweet text
Regexptext: !ruby/regexp /^\d+$/
user_idStringuser_id: "12345"Not a number
user_nameStringuser_name: twitter name
Regexpuser_name: !ruby/regexp /^[A-Z]+$/
screen_nameStringscreen_name: screen name
Regexpscreen_name: !ruby/regexp /^@test[0-9]+/
favorite_countIntegerfavorite_count: 50Get over 50 the number of favorites
Rangefavorite_count: !ruby/range 10..20The number of favorites is 10 to 20
retweet_countIntegerretweet_count: 50
Rangeretweet_count: !ruby/range 10..20
langStringlang: ja
Regexplang: !ruby/regexp /(ja|en)/
user_langStringuser_lang: ja
Regexpuser_lang: !ruby/regexp /(ja|en)/
sourceArray<String>source: [TweetDeck, Twitter for WEB]
hashtagArray<String>source: [test, memo]
mentionArray<String>source: [twitter, twitterdev]String for screen_name
Array<Integer>source: [123, 456]Integer for id
replyBooleanreply: false
quoteBooleanquote: false
retweetBooleanretweet: false

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/earch. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Earch project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 10 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc