Skip to content

Commit

Permalink
issue3 Plugin Publish::Console added
Browse files Browse the repository at this point in the history
  • Loading branch information
id774 committed Feb 23, 2012
1 parent 9e09697 commit 9aa92b9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
29 changes: 29 additions & 0 deletions plugins/publish/console.rb
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::Console
# Author:: 774 <http://id774.net>
# Created:: Feb 23, 2012
# Updated:: Feb 23, 2012
# Copyright:: 774 Copyright (c) 2012
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.

class PublishConsole
require 'pp'
attr_accessor :hb

def initialize(config, pipeline=[])
@config = config
@pipeline = pipeline
end

def run
@pipeline.each {|feeds|
unless feeds.nil?
feeds.items.each {|feed|
pp feed
}
end
}
@pipeline
end
end
15 changes: 15 additions & 0 deletions test/integration/feed2console.yml
@@ -0,0 +1,15 @@
global:
timezone: Asia/Tokyo
cache:
base: /tmp
log:
level: info

plugins:
- module: SubscriptionFeed
config:
feeds:
- http://id774.net/blog/feed/

- module: PublishConsole

0 comments on commit 9aa92b9

Please sign in to comment.