add help
This commit is contained in:
parent
99331d966b
commit
5511a355d4
@ -1,4 +1,4 @@
|
||||
# Будь __ОНЛАЙН__ в контакте.
|
||||
# Будь **ОНЛАЙН** ВКонтакте
|
||||
|
||||
## Установка
|
||||
|
||||
|
@ -1,7 +1,29 @@
|
||||
require "option_parser"
|
||||
require "json"
|
||||
require "colorize"
|
||||
require "crest"
|
||||
|
||||
# program options
|
||||
begin
|
||||
OptionParser.parse do |parser|
|
||||
parser.banner = "Make ONLINE on vk.com\n"
|
||||
|
||||
parser.on "--version", "Show version" do
|
||||
print "vk0nline ".colorize(:green).mode(:bold)
|
||||
puts "2.0.1".colorize(:yellow)
|
||||
|
||||
exit(0)
|
||||
end
|
||||
parser.on "-h", "--help", "Show help" do
|
||||
puts parser
|
||||
|
||||
exit(0)
|
||||
end
|
||||
end
|
||||
rescue ex
|
||||
puts ex.message, ""
|
||||
end
|
||||
|
||||
begin # JSON::ParseException
|
||||
json = File.open("config.json") do |file|
|
||||
JSON.parse(file)
|
||||
|
Loading…
Reference in New Issue
Block a user