tweet 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/ttime +36 -0
- data/bin/tweet +30 -0
- data/bin/tweetd +126 -0
- data/doc/classes/SimplePop.html +125 -0
- data/doc/classes/SimplePop.src/M000009.html +59 -0
- data/doc/classes/SimplePop.src/M000010.html +43 -0
- data/doc/classes/SimplePopWindow.html +126 -0
- data/doc/classes/SimplePopWindow.src/M000005.html +77 -0
- data/doc/classes/SimplePopWindow.src/M000006.html +36 -0
- data/doc/classes/SyslogNotifier.html +113 -0
- data/doc/classes/SyslogNotifier.src/M000003.html +34 -0
- data/doc/classes/SyslogNotifier.src/M000004.html +39 -0
- data/doc/classes/Tweet/Monitor.html +236 -0
- data/doc/classes/Tweet/Monitor.src/M000028.html +53 -0
- data/doc/classes/Tweet/Monitor.src/M000029.html +38 -0
- data/doc/classes/Tweet/Monitor.src/M000030.html +40 -0
- data/doc/classes/Tweet/Monitor.src/M000031.html +31 -0
- data/doc/classes/Tweet/Monitor.src/M000032.html +32 -0
- data/doc/classes/Tweet/Monitor.src/M000033.html +65 -0
- data/doc/classes/Tweet/Monitor.src/M000034.html +38 -0
- data/doc/classes/Tweet/Note.html +272 -0
- data/doc/classes/Tweet/Note.src/M000020.html +32 -0
- data/doc/classes/Tweet/Note.src/M000021.html +30 -0
- data/doc/classes/Tweet/Note.src/M000022.html +30 -0
- data/doc/classes/Tweet/Note.src/M000023.html +30 -0
- data/doc/classes/Tweet/Note.src/M000024.html +30 -0
- data/doc/classes/Tweet/Note.src/M000025.html +30 -0
- data/doc/classes/Tweet/Note.src/M000026.html +30 -0
- data/doc/classes/Tweet/Note.src/M000027.html +30 -0
- data/doc/classes/Tweet/Notifier.html +147 -0
- data/doc/classes/Tweet/Notifier.src/M000018.html +34 -0
- data/doc/classes/Tweet/Notifier.src/M000019.html +30 -0
- data/doc/classes/Tweet.html +336 -0
- data/doc/classes/Tweet.src/M000011.html +42 -0
- data/doc/classes/Tweet.src/M000012.html +30 -0
- data/doc/classes/Tweet.src/M000013.html +30 -0
- data/doc/classes/Tweet.src/M000014.html +30 -0
- data/doc/classes/Tweet.src/M000015.html +30 -0
- data/doc/classes/Tweet.src/M000016.html +30 -0
- data/doc/classes/Tweet.src/M000017.html +30 -0
- data/doc/classes/XOSDNotifier.html +113 -0
- data/doc/classes/XOSDNotifier.src/M000007.html +36 -0
- data/doc/classes/XOSDNotifier.src/M000008.html +38 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +228 -0
- data/doc/files/bin/ttime.html +112 -0
- data/doc/files/bin/tweet.html +111 -0
- data/doc/files/bin/tweetd.html +163 -0
- data/doc/files/bin/tweetd.src/M000001.html +51 -0
- data/doc/files/bin/tweetd.src/M000002.html +30 -0
- data/doc/files/lib/tweet_rb.html +178 -0
- data/doc/files/plugins/simplepop_rb.html +97 -0
- data/doc/files/plugins/syslog_rb.html +101 -0
- data/doc/files/plugins/xosd_rb.html +96 -0
- data/doc/fr_class_index.html +53 -0
- data/doc/fr_file_index.html +53 -0
- data/doc/fr_method_index.html +79 -0
- data/doc/index.html +26 -0
- data/doc/rdoc-style.css +175 -0
- data/images/comments.png +0 -0
- data/lib/tweet.rb +437 -0
- data/plugins/simplepop.rb +128 -0
- data/plugins/syslog.rb +24 -0
- data/plugins/xosd.rb +23 -0
- metadata +142 -0
@@ -0,0 +1,112 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>File: ttime</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
54
|
+
<tr><td>
|
55
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
56
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />ttime</td>
|
57
|
+
<td align="right">
|
58
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
59
|
+
<tr>
|
60
|
+
<td>Path:</td>
|
61
|
+
<td>bin/ttime
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
<tr>
|
65
|
+
<td>Modified:</td>
|
66
|
+
<td>Thu Sep 28 14:42:15 EDT 2006</td>
|
67
|
+
</tr>
|
68
|
+
</table>
|
69
|
+
</td></tr>
|
70
|
+
</table>
|
71
|
+
</td></tr>
|
72
|
+
</table><br>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><h1>ttime</h1>
|
79
|
+
<h2>Synopsis</h2>
|
80
|
+
<p>
|
81
|
+
A timer for tea. Or, I suppose, other things.
|
82
|
+
</p>
|
83
|
+
<h2>Usage</h2>
|
84
|
+
<p>
|
85
|
+
ttime [minutes] You can even use fractional minutes.
|
86
|
+
</p>
|
87
|
+
<h2>Author</h2>
|
88
|
+
<p>
|
89
|
+
Payton Swick, 2006
|
90
|
+
</p>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div class="sectiontitle">Required Files</div>
|
94
|
+
<ul>
|
95
|
+
<li>rubygems</li>
|
96
|
+
<li>tweet</li>
|
97
|
+
<li>daemons</li>
|
98
|
+
</ul>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>File: tweet</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
54
|
+
<tr><td>
|
55
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
56
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />tweet</td>
|
57
|
+
<td align="right">
|
58
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
59
|
+
<tr>
|
60
|
+
<td>Path:</td>
|
61
|
+
<td>bin/tweet
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
<tr>
|
65
|
+
<td>Modified:</td>
|
66
|
+
<td>Mon Sep 11 14:58:06 EDT 2006</td>
|
67
|
+
</tr>
|
68
|
+
</table>
|
69
|
+
</td></tr>
|
70
|
+
</table>
|
71
|
+
</td></tr>
|
72
|
+
</table><br>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><h1>tweet</h1>
|
79
|
+
<h2>Synopsis</h2>
|
80
|
+
<p>
|
81
|
+
Contacts a running tweetd server and prints text specified as an argument.
|
82
|
+
</p>
|
83
|
+
<h2>Usage</h2>
|
84
|
+
<pre>
|
85
|
+
tweet "<message text>" [duration]
|
86
|
+
</pre>
|
87
|
+
<h2>Author</h2>
|
88
|
+
<p>
|
89
|
+
Payton Swick, 2006
|
90
|
+
</p>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div class="sectiontitle">Required Files</div>
|
94
|
+
<ul>
|
95
|
+
<li>rubygems</li>
|
96
|
+
<li>tweet</li>
|
97
|
+
</ul>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|
@@ -0,0 +1,163 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>File: tweetd</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
54
|
+
<tr><td>
|
55
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
56
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />tweetd</td>
|
57
|
+
<td align="right">
|
58
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
59
|
+
<tr>
|
60
|
+
<td>Path:</td>
|
61
|
+
<td>bin/tweetd
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
<tr>
|
65
|
+
<td>Modified:</td>
|
66
|
+
<td>Fri Oct 13 14:27:55 EDT 2006</td>
|
67
|
+
</tr>
|
68
|
+
</table>
|
69
|
+
</td></tr>
|
70
|
+
</table>
|
71
|
+
</td></tr>
|
72
|
+
</table><br>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><h1><a href="../../classes/Tweet.html">Tweet</a></h1>
|
79
|
+
<h2>Synopsis</h2>
|
80
|
+
<p>
|
81
|
+
A generalized notification daemon. Can be petitioned by an arbitrary
|
82
|
+
application to activate a notification. Notifications can be customized by
|
83
|
+
the user via a plugin architecture. Examples include a GTK2 popup dialog, a
|
84
|
+
syslog entry, or an email alert.
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
Can also be required in a ruby script to access a running <a
|
88
|
+
href="../../classes/Tweet.html">Tweet</a> daemon (see <a
|
89
|
+
href="../../classes/Tweet.html#M000011">Tweet.notify</a>, <a
|
90
|
+
href="../../classes/Tweet.html#M000012">Tweet.message</a>, Tweet.running?,
|
91
|
+
<a href="../../classes/Tweet.html#M000016">Tweet.stop</a>).
|
92
|
+
</p>
|
93
|
+
<p>
|
94
|
+
The website is here: <a
|
95
|
+
href="http://tweet.rubyforge.org">tweet.rubyforge.org</a>/
|
96
|
+
</p>
|
97
|
+
<h2>Usage</h2>
|
98
|
+
<pre>
|
99
|
+
tweetd [options]
|
100
|
+
</pre>
|
101
|
+
<h2>Requirements</h2>
|
102
|
+
<ul>
|
103
|
+
<li>Ruby 1.8
|
104
|
+
|
105
|
+
</li>
|
106
|
+
</ul>
|
107
|
+
<h2>Author</h2>
|
108
|
+
<p>
|
109
|
+
Payton Swick, 2006
|
110
|
+
</p>
|
111
|
+
<h2>License Creative Commons GPL license.</h2>
|
112
|
+
<p>
|
113
|
+
<a
|
114
|
+
href="http://creativecommons.org/licenses/GPL/2.0">creativecommons.org/licenses/GPL/2.0</a>/
|
115
|
+
</p>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div class="sectiontitle">Required Files</div>
|
119
|
+
<ul>
|
120
|
+
<li>rubygems</li>
|
121
|
+
<li>tweet</li>
|
122
|
+
<li>pathname</li>
|
123
|
+
<li>daemons</li>
|
124
|
+
<li>optparse</li>
|
125
|
+
</ul>
|
126
|
+
|
127
|
+
|
128
|
+
<div class="sectiontitle">Methods</div>
|
129
|
+
<ul>
|
130
|
+
<li><a href="#M000001">parse_config</a></li>
|
131
|
+
<li><a href="#M000002">register_plugins</a></li>
|
132
|
+
</ul>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<div class="sectiontitle">Public Instance methods</div>
|
140
|
+
<div class="method">
|
141
|
+
<div class="title">
|
142
|
+
<a name="M000001"></a><b>parse_config</b>()
|
143
|
+
[ <a href="javascript:openCode('tweetd.src/M000001.html')">source</a> ]
|
144
|
+
</div>
|
145
|
+
<div class="description">
|
146
|
+
<p>
|
147
|
+
Read and parse the config file, if one exists. Create the default config
|
148
|
+
file if no config file currently exists.
|
149
|
+
</p>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
<div class="method">
|
153
|
+
<div class="title">
|
154
|
+
<a name="M000002"></a><b>register_plugins</b>()
|
155
|
+
[ <a href="javascript:openCode('tweetd.src/M000002.html')">source</a> ]
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
</div>
|
161
|
+
|
162
|
+
</body>
|
163
|
+
</html>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>parse_config (bin/tweetd)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File bin/tweetd, line 51</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_config</span>
|
27
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@config_dir</span>.<span class="ruby-identifier">exist?</span>
|
28
|
+
<span class="ruby-ivar">@config_dir</span>.<span class="ruby-identifier">mkpath</span>
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
30
|
+
|
31
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@config_file</span>.<span class="ruby-identifier">exist?</span>
|
32
|
+
<span class="ruby-ivar">@config_file</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">'w'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
33
|
+
<span class="ruby-identifier">file</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"---
|
34
|
+
plugin:
|
35
|
+
- SyslogNotifier
|
36
|
+
- SimplePop
|
37
|
+
"</span>
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
|
41
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@config_file</span>.<span class="ruby-identifier">exist?</span>) <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@config_file</span>.<span class="ruby-identifier">readable?</span>)
|
42
|
+
<span class="ruby-identifier">config</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-ivar">@config_file</span>.<span class="ruby-identifier">to_s</span>)
|
43
|
+
<span class="ruby-ivar">@pri</span> = <span class="ruby-identifier">config</span>[<span class="ruby-value str">'priority'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>[<span class="ruby-value str">'priority'</span>]
|
44
|
+
<span class="ruby-ivar">@plugins_dir</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">config</span>[<span class="ruby-value str">'plugins'</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>[<span class="ruby-value str">'plugins'</span>]
|
45
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>[<span class="ruby-value str">'plugin'</span>]
|
46
|
+
<span class="ruby-identifier">config</span>[<span class="ruby-value str">'plugin'</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">plugin</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@config_requested_plugins</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">plugin</span> }
|
47
|
+
<span class="ruby-keyword kw">end</span>
|
48
|
+
<span class="ruby-keyword kw">end</span>
|
49
|
+
<span class="ruby-keyword kw">end</span></pre>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>register_plugins (bin/tweetd)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File bin/tweetd, line 76</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_plugins</span>
|
27
|
+
<span class="ruby-constant">Dir</span>[<span class="ruby-node">"#{@plugins_dir}/*.rb"</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">load</span> <span class="ruby-identifier">x</span> }
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,178 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>File: tweet.rb</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
54
|
+
<tr><td>
|
55
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
56
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />tweet.rb</td>
|
57
|
+
<td align="right">
|
58
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
59
|
+
<tr>
|
60
|
+
<td>Path:</td>
|
61
|
+
<td>lib/tweet.rb
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
<tr>
|
65
|
+
<td>Modified:</td>
|
66
|
+
<td>Fri Oct 13 14:28:38 EDT 2006</td>
|
67
|
+
</tr>
|
68
|
+
</table>
|
69
|
+
</td></tr>
|
70
|
+
</table>
|
71
|
+
</td></tr>
|
72
|
+
</table><br>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><h1><a href="../../classes/Tweet.html">Tweet</a></h1>
|
79
|
+
<h2>Synopsis</h2>
|
80
|
+
<p>
|
81
|
+
A generalized notification daemon. Can be petitioned by an arbitrary
|
82
|
+
application to activate a notification. Notifications can be customized by
|
83
|
+
the user via a plugin architecture. Examples include a GTK2 popup dialog, a
|
84
|
+
syslog entry, or an email alert.
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
Can also be required in a ruby script to access a running <a
|
88
|
+
href="../../classes/Tweet.html">Tweet</a> daemon (see <a
|
89
|
+
href="../../classes/Tweet.html#M000011">Tweet.notify</a>, <a
|
90
|
+
href="../../classes/Tweet.html#M000012">Tweet.message</a>, Tweet.running?,
|
91
|
+
<a href="../../classes/Tweet.html#M000016">Tweet.stop</a>).
|
92
|
+
</p>
|
93
|
+
<p>
|
94
|
+
The website is here: <a
|
95
|
+
href="http://tweet.rubyforge.org">tweet.rubyforge.org</a>/
|
96
|
+
</p>
|
97
|
+
<h2>Installation</h2>
|
98
|
+
<pre>
|
99
|
+
gem install tweet
|
100
|
+
</pre>
|
101
|
+
<p>
|
102
|
+
or maybe:
|
103
|
+
</p>
|
104
|
+
<pre>
|
105
|
+
sudo gem install tweet
|
106
|
+
</pre>
|
107
|
+
<h2>Usage</h2>
|
108
|
+
<pre>
|
109
|
+
tweetd [options]
|
110
|
+
</pre>
|
111
|
+
<h2>Requirements</h2>
|
112
|
+
<ul>
|
113
|
+
<li>Ruby 1.8
|
114
|
+
|
115
|
+
</li>
|
116
|
+
<li>daemons library
|
117
|
+
|
118
|
+
</li>
|
119
|
+
<li>pidify library
|
120
|
+
|
121
|
+
</li>
|
122
|
+
</ul>
|
123
|
+
<h2>Examples</h2>
|
124
|
+
<p>
|
125
|
+
To start the daemon:
|
126
|
+
</p>
|
127
|
+
<pre>
|
128
|
+
tweetd -d
|
129
|
+
</pre>
|
130
|
+
<p>
|
131
|
+
To contact the daemon from the shell:
|
132
|
+
</p>
|
133
|
+
<pre>
|
134
|
+
tweet "hello world"
|
135
|
+
</pre>
|
136
|
+
<p>
|
137
|
+
To contact the daemon from ruby:
|
138
|
+
</p>
|
139
|
+
<pre>
|
140
|
+
require 'tweet'
|
141
|
+
Tweet.message("hello world")
|
142
|
+
</pre>
|
143
|
+
<h2>Author</h2>
|
144
|
+
<p>
|
145
|
+
Payton Swick, 2006
|
146
|
+
</p>
|
147
|
+
<h2>License Creative Commons GPL license.</h2>
|
148
|
+
<p>
|
149
|
+
<a
|
150
|
+
href="http://creativecommons.org/licenses/GPL/2.0">creativecommons.org/licenses/GPL/2.0</a>/
|
151
|
+
</p>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="sectiontitle">Required Files</div>
|
155
|
+
<ul>
|
156
|
+
<li>rubygems</li>
|
157
|
+
<li>gserver</li>
|
158
|
+
<li>yaml</li>
|
159
|
+
<li>pidify</li>
|
160
|
+
<li>net/telnet</li>
|
161
|
+
<li>syslog</li>
|
162
|
+
<li>gtk2</li>
|
163
|
+
<li>gtktrayicon</li>
|
164
|
+
</ul>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</div>
|
176
|
+
|
177
|
+
</body>
|
178
|
+
</html>
|