make_dirs_from_list 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/make_dirs_from_list +1 -1
- data/lib/make_dirs_from_list/version.rb +1 -1
- data/lib/make_dirs_from_list.rb +4 -2
- 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: bfd384e1a8819380685bdd3af212bc502a13540b
|
4
|
+
data.tar.gz: 57b60c9cabed39a85f0456574a624e545c3a6f0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87a33051d23ace04eeb7c0150c3ebaaed29f27f3b2b2718600fb5c5ee0a319f3fc7c99bf1b04d47cc45ea8b6eb55e7d123cfa3bdb1a4506bcbe6fc0e176da4bc
|
7
|
+
data.tar.gz: 5e67436275fcb19fa193c4ae5c7e7ff3f357de455ed111e1ee78a2698c2f62b3a4716627e79b5361bbf154c29c012548e43bd4e10c5a7fb63f0bd220bddb0d47
|
data/bin/make_dirs_from_list
CHANGED
data/lib/make_dirs_from_list.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require "make_dirs_from_list/version"
|
2
|
-
require "roo"
|
3
2
|
require "fileutils"
|
3
|
+
require "roo"
|
4
4
|
|
5
5
|
module MakeDirsFromList
|
6
|
+
USAGE = "Usage: make_dirs_from_list path/to/list.xlsx /target/dir \"F1-F2-or_whatever\""
|
7
|
+
|
6
8
|
def self.make!(file_name, target_dir, title_template)
|
7
9
|
columns = get_column_indices title_template
|
8
10
|
title_placeholders = get_placeholders title_template
|
@@ -21,7 +23,7 @@ module MakeDirsFromList
|
|
21
23
|
|
22
24
|
puts "Making #{dir_names.size} dirs in #{target_dir} from text in columns #{columns}."
|
23
25
|
|
24
|
-
dir_names.
|
26
|
+
dir_names.each do |dir_name|
|
25
27
|
next if File.exists? dir_name
|
26
28
|
FileUtils.mkdir dir_name
|
27
29
|
print "."
|