21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
# File 'lib/duracloud/command_options.rb', line 21
def parser
OptionParser.new do |opts|
opts.banner = CLI::USAGE
opts.on("-h", "--help",
"Prints help") do
print_version
puts opts
exit
end
opts.on("-H", "--host HOST",
"DuraCloud host") do |v|
self.host = v
end
opts.on("-P", "--port PORT",
"DuraCloud port") do |v|
self.port = v
end
opts.on("-u", "--user USER",
"DuraCloud user") do |v|
self.user = v
end
opts.on("-p", "--password PASSWORD",
"DuraCloud password") do |v|
self.password = v
end
opts.on("-l", "--[no-]logging",
"Enable/disable logging to STDERR") do |v|
self.logging = v
end
opts.on("-s", "--space-id SPACE_ID",
"DuraCloud space ID") do |v|
self.space_id = v
end
opts.on("-i", "--store-id STORE_ID",
"DuraCloud store ID") do |v|
self.store_id = v
end
opts.on("-c", "--content-id CONTENT_ID",
"DuraCloud content ID") do |v|
self.content_id = v
end
opts.on("-m", "--md5 MD5",
"MD5 digest of content to store or retrieve") do |v|
self.md5 = v
end
opts.on("-b", "--bagit",
"Get manifest in BAGIT format (default is TSV)") do
self.format = Manifest::BAGIT_FORMAT
end
opts.on("-d", "--content-dir DIR",
"Local content directory") do |v|
self.content_dir = v
end
opts.on("-f", "--infile FILE",
"Input file") do |v|
self.infile = v
end
opts.on("-v", "--version",
"Print version and exit") do |v|
print_version
exit
end
opts.on("-w", "--work-dir DIR",
"Working directory") do |v|
self.work_dir = v
end
opts.on("-F", "--[no-]fast-audit",
"Use fast audit for sync validation") do |v|
self.fast = v
end
opts.on("-a", "--prefix PREFIX",
"Content prefix") do |v|
self.prefix = v
end
opts.on("-M", "--[no-]missing", "Find missing items") do |v|
self.missing = v
end
opts.on("--[no-]all-spaces", "Get report for all spaces") do |v|
self.all_spaces = v
end
opts.on("-t", "--content-type CONTENT_TYPE",
"Media type of content to store") do |v|
self.content_type = v
end
end
end
|