automatic 12.6.0 → 12.9.1
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/VERSION +1 -1
- data/automatic.gemspec +10 -22
- data/bin/automatic-config +4 -4
- data/doc/ChangeLog +30 -1
- data/doc/PLUGINS +46 -178
- data/doc/PLUGINS.ja +46 -177
- data/doc/README +2 -10
- data/doc/README.ja +2 -9
- data/lib/automatic.rb +2 -3
- data/plugins/custom_feed/svn_log.rb +0 -1
- data/plugins/filter/absolute_uri.rb +39 -0
- data/plugins/filter/image.rb +46 -0
- data/plugins/filter/reverse.rb +0 -1
- data/plugins/store/database.rb +8 -23
- data/plugins/store/full_text.rb +4 -4
- data/plugins/store/permalink.rb +12 -9
- data/plugins/store/target_link.rb +3 -2
- data/plugins/subscription/link.rb +55 -0
- data/plugins/subscription/twitter.rb +57 -0
- data/script/build +1 -1
- data/spec/lib/automatic_spec.rb +3 -2
- data/spec/plugins/custom_feed/svn_log_spec.rb +1 -1
- data/spec/plugins/filter/absolute_uri_spec.rb +61 -0
- data/spec/plugins/filter/image_source_spec.rb +1 -1
- data/spec/plugins/filter/image_spec.rb +65 -0
- data/spec/plugins/publish/google_calendar_spec.rb +1 -1
- data/spec/plugins/store/full_text_spec.rb +0 -1
- data/spec/plugins/store/permalink_spec.rb +52 -3
- data/spec/plugins/store/target_link_spec.rb +1 -2
- data/spec/plugins/subscription/feed_spec.rb +0 -1
- data/spec/plugins/subscription/{uri_spec.rb → link_spec.rb} +9 -10
- data/spec/plugins/subscription/twitter_spec.rb +42 -0
- data/spec/spec_helper.rb +12 -26
- data/spec/user_dir/plugins/store/mock.rb +1 -1
- data/test/integration/test_get_image.yml +4 -6
- data/test/integration/test_image2local.yml +1 -1
- metadata +10 -22
- data/config/html2console.yml +0 -16
- data/plugins/extract/link.rb +0 -32
- data/plugins/filter/image_link.rb +0 -37
- data/plugins/publish/dump.rb +0 -24
- data/plugins/store/link.rb +0 -47
- data/plugins/store/target.rb +0 -41
- data/plugins/subscription/uri.rb +0 -31
- data/spec/fixtures/extractLink.html +0 -14
- data/spec/fixtures/filterImageLink.html +0 -34
- data/spec/fixtures/publishDump.html +0 -14
- data/spec/fixtures/storeLink.html +0 -34
- data/spec/fixtures/storeLink2.html +0 -36
- data/spec/fixtures/storeTarget.html +0 -11
- data/spec/fixtures/storeTarget2.html +0 -11
- data/spec/plugins/extract/link_spec.rb +0 -38
- data/spec/plugins/filter/image_link_spec.rb +0 -51
- data/spec/plugins/publish/dump_spec.rb +0 -32
- data/spec/plugins/store/link_spec.rb +0 -47
- data/spec/plugins/store/target_spec.rb +0 -41
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
12.
|
1
|
+
12.9.1
|
data/automatic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "automatic"
|
8
|
-
s.version = "12.
|
8
|
+
s.version = "12.9.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["id774"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-09-18"
|
13
13
|
s.description = "Ruby General Automation Framework"
|
14
14
|
s.email = "idnanashi@gmail.com"
|
15
15
|
s.executables = ["automatic", "automatic-config"]
|
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
"bin/automatic",
|
26
26
|
"bin/automatic-config",
|
27
27
|
"config/feed2console.yml",
|
28
|
-
"config/html2console.yml",
|
29
28
|
"db/.gitkeep",
|
30
29
|
"doc/AUTHORS",
|
31
30
|
"doc/COPYING",
|
@@ -42,61 +41,50 @@ Gem::Specification.new do |s|
|
|
42
41
|
"lib/automatic/pipeline.rb",
|
43
42
|
"lib/automatic/recipe.rb",
|
44
43
|
"plugins/custom_feed/svn_log.rb",
|
45
|
-
"plugins/
|
44
|
+
"plugins/filter/absolute_uri.rb",
|
46
45
|
"plugins/filter/ignore.rb",
|
47
|
-
"plugins/filter/
|
46
|
+
"plugins/filter/image.rb",
|
48
47
|
"plugins/filter/image_source.rb",
|
49
48
|
"plugins/filter/reverse.rb",
|
50
49
|
"plugins/filter/tumblr_resize.rb",
|
51
50
|
"plugins/notify/ikachan.rb",
|
52
51
|
"plugins/publish/console.rb",
|
53
|
-
"plugins/publish/dump.rb",
|
54
52
|
"plugins/publish/google_calendar.rb",
|
55
53
|
"plugins/publish/hatena_bookmark.rb",
|
56
54
|
"plugins/publish/mail.rb",
|
57
55
|
"plugins/publish/smtp.rb",
|
58
56
|
"plugins/store/database.rb",
|
59
57
|
"plugins/store/full_text.rb",
|
60
|
-
"plugins/store/link.rb",
|
61
58
|
"plugins/store/permalink.rb",
|
62
|
-
"plugins/store/target.rb",
|
63
59
|
"plugins/store/target_link.rb",
|
64
60
|
"plugins/subscription/feed.rb",
|
65
|
-
"plugins/subscription/
|
61
|
+
"plugins/subscription/link.rb",
|
62
|
+
"plugins/subscription/twitter.rb",
|
66
63
|
"script/bootstrap",
|
67
64
|
"script/build",
|
68
|
-
"spec/fixtures/extractLink.html",
|
69
|
-
"spec/fixtures/filterImageLink.html",
|
70
|
-
"spec/fixtures/publishDump.html",
|
71
65
|
"spec/fixtures/sampleRecipe.yml",
|
72
|
-
"spec/fixtures/storeLink.html",
|
73
|
-
"spec/fixtures/storeLink2.html",
|
74
|
-
"spec/fixtures/storeTarget.html",
|
75
|
-
"spec/fixtures/storeTarget2.html",
|
76
66
|
"spec/lib/automatic/pipeline_spec.rb",
|
77
67
|
"spec/lib/automatic/recipe_spec.rb",
|
78
68
|
"spec/lib/automatic_spec.rb",
|
79
69
|
"spec/plugins/custom_feed/svn_log_spec.rb",
|
80
|
-
"spec/plugins/
|
70
|
+
"spec/plugins/filter/absolute_uri_spec.rb",
|
81
71
|
"spec/plugins/filter/ignore_spec.rb",
|
82
|
-
"spec/plugins/filter/image_link_spec.rb",
|
83
72
|
"spec/plugins/filter/image_source_spec.rb",
|
73
|
+
"spec/plugins/filter/image_spec.rb",
|
84
74
|
"spec/plugins/filter/reverse_spec.rb",
|
85
75
|
"spec/plugins/filter/tumblr_resize_spec.rb",
|
86
76
|
"spec/plugins/notify/ikachan_spec.rb",
|
87
77
|
"spec/plugins/publish/console_spec.rb",
|
88
|
-
"spec/plugins/publish/dump_spec.rb",
|
89
78
|
"spec/plugins/publish/google_calendar_spec.rb",
|
90
79
|
"spec/plugins/publish/hatena_bookmark_spec.rb",
|
91
80
|
"spec/plugins/publish/mail_spec.rb",
|
92
81
|
"spec/plugins/publish/smtp_spec.rb",
|
93
82
|
"spec/plugins/store/full_text_spec.rb",
|
94
|
-
"spec/plugins/store/link_spec.rb",
|
95
83
|
"spec/plugins/store/permalink_spec.rb",
|
96
84
|
"spec/plugins/store/target_link_spec.rb",
|
97
|
-
"spec/plugins/store/target_spec.rb",
|
98
85
|
"spec/plugins/subscription/feed_spec.rb",
|
99
|
-
"spec/plugins/subscription/
|
86
|
+
"spec/plugins/subscription/link_spec.rb",
|
87
|
+
"spec/plugins/subscription/twitter_spec.rb",
|
100
88
|
"spec/spec_helper.rb",
|
101
89
|
"spec/user_dir/plugins/store/mock.rb",
|
102
90
|
"test/fixtures/sampleOPML.xml",
|
data/bin/automatic-config
CHANGED
@@ -33,25 +33,25 @@ subparsers = {
|
|
33
33
|
dir = (File.expand_path('~/.automatic/plugins/' + path))
|
34
34
|
unless File.exist?(dir)
|
35
35
|
FileUtils.mkdir_p(dir)
|
36
|
-
puts "
|
36
|
+
puts "Creating #{dir}"
|
37
37
|
end
|
38
38
|
}
|
39
39
|
dir = (File.expand_path('~/.automatic/config'))
|
40
40
|
unless File.exist?(dir)
|
41
41
|
FileUtils.mkdir_p(dir)
|
42
42
|
FileUtils.cp_r(root_dir + '/config', dir + '/example')
|
43
|
-
puts "
|
43
|
+
puts "Creating #{dir}"
|
44
44
|
end
|
45
45
|
dir = (File.expand_path('~/.automatic/db'))
|
46
46
|
unless File.exist?(dir)
|
47
47
|
FileUtils.mkdir_p(dir)
|
48
|
-
puts "
|
48
|
+
puts "Creating #{dir}"
|
49
49
|
end
|
50
50
|
},
|
51
51
|
'unscaffold' => lambda { |argv|
|
52
52
|
dir = (File.expand_path('~/.automatic'))
|
53
53
|
if File.directory?(dir)
|
54
|
-
puts "
|
54
|
+
puts "Removing #{dir}"
|
55
55
|
FileUtils.rm_r(dir)
|
56
56
|
end
|
57
57
|
},
|
data/doc/ChangeLog
CHANGED
@@ -1,10 +1,39 @@
|
|
1
|
+
=== 12.9.1 / 2012-09-18
|
2
|
+
|
3
|
+
* Bug fix
|
4
|
+
|
5
|
+
* It should be considered the case of the feed link including nil
|
6
|
+
|
7
|
+
|
8
|
+
=== 12.9.0 / 2012-09-18
|
9
|
+
|
10
|
+
* The format of the pipeline were unified to "feed object" (array of feeds).
|
11
|
+
|
12
|
+
* Some plug-ins have lost backward compatibility.
|
13
|
+
|
14
|
+
* Added new plug-ins.
|
15
|
+
|
16
|
+
* Subscription::Link
|
17
|
+
* Subscription::Twitter
|
18
|
+
* Filter::Image
|
19
|
+
* Filter::AbsoluteURI
|
20
|
+
|
21
|
+
* Removed obsolete plug-ins.
|
22
|
+
|
23
|
+
* Subscription::URI
|
24
|
+
* Extract::Link
|
25
|
+
* Filter::ImageLink
|
26
|
+
* Store::Link
|
27
|
+
* Store::Target
|
28
|
+
|
29
|
+
|
1
30
|
=== 12.6.0 / 2012-06-18
|
2
31
|
|
3
32
|
* Added plug-ins.
|
4
33
|
|
5
34
|
* Subscription::URI
|
6
35
|
* Extract::Link
|
7
|
-
* Filter::
|
36
|
+
* Filter::ImageLink
|
8
37
|
* Store::Link
|
9
38
|
* Store::Target
|
10
39
|
|
data/doc/PLUGINS
CHANGED
@@ -7,12 +7,6 @@ SubscriptionFeed
|
|
7
7
|
[Path]
|
8
8
|
/plugins/subscription/feed.rb
|
9
9
|
|
10
|
-
[Input]
|
11
|
-
None
|
12
|
-
|
13
|
-
[Output]
|
14
|
-
Feed
|
15
|
-
|
16
10
|
[Abstract]
|
17
11
|
Subscribe to feed.
|
18
12
|
|
@@ -24,17 +18,43 @@ SubscriptionFeed
|
|
24
18
|
- FEED ...
|
25
19
|
|
26
20
|
|
21
|
+
SubscriptionLink
|
22
|
+
----------------
|
23
|
+
[Path]
|
24
|
+
/plugins/subscription/link.rb
|
25
|
+
|
26
|
+
[Abstract]
|
27
|
+
Subscribe urls and extract there links.
|
28
|
+
|
29
|
+
[Syntax]
|
30
|
+
- module: SubscriptionLink
|
31
|
+
config:
|
32
|
+
urls:
|
33
|
+
- URL
|
34
|
+
- URL ...
|
35
|
+
|
36
|
+
|
37
|
+
SubscriptionTwitter
|
38
|
+
-------------------
|
39
|
+
[Path]
|
40
|
+
/plugins/subscription/twitter.rb
|
41
|
+
|
42
|
+
[Abstract]
|
43
|
+
Subscribe twitter and extract there statuses and the links.
|
44
|
+
|
45
|
+
[Syntax]
|
46
|
+
- module: SubscriptionTwittter
|
47
|
+
config:
|
48
|
+
urls:
|
49
|
+
- URL
|
50
|
+
- URL ...
|
51
|
+
|
52
|
+
|
27
53
|
FilterReverse
|
28
54
|
-------------
|
29
55
|
[Path]
|
30
56
|
/plugins/filter/reverse.rb
|
31
57
|
|
32
|
-
[Input]
|
33
|
-
Feed
|
34
|
-
|
35
|
-
[Output]
|
36
|
-
Feed
|
37
|
-
|
38
58
|
[Abstract]
|
39
59
|
Sort feed by date asc.
|
40
60
|
|
@@ -47,12 +67,6 @@ FilterIgnore
|
|
47
67
|
[Path]
|
48
68
|
/plugins/filter/ignore.rb
|
49
69
|
|
50
|
-
[Input]
|
51
|
-
Feed
|
52
|
-
|
53
|
-
[Output]
|
54
|
-
Feed
|
55
|
-
|
56
70
|
[Abstract]
|
57
71
|
To exclude the NG word.
|
58
72
|
|
@@ -69,12 +83,6 @@ FilterImageSource
|
|
69
83
|
[Path]
|
70
84
|
/plugins/filter/image_source.rb
|
71
85
|
|
72
|
-
[Input]
|
73
|
-
Feed
|
74
|
-
|
75
|
-
[Output]
|
76
|
-
Feed
|
77
|
-
|
78
86
|
[Abstract]
|
79
87
|
Rewrite the permalink to source of the image in the contents.
|
80
88
|
If there is no source of image, the permalink will be nil.
|
@@ -83,17 +91,25 @@ FilterImageSource
|
|
83
91
|
- module: FilterImageSource
|
84
92
|
|
85
93
|
|
94
|
+
FilterAbsoluteURI
|
95
|
+
-----------------
|
96
|
+
[Path]
|
97
|
+
/plugins/filter/absolute_uri.rb
|
98
|
+
|
99
|
+
[Description]
|
100
|
+
Rewrite relative path to absolute one.
|
101
|
+
|
102
|
+
[Syntax]
|
103
|
+
- module: FilterAbsoluteURI
|
104
|
+
config:
|
105
|
+
url: http://targethost.com/
|
106
|
+
|
107
|
+
|
86
108
|
FilterTumblrResize
|
87
109
|
--------------------
|
88
110
|
[Path]
|
89
111
|
/plugins/filter/tumblr_resize.rb
|
90
112
|
|
91
|
-
[Input]
|
92
|
-
Feed
|
93
|
-
|
94
|
-
[Output]
|
95
|
-
Feed
|
96
|
-
|
97
113
|
[Abstract]
|
98
114
|
To rewrite the permalink to the maximum size of
|
99
115
|
the Tumblr (High Res).
|
@@ -110,12 +126,6 @@ StorePermalink
|
|
110
126
|
[Path]
|
111
127
|
/plugins/store/permalink.rb
|
112
128
|
|
113
|
-
[Input]
|
114
|
-
Feed
|
115
|
-
|
116
|
-
[Output]
|
117
|
-
Feed
|
118
|
-
|
119
129
|
[Abstract]
|
120
130
|
Save a permanent link.
|
121
131
|
The duplicate permalink will be discarded.
|
@@ -131,12 +141,6 @@ StoreFullText
|
|
131
141
|
[Path]
|
132
142
|
/plugins/store/full_text.rb
|
133
143
|
|
134
|
-
[Input]
|
135
|
-
Feed
|
136
|
-
|
137
|
-
[Output]
|
138
|
-
Feed
|
139
|
-
|
140
144
|
[Abstract]
|
141
145
|
Save a full text of contents.
|
142
146
|
|
@@ -154,12 +158,6 @@ StoreTargetLink
|
|
154
158
|
[Path]
|
155
159
|
/plugins/store/target_link.rb
|
156
160
|
|
157
|
-
[Input]
|
158
|
-
Feed
|
159
|
-
|
160
|
-
[Output]
|
161
|
-
Feed
|
162
|
-
|
163
161
|
[Abstract]
|
164
162
|
Store target locally.
|
165
163
|
This emulate "Right click to save".
|
@@ -176,12 +174,6 @@ PublishConsole
|
|
176
174
|
[Path]
|
177
175
|
/plugins/publish/console.rb
|
178
176
|
|
179
|
-
[Input]
|
180
|
-
Feed
|
181
|
-
|
182
|
-
[Output]
|
183
|
-
Feed
|
184
|
-
|
185
177
|
[Abstract]
|
186
178
|
Output pipeline to the console.
|
187
179
|
|
@@ -194,12 +186,6 @@ PublishHatenaBookmark
|
|
194
186
|
[Path]
|
195
187
|
/plugins/publish/hatenabookmark.rb
|
196
188
|
|
197
|
-
[Input]
|
198
|
-
Feed
|
199
|
-
|
200
|
-
[Output]
|
201
|
-
Feed
|
202
|
-
|
203
189
|
[Abstract]
|
204
190
|
To Hatena Bookmark (Social Bookmark).
|
205
191
|
|
@@ -220,12 +206,6 @@ PublishGoogleCalendar
|
|
220
206
|
[Path]
|
221
207
|
/plugins/publish/google_calendar.rb
|
222
208
|
|
223
|
-
[Input]
|
224
|
-
Feed
|
225
|
-
|
226
|
-
[Output]
|
227
|
-
Feed
|
228
|
-
|
229
209
|
[Abstract]
|
230
210
|
To register an appointment to Google Calendar.
|
231
211
|
|
@@ -245,12 +225,6 @@ NotifyIkachan
|
|
245
225
|
[Path]
|
246
226
|
/plugins/notify/ikachan.rb
|
247
227
|
|
248
|
-
[Input]
|
249
|
-
Feed
|
250
|
-
|
251
|
-
[Output]
|
252
|
-
Feed
|
253
|
-
|
254
228
|
[Abstract]
|
255
229
|
To send a message to ikachan.
|
256
230
|
|
@@ -273,12 +247,6 @@ CustomFeedSVNLog
|
|
273
247
|
[Path]
|
274
248
|
/plugins/custom_feed/svn_log.rb
|
275
249
|
|
276
|
-
[Input]
|
277
|
-
None
|
278
|
-
|
279
|
-
[Output]
|
280
|
-
Feed
|
281
|
-
|
282
250
|
[Abstract]
|
283
251
|
Get new revision info from SVN.
|
284
252
|
|
@@ -292,103 +260,3 @@ CustomFeedSVNLog
|
|
292
260
|
fetch_items: 2 # If not specified, 30
|
293
261
|
|
294
262
|
|
295
|
-
SubscriptionURI
|
296
|
-
---------------
|
297
|
-
[Path]
|
298
|
-
/plugins/subscription/uri.rb
|
299
|
-
|
300
|
-
[Input]
|
301
|
-
None
|
302
|
-
|
303
|
-
[Output]
|
304
|
-
HTML
|
305
|
-
|
306
|
-
[Description]
|
307
|
-
Open http or ftp URL to file object.
|
308
|
-
|
309
|
-
[Syntax]
|
310
|
-
- module: CustomFeedURI
|
311
|
-
config:
|
312
|
-
url:
|
313
|
-
- URL
|
314
|
-
- URL ...
|
315
|
-
|
316
|
-
|
317
|
-
ExtractLink
|
318
|
-
-----------
|
319
|
-
[Path]
|
320
|
-
/plugins/extract/link.rb
|
321
|
-
|
322
|
-
[Input]
|
323
|
-
HTML
|
324
|
-
|
325
|
-
[Output]
|
326
|
-
An array of links.
|
327
|
-
|
328
|
-
[Description]
|
329
|
-
Extract a link in HTML.
|
330
|
-
|
331
|
-
[Syntax]
|
332
|
-
- module: FilterLink
|
333
|
-
|
334
|
-
|
335
|
-
FilterImageLink
|
336
|
-
---------------
|
337
|
-
[Path]
|
338
|
-
/plugins/filter/image_link.rb
|
339
|
-
|
340
|
-
[Input]
|
341
|
-
An array of links.
|
342
|
-
|
343
|
-
[Output]
|
344
|
-
An array of links.
|
345
|
-
|
346
|
-
[Description]
|
347
|
-
Extract image's link from HTML.
|
348
|
-
|
349
|
-
[Syntax]
|
350
|
-
- module: FilterImageLink
|
351
|
-
|
352
|
-
|
353
|
-
StoreLink
|
354
|
-
---------
|
355
|
-
[Path]
|
356
|
-
/plugins/store/link.rb
|
357
|
-
|
358
|
-
[Input]
|
359
|
-
An array of links.
|
360
|
-
|
361
|
-
[Output]
|
362
|
-
An array of links.
|
363
|
-
|
364
|
-
[Abstract]
|
365
|
-
Save a permanent link.
|
366
|
-
The duplicate permalink will be discarded.
|
367
|
-
This is a HTML version for StorePermalink.
|
368
|
-
|
369
|
-
[Syntax]
|
370
|
-
- module: StoreLink
|
371
|
-
config:
|
372
|
-
db: DB_NAME
|
373
|
-
|
374
|
-
|
375
|
-
StoreTarget
|
376
|
-
-----------
|
377
|
-
[Path]
|
378
|
-
/plugins/store/target.rb
|
379
|
-
|
380
|
-
[Input]
|
381
|
-
An array of links.
|
382
|
-
|
383
|
-
[Output]
|
384
|
-
An array of links.
|
385
|
-
|
386
|
-
[Description]
|
387
|
-
Store target locally by a link in HTML.
|
388
|
-
This emulate "Right click to save".
|
389
|
-
|
390
|
-
[Syntax]
|
391
|
-
- module: StoreTarget
|
392
|
-
config:
|
393
|
-
path: SAVE_TO_PATH
|
394
|
-
interval: INTERVAL_FOR_DOWNLOAD (in seconds.)
|