dir-archiver 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +14 -7
- data/lib/dir_archiver/opt_parser.rb +19 -10
- data/lib/dir_archiver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e20f03db4bdccb404829b1a47b9c0b868b6dca4a
|
4
|
+
data.tar.gz: 043a0d7b9eed2929ac99ba5f320f9d741c7dde4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d263c5cdcf67ffb8dd4eeb5d98729f28ce44f43110acdafb156842e857a29976fc6f08ed05f17fa06c477e73bb3d54cc0eb9acd27def547767a6547163fc8dbf
|
7
|
+
data.tar.gz: 02234448c622e1ed6a50a5c6fa8b74e04de9cbad73afab6abbebf11260e9214033370fea38cfe9f8414cf69afe69ffbfc52769f2a76a4de968d6179ab0eb4102
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -25,7 +25,6 @@ github_archiver
|
|
25
25
|
You should see something like
|
26
26
|
|
27
27
|
```
|
28
|
-
|
29
28
|
Usage: dir-archiver [options]
|
30
29
|
|
31
30
|
Specific options:
|
@@ -34,7 +33,7 @@ Specific options:
|
|
34
33
|
-d, --depth NUMBER where NUMBER is depth of the directory from the starting directory
|
35
34
|
If not specified, 1 will be used
|
36
35
|
-s, --seperator [SEP] The seperator string to be used
|
37
|
-
If not specified, '
|
36
|
+
If not specified, '__' will be used
|
38
37
|
-o, --output-dir OUTPUT_DIR where OUTPUT_DIR is output directory
|
39
38
|
If not specified, current directory will be used
|
40
39
|
-c, --[no-]commit Commit your action
|
@@ -42,13 +41,21 @@ Specific options:
|
|
42
41
|
|
43
42
|
Common options:
|
44
43
|
-h, --help Show this message
|
45
|
-
Example Usage:
|
46
44
|
|
47
|
-
|
48
|
-
|
45
|
+
Example Usage:
|
46
|
+
|
47
|
+
a) archive all immediate directories from the given directory (default to 1 level)
|
48
|
+
|
49
|
+
$cd ~/inputs/projects
|
50
|
+
$dir-archiver --commit
|
51
|
+
|
52
|
+
b) archive all directory 2 level depth (dry-run)
|
53
|
+
|
54
|
+
$dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
|
55
|
+
|
56
|
+
c) archive all directory 2 level depth (commit action)
|
49
57
|
|
50
|
-
|
51
|
-
dir-archiver -i ~/inputs/projects -i . -d 2 -s '__' -o ~/outputs/archives
|
58
|
+
$dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
|
52
59
|
```
|
53
60
|
|
54
61
|
### Contributing
|
@@ -10,7 +10,7 @@ module DirArchiver
|
|
10
10
|
# Set the sensible default for the options explicitly
|
11
11
|
options.input_dir = "."
|
12
12
|
options.depth = 1
|
13
|
-
options.seperator = "
|
13
|
+
options.seperator = "__"
|
14
14
|
options.output_dir = "."
|
15
15
|
options.commit = false
|
16
16
|
|
@@ -36,7 +36,7 @@ module DirArchiver
|
|
36
36
|
|
37
37
|
opts.on("-s", "--seperator [SEP]",
|
38
38
|
"The seperator string to be used",
|
39
|
-
"If not specified, '
|
39
|
+
"If not specified, '__' will be used") do |sep|
|
40
40
|
options.seperator = sep
|
41
41
|
end
|
42
42
|
|
@@ -58,14 +58,23 @@ module DirArchiver
|
|
58
58
|
# No argument, shows at tail. This will print an options summary.
|
59
59
|
opts.on_tail("-h", "--help", "Show this message") do
|
60
60
|
puts opts
|
61
|
-
puts
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
61
|
+
puts <<-EOT.gsub(/^\s+\|/, "")
|
62
|
+
|
|
63
|
+
| Example Usage:
|
64
|
+
|
|
65
|
+
| a) archive all immediate directories from the given directory (default to 1 level)
|
66
|
+
|
|
67
|
+
| $cd ~/inputs/projects
|
68
|
+
| $dir-archiver --commit
|
69
|
+
|
|
70
|
+
| b) archive all directory 2 level depth (dry-run)
|
71
|
+
|
|
72
|
+
| $dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
|
73
|
+
|
|
74
|
+
| c) archive all directory 2 level depth (commit action)
|
75
|
+
|
|
76
|
+
| $dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
|
77
|
+
EOT
|
69
78
|
exit
|
70
79
|
end
|
71
80
|
end
|
data/lib/dir_archiver/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dir-archiver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burin Choomnuan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|