roto 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/roto.rb +26 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9e7caf69779d061e8a14f94ba5e54352dd6ebb6c
|
4
|
+
data.tar.gz: 68a214973f4ba3b1ae6cf65c71026bfed4d79730
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4931b4f853fd6980aab7f5f1f6538211dffcbabd9eee0ba74d8f43d7e57f5560856e877f9ec80ca08fd5202108523178714b81cd2b8389170cbabb0c695c585d
|
7
|
+
data.tar.gz: fb97a81212ca3d320c2677f38f06d957c04854c005be26ba59f894ee5f8209accac84cc4ac6a0106896408a160fc8e97dcb410caa385c977111a5565249daaa4
|
data/lib/roto.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
class Roto
|
4
|
+
def intialize
|
5
|
+
end
|
6
|
+
|
7
|
+
def find_photos(path, types=[])
|
8
|
+
files = []
|
9
|
+
types.each do |type|
|
10
|
+
files << Dir.glob("#{path}/**/*.#{type}")
|
11
|
+
end
|
12
|
+
return files.flatten
|
13
|
+
end
|
14
|
+
|
15
|
+
def move_files(files, destination)
|
16
|
+
files.each do |file|
|
17
|
+
FileUtils.mv("#{file}", "#{destination}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def copy_photos(files, destination)
|
22
|
+
files.each do |file|
|
23
|
+
FileUtils.cp("#{file}", "#{destination}")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: roto
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Cottage
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-30 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A gem to find and move photos on your computer
|
14
|
+
email: andcott@Gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/roto.rb
|
20
|
+
homepage: https://github.com/andrewcottage/roto
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.4.8
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: Roto the Ruby Photo Finder!
|
44
|
+
test_files: []
|