visioner 1.0.0 → 1.0.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.
- checksums.yaml +4 -4
- data/lib/visioner/version.rb +1 -1
- metadata +2 -14
- data/.gitignore +0 -9
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -21
- data/README.md +0 -42
- data/Rakefile +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/bin/visioner +0 -39
- data/visioner.gemspec +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b367a01c0f815747a944c54e731416a4b0e48ad
|
4
|
+
data.tar.gz: 591e649acfe8c922e03b84478dec01001224aa95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 984745fe5ae3fc0daff5ad31daf686f153459151923011553af1bec2cb820a376677139be77d03da489fdffb1818733fa864a04589163a64c4c03885e54f9286
|
7
|
+
data.tar.gz: fbb4b9bc9f3ebcab574146deaefba86d13fc4bb1baf61d6d2932641ccfc1e54397adf247be103464dc136237e5f6d8ac4e437912d7157a7606bb0c481211ff17
|
data/lib/visioner/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visioner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre-Jean Bergeron
|
@@ -55,24 +55,12 @@ dependencies:
|
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- pj@bergeron.io
|
58
|
-
executables:
|
59
|
-
- console
|
60
|
-
- setup
|
61
|
-
- visioner
|
58
|
+
executables: []
|
62
59
|
extensions: []
|
63
60
|
extra_rdoc_files: []
|
64
61
|
files:
|
65
|
-
- ".gitignore"
|
66
|
-
- Gemfile
|
67
|
-
- LICENSE.txt
|
68
|
-
- README.md
|
69
|
-
- Rakefile
|
70
|
-
- bin/console
|
71
|
-
- bin/setup
|
72
|
-
- bin/visioner
|
73
62
|
- lib/visioner.rb
|
74
63
|
- lib/visioner/version.rb
|
75
|
-
- visioner.gemspec
|
76
64
|
homepage: https://github.com/berpj/visioner
|
77
65
|
licenses:
|
78
66
|
- MIT
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2016 Pierre-Jean Bergeron
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# Visioner
|
2
|
-
|
3
|
-
Automatically rename your pictures using Google Vision API and metadata.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
$ bundle install
|
8
|
-
$ rake install
|
9
|
-
|
10
|
-
## Usage
|
11
|
-
|
12
|
-
$ export GOOGLE_VISION_API_KEY=...
|
13
|
-
$ bin/visioner [options] image ...
|
14
|
-
|
15
|
-
**Options:**
|
16
|
-
|
17
|
-
-f, --format FORMAT Desired format for the new filenames
|
18
|
-
|
19
|
-
-h, --help Displays help
|
20
|
-
|
21
|
-
Format directives:
|
22
|
-
label - uses google vision API to find a label
|
23
|
-
locality - uses metadata to find the locality / city
|
24
|
-
country - uses metadata to find the country
|
25
|
-
date - uses metadata to find the original date
|
26
|
-
Format example: date_country_label
|
27
|
-
|
28
|
-
**Examples:**
|
29
|
-
|
30
|
-
$ export GOOGLE_VISION_API_KEY=BI34SyB5DhqV5ReVnkmIM79812yux9UFazNdynD
|
31
|
-
|
32
|
-
$ bin/visioner --format label /Desktop/travel-south-korea-2016-2/*.jpg
|
33
|
-
/Desktop/travel-south-korea-2016-2/IMG_213.jpg -> sea.jpg
|
34
|
-
/Desktop/travel-south-korea-2016-2/IMG_214.jpg -> tower.jpg
|
35
|
-
/Desktop/travel-south-korea-2016-2/IMG_215.jpg -> people.jpg
|
36
|
-
/Desktop/travel-south-korea-2016-2/IMG_216.jpg -> sea2.jpg
|
37
|
-
|
38
|
-
$ bin/visioner --format country_locality_date_label /Desktop/travel-south-korea-2016-4/*.jpg
|
39
|
-
/Desktop/travel-south-korea-2016-4/IMG_213.jpg -> south-korea_seoul_02-28-2015_sea.jpg
|
40
|
-
/Desktop/travel-south-korea-2016-4/IMG_214.jpg -> south-korea_seoul_03-15-2015_tower.jpg
|
41
|
-
/Desktop/travel-south-korea-2016-4/IMG_215.jpg -> south-korea_seoul_03-28-2015_people.jpg
|
42
|
-
/Desktop/travel-south-korea-2016-4/IMG_216.jpg -> south-korea_seoul_04-02-2015_sea2.jpg
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "visioner"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/bin/visioner
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'visioner'
|
4
|
-
require 'optparse'
|
5
|
-
|
6
|
-
options = {}
|
7
|
-
opts = OptionParser.new
|
8
|
-
|
9
|
-
opts.banner = "Visioner automatically renames your pictures using Google API Visioner and metadata.\n"
|
10
|
-
opts.banner = opts.banner + "Make sure you have set GOOGLE_API_KEY in your env.\n"
|
11
|
-
opts.banner = opts.banner + "Usage: visioner [options] image ..."
|
12
|
-
|
13
|
-
opts.on("-f", "--format FORMAT", "Desired format for the new filenames") do |f|
|
14
|
-
options[:format] = f
|
15
|
-
end
|
16
|
-
|
17
|
-
opts.on("-h", "--help", "Displays help") do
|
18
|
-
puts opts
|
19
|
-
exit
|
20
|
-
end
|
21
|
-
|
22
|
-
opts.parse!
|
23
|
-
|
24
|
-
if options[:format].nil?
|
25
|
-
puts "Missing option: format"
|
26
|
-
puts "Format directives:"
|
27
|
-
puts " label - uses google vision API to find a label"
|
28
|
-
puts " locality - uses metadata to find the locality / city"
|
29
|
-
puts " country - uses metadata to find the country"
|
30
|
-
puts " date - uses metadata to find the original date"
|
31
|
-
puts "Format example: date_country_label"
|
32
|
-
puts opts
|
33
|
-
exit 1
|
34
|
-
elsif ARGV.empty?
|
35
|
-
puts opts
|
36
|
-
exit 1
|
37
|
-
else
|
38
|
-
Visioner.rename_all(ARGV, options)
|
39
|
-
end
|
data/visioner.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'visioner/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "visioner"
|
8
|
-
spec.version = Visioner::VERSION
|
9
|
-
spec.authors = ["Pierre-Jean Bergeron"]
|
10
|
-
spec.email = ["pj@bergeron.io"]
|
11
|
-
|
12
|
-
spec.summary = %q{Automatically rename your pictures using Google Vision API and metadata.}
|
13
|
-
spec.homepage = "https://github.com/berpj/visioner"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.bindir = "bin"
|
18
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.11"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "exifr", "~> 1.2"
|
24
|
-
end
|