twat 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/twat.1 +3 -1
- data/lib/twat/actions.rb +5 -0
- data/lib/twat/config.rb +5 -0
- data/lib/twat/options.rb +7 -0
- data/lib/twat.rb +1 -1
- metadata +5 -5
data/doc/twat.1
CHANGED
@@ -34,7 +34,9 @@ Options include
|
|
34
34
|
.IP default=account
|
35
35
|
Sets account as the default
|
36
36
|
.IP colors=<true|false>
|
37
|
-
Turns colors on or off in the output from twat.
|
37
|
+
Turns colors on or off in the output from twat. [defaults on]
|
38
|
+
.IP beep=<true|false>
|
39
|
+
Beep when a new tweet mentioning you is recieved (Handy in tmux). [defaults off]
|
38
40
|
.IP --update-config
|
39
41
|
Twat is a rolling release and as such, sometimes it is necessary to change the
|
40
42
|
format of it's internal config file. Rather than making changes without user
|
data/lib/twat/actions.rb
CHANGED
@@ -72,6 +72,7 @@ module Twat
|
|
72
72
|
def process_followed(tweets)
|
73
73
|
last_id = nil
|
74
74
|
tweets.reverse.each do |tweet|
|
75
|
+
beep if config.beep? && tweet.text.mentions?(account_name)
|
75
76
|
format(tweet)
|
76
77
|
last_id = tweet.id
|
77
78
|
end
|
@@ -175,5 +176,9 @@ module Twat
|
|
175
176
|
end
|
176
177
|
end
|
177
178
|
|
179
|
+
def beep
|
180
|
+
print "\a"
|
181
|
+
end
|
182
|
+
|
178
183
|
end
|
179
184
|
end
|
data/lib/twat/config.rb
CHANGED
@@ -53,6 +53,11 @@ module Twat
|
|
53
53
|
Options.bool_true?(colors)
|
54
54
|
end
|
55
55
|
|
56
|
+
def beep?
|
57
|
+
beep = config[:beep] || "false"
|
58
|
+
Options.bool_true?(beep)
|
59
|
+
end
|
60
|
+
|
56
61
|
def default_account
|
57
62
|
raise NoDefaultAccount unless config.include?(:default)
|
58
63
|
return config[:default].to_sym
|
data/lib/twat/options.rb
CHANGED
data/lib/twat.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-07 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: twitter
|
16
|
-
requirement: &
|
16
|
+
requirement: &15590620 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *15590620
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: oauth
|
27
|
-
requirement: &
|
27
|
+
requirement: &15590160 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *15590160
|
36
36
|
description: Command line tool for tweeting and whatnot
|
37
37
|
email:
|
38
38
|
- richo@psych0tik.net
|