diff --git a/README.md b/README.md index d59afaf..30844c7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Будь __ОНЛАЙН__ в контакте. +# Будь **ОНЛАЙН** ВКонтакте ## Установка diff --git a/src/vk0nline.cr b/src/vk0nline.cr index 5609a7d..bb01066 100644 --- a/src/vk0nline.cr +++ b/src/vk0nline.cr @@ -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)