Created
September 6, 2009 11:02
-
-
Save hitode909/181757 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# color setting | |
def find_color(s) | |
return 0 unless defined? Termtter::Client::get_group_of | |
groups = Termtter::Client::get_group_of s.user.screen_name | |
if groups.include? :me | |
3 | |
elsif config.plugins.keyword.keywords.find{|k| k === s.text } | |
31 | |
elsif groups.size > 0 | |
35 | |
else | |
0 | |
end | |
end | |
# print format | |
config.plugins.stdout.timeline_format = | |
'<92><%=time%></92> <<%=find_color(s)%>><%=s.user.screen_name%></<%=find_color(s)%>>: <%=TermColor.escape(text)%> <92><%=status_id%></92>' | |
# keyword and group definition | |
config.plugins.keyword.keywords = [ /rule1/, /rule2/ ] | |
config.plugins.group.groups = { | |
:group1 => %w( user1 user2 user3), | |
:group2 => %w( user1 user2 user3), | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment