media_archiver 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/media_archiver/cli.rb +0 -15
- data/lib/media_archiver/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bf98fe1a230a8739e15d6ce7e0e6ba85c26dc4e
|
4
|
+
data.tar.gz: bc59949f9ffd0c88dd9a08825dd2afe3cac40454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ed3b3659ea11f12738acd1c2801976ecc0ac882b92db292467a05adacb2f886de3886fe519a6671e3338e8415df5c6296ae7240accc4eab64384e6b5aa9df13
|
7
|
+
data.tar.gz: d70c26ba63bc1f9a1239d604766c1bea4da6637705ae59395a89a28e22b4c4cbe4859736c7e3623900d33e9217ca06678a278563a60ac4f78342ba2f4bcbbaff
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/media_archiver.svg)](http://badge.fury.io/rb/media_archiver)
|
2
|
+
|
1
3
|
# MediaArchiver
|
2
4
|
|
3
|
-
|
5
|
+
Utility that scans a given location for media files and,
|
6
|
+
based on Exif information and a set of rules copies the files over to
|
7
|
+
another location.
|
8
|
+
|
4
9
|
|
5
10
|
## Installation
|
6
11
|
|
@@ -20,7 +25,14 @@ Or install it yourself as:
|
|
20
25
|
|
21
26
|
## Usage
|
22
27
|
|
23
|
-
|
28
|
+
run `media_archiver` from the command line
|
29
|
+
|
30
|
+
```
|
31
|
+
Commands:
|
32
|
+
media_archiver copy [DIR] [OUTPUT_DIR] # Scans a folder and archives media files
|
33
|
+
media_archiver help [COMMAND] # Describe available commands or one specific command
|
34
|
+
media_archiver scan [PATH] # Scans a folder for media files and returns info
|
35
|
+
```
|
24
36
|
|
25
37
|
## Contributing
|
26
38
|
|
data/lib/media_archiver/cli.rb
CHANGED
@@ -5,21 +5,6 @@ require 'yaml'
|
|
5
5
|
|
6
6
|
module MediaArchiver
|
7
7
|
class CLI < Thor
|
8
|
-
option :output_dir, aliases: :o, default: Dir.pwd
|
9
|
-
option :recursive, aliases: :r, type: :boolean, default: true
|
10
|
-
option :output_template, default: ':date_created/:camera_maker/:camera_model'
|
11
|
-
option :configuration_file, aliases: :c
|
12
|
-
desc 'scan [PATH]', 'Scans a folder for media files and returns info'
|
13
|
-
def scan(path = Dir.pwd)
|
14
|
-
config = configurations(options)
|
15
|
-
|
16
|
-
path = File.expand_path(path)
|
17
|
-
|
18
|
-
MediaFileUtils.new(path).each(config[:recursive]) do |file|
|
19
|
-
puts output_path(file, config[:output_dir], config[:output_template])
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
8
|
desc 'copy [DIR] [OUTPUT_DIR]', 'Scans a folder and archives media files'
|
24
9
|
option :output_dir, aliases: :o
|
25
10
|
option :recursive, aliases: :r, type: :boolean, default: true
|