flickrchive 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 533ec7bd851cf9e99a2dca4e086535a963195c23
4
- data.tar.gz: d4c29dc59f9abdec1448f0d8afa140476f05def0
3
+ metadata.gz: 8128d156fec46edb9b3068c2caa63c6c457fe672
4
+ data.tar.gz: 93ffc7a706608d9f8d9c4f626af388db4677b43c
5
5
  SHA512:
6
- metadata.gz: d6ec2f1eae28204be8e86111a11ec37ac17602d3504ea15f73380760e628f8b07a14e60d386d01d16f3ce22d09da338303fa6371c004c572a0bc1e5f3a453544
7
- data.tar.gz: d42dbdc7bf0eb8195dfba1dc333c4b346850dbad350afc1b4f5088337fddf367cbc9b767346e3b695a0774aecb07a8c78be63196e61ed575141befb95b56140f
6
+ metadata.gz: 6be7836f3bc15418850f857e2b315eb5b2f94df8d8385230067aa8b7a65e27c932bae1f00557822113d6f2fdd393bca329cd952f0e89204266fbcbe6c00cbb45
7
+ data.tar.gz: bfb4215d08f89fb7bd2d3f185adc0bdbc72550b1c7d31a7574f65a461d768cc6d10972007d0e50b8aa3006030130c21a131843d76939f03e7dedfff0d3fc36f3
data/flickrchive.gemspec CHANGED
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.required_ruby_version = '>= 1.9.3'
20
20
  spec.required_rubygems_version = '>= 1.3.5'
21
21
  spec.summary = spec.description
22
- spec.version = '0.1.2'
22
+ spec.version = '0.1.3'
23
23
  end
@@ -16,5 +16,11 @@ module Flickrchive
16
16
  f = Flickrchive::Config.new(options[:config])
17
17
  f.execute
18
18
  end
19
+
20
+ desc 'status', 'get current totals, and upload count'
21
+ def status
22
+ f = Flickrchive::Config.new(options[:config])
23
+ f.status
24
+ end
19
25
  end
20
26
  end
@@ -1,5 +1,6 @@
1
1
  require 'flickrchive/prepare'
2
2
  require 'flickrchive/execute'
3
+ require 'flickrchive/status'
3
4
  require 'yaml'
4
5
  require 'daybreak'
5
6
 
@@ -7,6 +8,7 @@ module Flickrchive
7
8
  class Config
8
9
  include Flickrchive::Prepare
9
10
  include Flickrchive::Execute
11
+ include Flickrchive::Status
10
12
  attr_accessor :db_file, :directory, :log_level, :log_file, :username, :db, :sets, :excludes
11
13
 
12
14
  def initialize(config_file = nil)
@@ -0,0 +1,17 @@
1
+ module Flickrchive
2
+ module Status
3
+ def status
4
+ time = Time.now
5
+ self.db.lock do
6
+ @all_count = self.db.size
7
+ @uploaded = self.db.reject { |k,v| !v[:flickr_id] }
8
+ @uploaded_count = @uploaded.size
9
+ end
10
+ self.db.close
11
+ puts '===== Flickrchive ====='
12
+ puts 'Current Time: ' + time.inspect
13
+ puts 'Photos in DB: ' + @all_count.to_s
14
+ puts 'Uploaded photos: ' + @uploaded_count.to_s
15
+ end
16
+ end
17
+ end
data/lib/flickrchive.rb CHANGED
@@ -2,6 +2,7 @@ require 'flickraw'
2
2
  require 'flickrchive/config'
3
3
  require 'flickrchive/prepare'
4
4
  require 'flickrchive/execute'
5
+ require 'flickrchive/status'
5
6
  require 'logger'
6
7
 
7
8
  module Flickrchive
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flickrchive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Nolen
@@ -106,6 +106,7 @@ files:
106
106
  - lib/flickrchive/config.rb
107
107
  - lib/flickrchive/execute.rb
108
108
  - lib/flickrchive/prepare.rb
109
+ - lib/flickrchive/status.rb
109
110
  homepage: https://github.com/stevenolen/flickrchive
110
111
  licenses:
111
112
  - Apache