Skip to content

Instantly share code, notes, and snippets.

@penguin2716
Created February 10, 2014 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penguin2716/8912876 to your computer and use it in GitHub Desktop.
Save penguin2716/8912876 to your computer and use it in GitHub Desktop.
「はい」を全て「拝承」に書き換えてからツイートするmikutterプラグイン
# -*- coding: utf-8 -*-
Plugin.create :haishou do
filter_gui_postbox_post do |gui_postbox|
text = Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text.gsub(/はい/, "拝承")
Service.primary.post :message => text
Plugin.call(:before_postbox_post, text)
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = ''
Plugin.filter_cancel!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment