4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/comiv/docopt.rb', line 4
def self.docopt
doc = <<DOCOPT
Usage:
comiv init
comiv run
comiv config (--add-key KEY | --delete-key | --show-count)
comiv -h | --help
comiv -v | --version
Options:
init Create .comiv and stored directory.
run Compress image and video files in stored directory.
config Set comiv configuration.
--add-key KEY Add tinify api key.
--delete-key Delete tinify api key.
--show-count Show compresstion count this month. however, it needs to be executed once.
-h --help Show help.
-v --version Show version.
DOCOPT
begin
Docopt::docopt(doc)
rescue Docopt::Exit => e
e.message
end
end
|