File tree Expand file tree Collapse file tree 11 files changed +24
-21
lines changed
spec/plugins/subscription Expand file tree Collapse file tree 11 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 22# Name:: Automatic::FeedParser
33# Author:: 774 <http://id774.net>
44# Created:: Feb 19, 2012
5- # Updated:: Dec 20, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
@@ -15,7 +15,7 @@ module FeedParser
1515 def self . get ( url )
1616 begin
1717 unless url . nil?
18- Automatic ::Log . puts ( "info" , "Getting : #{ url } " )
18+ Automatic ::Log . puts ( "info" , "Parsing : #{ url } " )
1919 feed = URI . parse ( url ) . normalize
2020 open ( feed ) { |http |
2121 response = http . read
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def run
7575 feeds . items . each { |feed |
7676 Automatic ::Log . puts ( "info" , %Q(Ikachan: [#{ feed . link } ] sending with params #{ ikachan . params . to_s } ...) )
7777 ikachan . post ( feed . link , feed . title )
78- sleep @config [ 'interval' ] . to_i
78+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval' ] . nil?
7979 }
8080 end
8181 }
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Publish::Googlecalendar
33# Author:: 774 <http://id774.net>
44# Created:: Feb 24, 2012
5- # Updated:: Feb 24, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
@@ -74,7 +74,7 @@ def run
7474 unless feeds . nil?
7575 feeds . items . each { |feed |
7676 @gc . add ( '今日 ' + feed . title )
77- sleep @config [ 'interval' ] . to_i
77+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval' ] . nil?
7878 }
7979 end
8080 }
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Publish::HatenaBookmark
33# Author:: 774 <http://id774.net>
44# Created:: Feb 22, 2012
5- # Updated:: Mar 12, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
@@ -89,7 +89,7 @@ def run
8989 feeds . items . each { |feed |
9090 Automatic ::Log . puts ( "info" , "Bookmarking: #{ feed . link } " )
9191 hb . post ( feed . link , nil )
92- sleep @config [ 'interval' ] . to_i
92+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval' ] . nil?
9393 }
9494 end
9595 }
Original file line number Diff line number Diff line change 33# Name:: Automatic::Plugin::Store::TargetLink
44# Author:: 774 <http://id774.net>
55# Created:: Feb 28, 2012
6- # Updated:: Mar 1, 2012
6+ # Updated:: Jan 8, 2013
77# Copyright:: 774 Copyright (c) 2012
88# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
99
@@ -34,7 +34,7 @@ def run
3434 Automatic ::Log . puts ( "info" , "Downloading: #{ feed . link } " )
3535 begin
3636 wget ( feed . link )
37- sleep @config [ 'interval' ] . to_i unless @config [ 'internal ' ] . nil?
37+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval ' ] . nil?
3838 rescue
3939 Automatic ::Log . puts ( "error" , "Error found during file download." )
4040 end
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Subscription::Link
33# Author:: 774 <http://id774.net>
44# Created:: Sep 18, 2012
5- # Updated:: Dec 20, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
@@ -22,7 +22,7 @@ def create_rss(url)
2222 html = open ( url ) . read
2323 unless html . nil?
2424 rss = Automatic ::FeedParser . parse ( html )
25- sleep @config [ 'interval' ] . to_i unless @config [ 'internal ' ] . nil?
25+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval ' ] . nil?
2626 @return_feeds << rss
2727 end
2828 end
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Subscription::Tumblr
33# Author:: 774 <http://id774.net>
44# Created:: Oct 16, 2012
5- # Updated:: Dec 20, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
@@ -20,7 +20,7 @@ def create_rss(url)
2020 html = open ( url ) . read
2121 unless html . nil?
2222 rss = Automatic ::FeedParser . parse ( html )
23- sleep @config [ 'interval' ] . to_i unless @config [ 'internal ' ] . nil?
23+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval ' ] . nil?
2424 @return_feeds << rss
2525 end
2626 end
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Subscription::Twitter
33# Author:: 774 <http://id774.net>
44# Created:: Sep 9, 2012
5- # Updated:: Oct 18, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
@@ -42,7 +42,7 @@ def create_rss(url)
4242 item . description = content . search ( '[@class="js-tweet-text"]' ) . text . to_s
4343 }
4444 }
45- sleep @config [ 'interval' ] . to_i unless @config [ 'internal ' ] . nil?
45+ sleep @config [ 'interval' ] . to_i unless @config [ 'interval ' ] . nil?
4646 @return_feeds << rss
4747 end
4848 end
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Subscription::Link
33# Author:: 774 <http://id774.net>
44# Created:: Sep 18, 2012
5- # Updated:: Sep 18, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
3434 subject {
3535 Automatic ::Plugin ::SubscriptionLink . new (
3636 { 'urls' => [
37- "http://id774.net" ]
37+ "http://id774.net" ] ,
38+ 'interval' => 5
3839 }
3940 )
4041 }
Original file line number Diff line number Diff line change 22# Name:: Automatic::Plugin::Subscription::Tumblr
33# Author:: 774 <http://id774.net>
44# Created:: Oct 16, 2012
5- # Updated:: Dec 20, 2012
5+ # Updated:: Jan 8, 2013
66# Copyright:: 774 Copyright (c) 2012
77# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88
4747 Automatic ::Plugin ::SubscriptionTumblr . new (
4848 { 'urls' => [
4949 "http://reblog.id774.net" ] ,
50- 'pages' => 3
50+ 'pages' => 3 ,
51+ 'interval' => 5
5152 }
5253 )
5354 }
You can’t perform that action at this time.
0 commit comments