root/lang/ruby/picrep/picrep.rb @ 28454

Revision 5593, 435 bytes (checked in by dzfl, 5 years ago)

lang/ruby/picrep: import

Line 
1#!/usr/bin/env ruby -Ku
2
3require 'rubygems'
4require 'mechanize'
5require 'yaml'
6
7
8config = 'config.yaml'
9
10class Picrep
11        def initialize(config_file)
12                @config = YAML.load_file(config_file)
13        end
14
15        def run
16                @config['plugins'].keys.each do |x|
17                        require 'plugins/' + x.downcase
18                        Picrep.const_get(x).new(@config['plugins'][x]['id'], @config['plugins'][x]['password'], @config['image']).update_pic
19                end
20        end
21end
22
23Picrep.new(config).run
24
Note: See TracBrowser for help on using the browser.