yapra 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/{History.txt → ChangeLog} +8 -0
- data/LICENCE +1 -1
- data/README.mdown +70 -0
- data/Rakefile +119 -13
- data/bin/yapra +3 -1
- data/lib/yapra/pipeline.rb +6 -52
- data/lib/yapra/pipeline_base.rb +64 -0
- data/lib/yapra/plugin/mechanize_base.rb +1 -1
- data/lib/yapra/rb_pipeline.rb +7 -0
- data/lib/yapra/version.rb +1 -1
- data/lib/yapra.rb +1 -1
- data/lib-plugins/yapra/plugin/feed/custom.rb +25 -12
- data/lib-plugins/yapra/plugin/filter/entry_full_text.rb +1 -1
- data/lib-plugins/yapra/plugin/publish/gmail.rb +6 -3
- data/lib-plugins/yapra/plugin/publish/imap.rb +23 -106
- data/lib-plugins/yapra/plugin/publish/mail.rb +112 -0
- data/lib-plugins/yapra/plugin/publish/smtp.rb +80 -0
- metadata +68 -63
- data/License.txt +0 -22
- data/Manifest.txt +0 -117
- data/PostInstall.txt +0 -0
- data/README.txt +0 -67
- data/config/hoe.rb +0 -75
- data/config/requirements.rb +0 -15
- data/setup.rb +0 -1585
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'yapra/version'
|
2
|
+
require 'yapra/plugin/base'
|
3
|
+
|
4
|
+
module Yapra::Plugin::Publish
|
5
|
+
class Mail < Yapra::Plugin::Base
|
6
|
+
def initialize
|
7
|
+
@session = nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def run(data)
|
11
|
+
prepare
|
12
|
+
|
13
|
+
unless config['mail']
|
14
|
+
config['mail'] = {}
|
15
|
+
end
|
16
|
+
subject_prefix = config['mail']['subject_prefix'] || ''
|
17
|
+
from = config['mail']['from'] || 'yapra@localhost'
|
18
|
+
to = config['mail']['to'] || 'me@localhost'
|
19
|
+
|
20
|
+
open_session
|
21
|
+
|
22
|
+
data.each do |item|
|
23
|
+
date = item.date || item.dc_date || Time.now
|
24
|
+
content = item.content_encoded || item.description || 'from Yapra.'
|
25
|
+
content = [content].pack('m')
|
26
|
+
if config['mail']['from_template']
|
27
|
+
from = apply_template(config['mail']['from_template'], binding)
|
28
|
+
end
|
29
|
+
if config['mail']['to_template']
|
30
|
+
to = apply_template(config['mail']['to_template'], binding)
|
31
|
+
end
|
32
|
+
subject = (subject_prefix + item.title).gsub(/\n/, '').chomp
|
33
|
+
logger.debug("try append item: #{subject}")
|
34
|
+
boundary = "----_____====#{Time.now.to_i}--BOUDARY"
|
35
|
+
attachments = create_attachments(item, config)
|
36
|
+
send_item(apply_template(mail_template, binding),
|
37
|
+
{'date' => date, 'from' => from, 'to' => to})
|
38
|
+
|
39
|
+
sleep config['wait']
|
40
|
+
end
|
41
|
+
close_session
|
42
|
+
|
43
|
+
data
|
44
|
+
end
|
45
|
+
|
46
|
+
protected
|
47
|
+
def prepare
|
48
|
+
config['wait'] = config['wait'] || 1
|
49
|
+
end
|
50
|
+
|
51
|
+
def open_session; end # template
|
52
|
+
def close_session; end # template
|
53
|
+
def send_item(msg, opt); end # template
|
54
|
+
|
55
|
+
def encode_field field
|
56
|
+
field.gsub(/[^\x01-\x7f]*/) {|x|
|
57
|
+
x.scan(/.{1,10}/).map {|y|
|
58
|
+
"=?UTF-8?B?" + y.to_a.pack('m').chomp + "?="
|
59
|
+
}.join("\n ")
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
def create_attachments item, config
|
64
|
+
attachments = []
|
65
|
+
attachment_attributes = config['mail']['attachments']
|
66
|
+
if attachment_attributes.kind_of?(String)
|
67
|
+
file = item.__send__(attachment_attributes)
|
68
|
+
attachments << file if file.kind_of?(WWW::Mechanize::File)
|
69
|
+
elsif attachment_attributes.kind_of?(Array)
|
70
|
+
attachment_attributes.each do |atc|
|
71
|
+
file = item.__send__(atc)
|
72
|
+
attachments << file if file.kind_of?(WWW::Mechanize::File)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
attachments
|
76
|
+
end
|
77
|
+
|
78
|
+
def mail_template
|
79
|
+
return <<EOT
|
80
|
+
From: <%=encode_field(from) %>
|
81
|
+
To: <%=encode_field(to) %>
|
82
|
+
Date: <%=date.rfc2822 %>
|
83
|
+
MIME-Version: 1.0
|
84
|
+
X-Mailer: Yapra <%=Yapra::VERSION::STRING %>
|
85
|
+
Subject: <%=encode_field(subject) %>
|
86
|
+
Content-Type: multipart/mixed; boundary="<%=boundary -%>"
|
87
|
+
|
88
|
+
This is a multi-part message in MIME format.
|
89
|
+
|
90
|
+
--<%=boundary %>
|
91
|
+
Content-type: text/html; charset=UTF-8
|
92
|
+
Content-transfer-encoding: base64
|
93
|
+
|
94
|
+
<%=content %>
|
95
|
+
|
96
|
+
--<%=boundary %>
|
97
|
+
<% attachments.each do |file| -%>
|
98
|
+
Content-Type: <%=file.header['Content-Type'] %>;
|
99
|
+
name="<%=encode_field(file.filename) %>"
|
100
|
+
Content-Disposition: attachment;
|
101
|
+
filename="<%=encode_field(file.filename) %>"
|
102
|
+
Content-Transfer-Encoding: base64
|
103
|
+
|
104
|
+
<%=[file.body].pack('m') -%>
|
105
|
+
|
106
|
+
--<%=boundary %>
|
107
|
+
|
108
|
+
<% end -%>
|
109
|
+
EOT
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'net/smtp'
|
2
|
+
require 'yapra/version'
|
3
|
+
require 'yapra/plugin/publish/mail'
|
4
|
+
|
5
|
+
module Yapra::Plugin::Publish
|
6
|
+
# = module: Publish::Smtp -- wtnabe
|
7
|
+
#
|
8
|
+
# sending each entry via smtp.
|
9
|
+
#
|
10
|
+
# example:
|
11
|
+
# - module: Publish::Smtp
|
12
|
+
# config:
|
13
|
+
# username: username
|
14
|
+
# password: password
|
15
|
+
# smtp_server: smtp.example.com
|
16
|
+
# helo: [example.com]
|
17
|
+
# pop_server: [pop.example.com]
|
18
|
+
# authtype: pop | apop | :plain | :cram_md5
|
19
|
+
# port: 25
|
20
|
+
# # or 587
|
21
|
+
# wait: 1
|
22
|
+
# mail:
|
23
|
+
# subject_prefix: '[Yapra]'
|
24
|
+
# from_template: <%=item.author%> <test@example.com>
|
25
|
+
# from: 'test@example.com'
|
26
|
+
# # use for envelope from
|
27
|
+
# to: 'test2@example.com'
|
28
|
+
#
|
29
|
+
class Smtp < Mail
|
30
|
+
def prepare
|
31
|
+
super
|
32
|
+
config['helo'] = config['helo'] || 'localhost.localdomain'
|
33
|
+
if config['authtype']
|
34
|
+
if ( config['pop_server'] )
|
35
|
+
config['port'] = config['port'] || 25
|
36
|
+
config['authtype'] = config['authtype'] || 'pop'
|
37
|
+
else
|
38
|
+
config['port'] = config['port'] || 587
|
39
|
+
config['authtype'] = config['authtype'] || :plain
|
40
|
+
end
|
41
|
+
else
|
42
|
+
config['port'] = config['port'] || 25
|
43
|
+
config['pop_server'] = nil
|
44
|
+
config['username'] = nil
|
45
|
+
config['password'] = nil
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def open_session
|
50
|
+
if ( config['pop_server'] )
|
51
|
+
require 'net/pop'
|
52
|
+
apop = (config['authtype'] == 'apop')
|
53
|
+
Net::POP3.APOP(apop).auth_only(config['pop_server'], 110, config['username'], config['password'])
|
54
|
+
config['username'] = nil
|
55
|
+
config['password'] = nil
|
56
|
+
config['authtype'] = nil
|
57
|
+
end
|
58
|
+
logger.info( "Connecting server: #{config['smtp_server']}, port: #{config['port']}, helo_domain: #{config['helo']}, accout: #{config['username']}, authtype: #{config['authtype']}" )
|
59
|
+
@session = Net::SMTP.start(config['smtp_server'], config['port'],
|
60
|
+
config['helo'], config['username'],
|
61
|
+
config['password'], config['authtype'])
|
62
|
+
end
|
63
|
+
|
64
|
+
def close_session
|
65
|
+
@session.finish
|
66
|
+
end
|
67
|
+
|
68
|
+
def send_item(msg, opt)
|
69
|
+
@session.send_mail(msg, raw_mail_address(opt['from']), raw_mail_address(opt['to']))
|
70
|
+
end
|
71
|
+
|
72
|
+
MAIL_ADDRESS_FORMAT = /<([0-9a-z!#_\$%\&'\*\+\/\=\?\^\|\-\{\}\.]+@[0-9a-z!#_\$%\&'\*\+\/\=\?\^\|\-\{\}\.]+)>/
|
73
|
+
def raw_mail_address address
|
74
|
+
if MAIL_ADDRESS_FORMAT =~ address
|
75
|
+
address = $1
|
76
|
+
end
|
77
|
+
return address
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
metadata
CHANGED
@@ -1,63 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yapra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- yuanying
|
8
|
+
autorequire: ""
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-12-04 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
type: :
|
16
|
+
name: mechanize
|
17
|
+
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 0.7.6
|
24
24
|
version:
|
25
25
|
description: Yet another pragger implementation.
|
26
|
-
email:
|
27
|
-
- yuanying at fraction dot jp
|
26
|
+
email: yuanying at fraction dot jp
|
28
27
|
executables:
|
29
28
|
- yapra
|
30
29
|
extensions: []
|
31
30
|
|
32
31
|
extra_rdoc_files:
|
33
|
-
-
|
34
|
-
-
|
35
|
-
- Manifest.txt
|
36
|
-
- PostInstall.txt
|
37
|
-
- README.txt
|
38
|
-
- website/index.txt
|
32
|
+
- README.mdown
|
33
|
+
- ChangeLog
|
39
34
|
files:
|
40
|
-
-
|
41
|
-
-
|
42
|
-
- License.txt
|
43
|
-
- Manifest.txt
|
44
|
-
- PostInstall.txt
|
45
|
-
- README.txt
|
35
|
+
- README.mdown
|
36
|
+
- ChangeLog
|
46
37
|
- Rakefile
|
38
|
+
- LICENCE
|
47
39
|
- bin/yapra
|
48
|
-
- config/hoe.rb
|
49
|
-
- config/requirements.rb
|
50
40
|
- fixtures/config/habu_like.yml
|
51
41
|
- fixtures/config/mixed_type.yml
|
52
42
|
- fixtures/config/pragger_like.yml
|
53
43
|
- fixtures/legacy_plugin/legacy_test_plugin.rb
|
44
|
+
- legacy_plugins/argv.rb
|
45
|
+
- legacy_plugins/concat.rb
|
46
|
+
- legacy_plugins/const_list.rb
|
54
47
|
- legacy_plugins/Download/nicovideo.rb
|
55
48
|
- legacy_plugins/Feed/custom_feed.rb
|
56
49
|
- legacy_plugins/Feed/google_calendar.rb
|
57
50
|
- legacy_plugins/Feed/google_search_history.rb
|
58
51
|
- legacy_plugins/Feed/hatena_graph.rb
|
59
52
|
- legacy_plugins/Feed/lirs.rb
|
60
|
-
- legacy_plugins/Filter/Translations/yahoo.rb
|
61
53
|
- legacy_plugins/Filter/apply_text_html.rb
|
62
54
|
- legacy_plugins/Filter/average.rb
|
63
55
|
- legacy_plugins/Filter/deduped.rb
|
@@ -70,6 +62,14 @@ files:
|
|
70
62
|
- legacy_plugins/Filter/sort.rb
|
71
63
|
- legacy_plugins/Filter/subs.rb
|
72
64
|
- legacy_plugins/Filter/to_integer.rb
|
65
|
+
- legacy_plugins/Filter/Translations/yahoo.rb
|
66
|
+
- legacy_plugins/first.rb
|
67
|
+
- legacy_plugins/head.rb
|
68
|
+
- legacy_plugins/load_path.rb
|
69
|
+
- legacy_plugins/plagger.rb
|
70
|
+
- legacy_plugins/plugin_from_uri.rb
|
71
|
+
- legacy_plugins/pluginbase.rb
|
72
|
+
- legacy_plugins/print.rb
|
73
73
|
- legacy_plugins/Publish/delicious.rb
|
74
74
|
- legacy_plugins/Publish/google_calendar.rb
|
75
75
|
- legacy_plugins/Publish/hatena_bookmark.rb
|
@@ -79,24 +79,33 @@ files:
|
|
79
79
|
- legacy_plugins/Publish/mixi_diary_writer.rb
|
80
80
|
- legacy_plugins/Publish/scuttle.rb
|
81
81
|
- legacy_plugins/Publish/twitter.rb
|
82
|
+
- legacy_plugins/reverse.rb
|
82
83
|
- legacy_plugins/RSS/load.rb
|
83
84
|
- legacy_plugins/RSS/save.rb
|
84
|
-
- legacy_plugins/Yaml/load.rb
|
85
|
-
- legacy_plugins/Yaml/save.rb
|
86
|
-
- legacy_plugins/argv.rb
|
87
|
-
- legacy_plugins/concat.rb
|
88
|
-
- legacy_plugins/const_list.rb
|
89
|
-
- legacy_plugins/first.rb
|
90
|
-
- legacy_plugins/head.rb
|
91
|
-
- legacy_plugins/load_path.rb
|
92
|
-
- legacy_plugins/plagger.rb
|
93
|
-
- legacy_plugins/plugin_from_uri.rb
|
94
|
-
- legacy_plugins/pluginbase.rb
|
95
|
-
- legacy_plugins/print.rb
|
96
|
-
- legacy_plugins/reverse.rb
|
97
85
|
- legacy_plugins/send_msg.rb
|
98
86
|
- legacy_plugins/stdin.rb
|
99
87
|
- legacy_plugins/stdout.rb
|
88
|
+
- legacy_plugins/Yaml/load.rb
|
89
|
+
- legacy_plugins/Yaml/save.rb
|
90
|
+
- lib/yapra/config.rb
|
91
|
+
- lib/yapra/inflector.rb
|
92
|
+
- lib/yapra/legacy_plugin/advance_mode_registry.rb
|
93
|
+
- lib/yapra/legacy_plugin/base.rb
|
94
|
+
- lib/yapra/legacy_plugin/compatible_mode_registry.rb
|
95
|
+
- lib/yapra/legacy_plugin/registry_factory.rb
|
96
|
+
- lib/yapra/legacy_plugin.rb
|
97
|
+
- lib/yapra/pipeline.rb
|
98
|
+
- lib/yapra/pipeline_base.rb
|
99
|
+
- lib/yapra/plugin/base.rb
|
100
|
+
- lib/yapra/plugin/context_aware.rb
|
101
|
+
- lib/yapra/plugin/erb_applier.rb
|
102
|
+
- lib/yapra/plugin/feed_item_operator.rb
|
103
|
+
- lib/yapra/plugin/mechanize_base.rb
|
104
|
+
- lib/yapra/plugin.rb
|
105
|
+
- lib/yapra/rb_pipeline.rb
|
106
|
+
- lib/yapra/runtime.rb
|
107
|
+
- lib/yapra/version.rb
|
108
|
+
- lib/yapra.rb
|
100
109
|
- lib-plugins/yapra/plugin/config/agent.rb
|
101
110
|
- lib-plugins/yapra/plugin/config/basic_auth.rb
|
102
111
|
- lib-plugins/yapra/plugin/config/web_post.rb
|
@@ -108,37 +117,17 @@ files:
|
|
108
117
|
- lib-plugins/yapra/plugin/publish/file_download.rb
|
109
118
|
- lib-plugins/yapra/plugin/publish/gmail.rb
|
110
119
|
- lib-plugins/yapra/plugin/publish/imap.rb
|
120
|
+
- lib-plugins/yapra/plugin/publish/mail.rb
|
111
121
|
- lib-plugins/yapra/plugin/publish/on_memory_download.rb
|
122
|
+
- lib-plugins/yapra/plugin/publish/smtp.rb
|
112
123
|
- lib-plugins/yapra/plugin/test/append_entry.rb
|
113
124
|
- lib-plugins/yapra/plugin/test/raise_error.rb
|
114
125
|
- lib-plugins/yapra/plugin/test/test.rb
|
115
126
|
- lib-plugins/yapra/plugin/test/test2.rb
|
116
|
-
- lib/yapra.rb
|
117
|
-
- lib/yapra/config.rb
|
118
|
-
- lib/yapra/inflector.rb
|
119
|
-
- lib/yapra/legacy_plugin.rb
|
120
|
-
- lib/yapra/legacy_plugin/advance_mode_registry.rb
|
121
|
-
- lib/yapra/legacy_plugin/base.rb
|
122
|
-
- lib/yapra/legacy_plugin/compatible_mode_registry.rb
|
123
|
-
- lib/yapra/legacy_plugin/registry_factory.rb
|
124
|
-
- lib/yapra/pipeline.rb
|
125
|
-
- lib/yapra/plugin.rb
|
126
|
-
- lib/yapra/plugin/base.rb
|
127
|
-
- lib/yapra/plugin/context_aware.rb
|
128
|
-
- lib/yapra/plugin/erb_applier.rb
|
129
|
-
- lib/yapra/plugin/feed_item_operator.rb
|
130
|
-
- lib/yapra/plugin/mechanize_base.rb
|
131
|
-
- lib/yapra/runtime.rb
|
132
|
-
- lib/yapra/version.rb
|
133
127
|
- plugins/Filter/deduped.rb
|
134
128
|
- plugins/Filter/grep.rb
|
135
129
|
- plugins/Filter/sort.rb
|
136
130
|
- plugins/Filter/subs.rb
|
137
|
-
- script/console
|
138
|
-
- script/destroy
|
139
|
-
- script/generate
|
140
|
-
- script/txt2html
|
141
|
-
- setup.rb
|
142
131
|
- spec/spec.opts
|
143
132
|
- spec/spec_helper.rb
|
144
133
|
- spec/yapra/config_spec.rb
|
@@ -154,12 +143,28 @@ files:
|
|
154
143
|
- website/javascripts/rounded_corners_lite.inc.js
|
155
144
|
- website/stylesheets/screen.css
|
156
145
|
- website/template.html.erb
|
146
|
+
- script/console
|
147
|
+
- script/destroy
|
148
|
+
- script/generate
|
149
|
+
- script/txt2html
|
157
150
|
has_rdoc: true
|
158
151
|
homepage: http://yapra.rubyforge.org
|
159
|
-
|
152
|
+
licenses: []
|
153
|
+
|
154
|
+
post_install_message:
|
160
155
|
rdoc_options:
|
156
|
+
- --title
|
157
|
+
- yapra documentation
|
158
|
+
- --charset
|
159
|
+
- utf-8
|
160
|
+
- --opname
|
161
|
+
- index.html
|
162
|
+
- --line-numbers
|
161
163
|
- --main
|
162
|
-
- README.
|
164
|
+
- README.mdown
|
165
|
+
- --inline-source
|
166
|
+
- --exclude
|
167
|
+
- ^(examples|extras)/
|
163
168
|
require_paths:
|
164
169
|
- lib
|
165
170
|
- lib-plugins
|
@@ -178,9 +183,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
183
|
requirements: []
|
179
184
|
|
180
185
|
rubyforge_project: yapra
|
181
|
-
rubygems_version: 1.
|
186
|
+
rubygems_version: 1.3.5
|
182
187
|
signing_key:
|
183
|
-
specification_version:
|
188
|
+
specification_version: 3
|
184
189
|
summary: Yet another pragger implementation.
|
185
190
|
test_files: []
|
186
191
|
|
data/License.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2008 fraction.jp. Some rights reserved.
|
2
|
-
|
3
|
-
Original from 2008-06-12 http://pragger.ikejisoft.com/
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest.txt
DELETED
@@ -1,117 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
LICENCE
|
3
|
-
License.txt
|
4
|
-
Manifest.txt
|
5
|
-
PostInstall.txt
|
6
|
-
README.txt
|
7
|
-
Rakefile
|
8
|
-
bin/yapra
|
9
|
-
config/hoe.rb
|
10
|
-
config/requirements.rb
|
11
|
-
fixtures/config/habu_like.yml
|
12
|
-
fixtures/config/mixed_type.yml
|
13
|
-
fixtures/config/pragger_like.yml
|
14
|
-
fixtures/legacy_plugin/legacy_test_plugin.rb
|
15
|
-
legacy_plugins/Download/nicovideo.rb
|
16
|
-
legacy_plugins/Feed/custom_feed.rb
|
17
|
-
legacy_plugins/Feed/google_calendar.rb
|
18
|
-
legacy_plugins/Feed/google_search_history.rb
|
19
|
-
legacy_plugins/Feed/hatena_graph.rb
|
20
|
-
legacy_plugins/Feed/lirs.rb
|
21
|
-
legacy_plugins/Filter/Translations/yahoo.rb
|
22
|
-
legacy_plugins/Filter/apply_text_html.rb
|
23
|
-
legacy_plugins/Filter/average.rb
|
24
|
-
legacy_plugins/Filter/deduped.rb
|
25
|
-
legacy_plugins/Filter/find_num.rb
|
26
|
-
legacy_plugins/Filter/find_regex.rb
|
27
|
-
legacy_plugins/Filter/fresh.rb
|
28
|
-
legacy_plugins/Filter/get_html.rb
|
29
|
-
legacy_plugins/Filter/grep.rb
|
30
|
-
legacy_plugins/Filter/invert.rb
|
31
|
-
legacy_plugins/Filter/sort.rb
|
32
|
-
legacy_plugins/Filter/subs.rb
|
33
|
-
legacy_plugins/Filter/to_integer.rb
|
34
|
-
legacy_plugins/Publish/delicious.rb
|
35
|
-
legacy_plugins/Publish/google_calendar.rb
|
36
|
-
legacy_plugins/Publish/hatena_bookmark.rb
|
37
|
-
legacy_plugins/Publish/hatena_diary_writer.rb
|
38
|
-
legacy_plugins/Publish/hatena_graph.rb
|
39
|
-
legacy_plugins/Publish/lingr.rb
|
40
|
-
legacy_plugins/Publish/mixi_diary_writer.rb
|
41
|
-
legacy_plugins/Publish/scuttle.rb
|
42
|
-
legacy_plugins/Publish/twitter.rb
|
43
|
-
legacy_plugins/RSS/load.rb
|
44
|
-
legacy_plugins/RSS/save.rb
|
45
|
-
legacy_plugins/Yaml/load.rb
|
46
|
-
legacy_plugins/Yaml/save.rb
|
47
|
-
legacy_plugins/argv.rb
|
48
|
-
legacy_plugins/concat.rb
|
49
|
-
legacy_plugins/const_list.rb
|
50
|
-
legacy_plugins/first.rb
|
51
|
-
legacy_plugins/head.rb
|
52
|
-
legacy_plugins/load_path.rb
|
53
|
-
legacy_plugins/plagger.rb
|
54
|
-
legacy_plugins/plugin_from_uri.rb
|
55
|
-
legacy_plugins/pluginbase.rb
|
56
|
-
legacy_plugins/print.rb
|
57
|
-
legacy_plugins/reverse.rb
|
58
|
-
legacy_plugins/send_msg.rb
|
59
|
-
legacy_plugins/stdin.rb
|
60
|
-
legacy_plugins/stdout.rb
|
61
|
-
lib-plugins/yapra/plugin/config/agent.rb
|
62
|
-
lib-plugins/yapra/plugin/config/basic_auth.rb
|
63
|
-
lib-plugins/yapra/plugin/config/web_post.rb
|
64
|
-
lib-plugins/yapra/plugin/feed/custom.rb
|
65
|
-
lib-plugins/yapra/plugin/feed/load.rb
|
66
|
-
lib-plugins/yapra/plugin/filter/apply_template.rb
|
67
|
-
lib-plugins/yapra/plugin/filter/deduped.rb
|
68
|
-
lib-plugins/yapra/plugin/filter/entry_full_text.rb
|
69
|
-
lib-plugins/yapra/plugin/publish/file_download.rb
|
70
|
-
lib-plugins/yapra/plugin/publish/gmail.rb
|
71
|
-
lib-plugins/yapra/plugin/publish/imap.rb
|
72
|
-
lib-plugins/yapra/plugin/publish/on_memory_download.rb
|
73
|
-
lib-plugins/yapra/plugin/test/append_entry.rb
|
74
|
-
lib-plugins/yapra/plugin/test/raise_error.rb
|
75
|
-
lib-plugins/yapra/plugin/test/test.rb
|
76
|
-
lib-plugins/yapra/plugin/test/test2.rb
|
77
|
-
lib/yapra.rb
|
78
|
-
lib/yapra/config.rb
|
79
|
-
lib/yapra/inflector.rb
|
80
|
-
lib/yapra/legacy_plugin.rb
|
81
|
-
lib/yapra/legacy_plugin/advance_mode_registry.rb
|
82
|
-
lib/yapra/legacy_plugin/base.rb
|
83
|
-
lib/yapra/legacy_plugin/compatible_mode_registry.rb
|
84
|
-
lib/yapra/legacy_plugin/registry_factory.rb
|
85
|
-
lib/yapra/pipeline.rb
|
86
|
-
lib/yapra/plugin.rb
|
87
|
-
lib/yapra/plugin/base.rb
|
88
|
-
lib/yapra/plugin/context_aware.rb
|
89
|
-
lib/yapra/plugin/erb_applier.rb
|
90
|
-
lib/yapra/plugin/feed_item_operator.rb
|
91
|
-
lib/yapra/plugin/mechanize_base.rb
|
92
|
-
lib/yapra/runtime.rb
|
93
|
-
lib/yapra/version.rb
|
94
|
-
plugins/Filter/deduped.rb
|
95
|
-
plugins/Filter/grep.rb
|
96
|
-
plugins/Filter/sort.rb
|
97
|
-
plugins/Filter/subs.rb
|
98
|
-
script/console
|
99
|
-
script/destroy
|
100
|
-
script/generate
|
101
|
-
script/txt2html
|
102
|
-
setup.rb
|
103
|
-
spec/spec.opts
|
104
|
-
spec/spec_helper.rb
|
105
|
-
spec/yapra/config_spec.rb
|
106
|
-
spec/yapra/legacy_plugin/base_spec.rb
|
107
|
-
spec/yapra/legacy_plugin/registry_factory_spec.rb
|
108
|
-
spec/yapra/pipeline_spec.rb
|
109
|
-
spec/yapra_spec.rb
|
110
|
-
tasks/deployment.rake
|
111
|
-
tasks/environment.rake
|
112
|
-
tasks/rspec.rake
|
113
|
-
tasks/website.rake
|
114
|
-
website/index.txt
|
115
|
-
website/javascripts/rounded_corners_lite.inc.js
|
116
|
-
website/stylesheets/screen.css
|
117
|
-
website/template.html.erb
|
data/PostInstall.txt
DELETED
File without changes
|
data/README.txt
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
= yapra
|
2
|
-
|
3
|
-
* http://yapra.rubyforge.org/
|
4
|
-
* http://github.com/yuanying/yapra/tree/master
|
5
|
-
|
6
|
-
== DESCRIPTION:
|
7
|
-
|
8
|
-
Yet Another Pragger(http://pragger.ikejisoft.com/) implementation.
|
9
|
-
|
10
|
-
== FEATURES/PROBLEMS:
|
11
|
-
|
12
|
-
* 99% compatible of Pragger.
|
13
|
-
* Class-based plugin support.
|
14
|
-
* Loadpass based plugin loading strategy. (also support pragger's plugin in advance mode.)
|
15
|
-
* Support Python habu like config file.
|
16
|
-
|
17
|
-
== SYNOPSIS:
|
18
|
-
|
19
|
-
=== Use at command
|
20
|
-
|
21
|
-
$ yapra -c config_file.yml
|
22
|
-
|
23
|
-
=== Use in your application
|
24
|
-
|
25
|
-
require 'yapra/runtime'
|
26
|
-
require 'yapra/config'
|
27
|
-
|
28
|
-
config = YAML.load(config_file)
|
29
|
-
config = Yapra::Config.new(config)
|
30
|
-
|
31
|
-
Yapra::Runtime.logger = Logger.new(STDOUT)
|
32
|
-
|
33
|
-
yapra = Yapra::Runtime.new(config.env)
|
34
|
-
yapra.execute(config.pipeline_commands)
|
35
|
-
|
36
|
-
== REQUIREMENTS:
|
37
|
-
|
38
|
-
* mechanize (>= 0.7.6)
|
39
|
-
|
40
|
-
== INSTALL:
|
41
|
-
|
42
|
-
* sudo gem install yapra
|
43
|
-
|
44
|
-
== LICENSE:
|
45
|
-
|
46
|
-
(The MIT License)
|
47
|
-
|
48
|
-
Copyright (c) 2008 Yuanying Ohtsuka
|
49
|
-
|
50
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
51
|
-
a copy of this software and associated documentation files (the
|
52
|
-
'Software'), to deal in the Software without restriction, including
|
53
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
54
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
55
|
-
permit persons to whom the Software is furnished to do so, subject to
|
56
|
-
the following conditions:
|
57
|
-
|
58
|
-
The above copyright notice and this permission notice shall be
|
59
|
-
included in all copies or substantial portions of the Software.
|
60
|
-
|
61
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
62
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
63
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
64
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
65
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
66
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
67
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|