Browse Source

added mkconfig

master 2.0.1
Alexander Popov 5 months ago
parent
commit
d31f591f52
Signed by: Alexander Popov
GPG Key ID: 3F76816AEE08F908
  1. 2
      HISTORY.md
  2. 13
      src/vk0nline.cr

2
HISTORY.md

@ -8,3 +8,5 @@
## 2.0.1 - [16/05/2022]
- ➕ - Added colors to output
- ➕ - Added help
- ➕ - Added `--mkconfig` param to make new config file

13
src/vk0nline.cr

@ -14,6 +14,19 @@ begin
exit(0)
end
parser.on "--mkconfig", "Make new empty config" do
new_config = {appID: nil, userIds: nil, accessToken: nil}
File.open("config.json.new", "w") do |f|
f.puts new_config.to_json.to_s
end
print "Config saved to "
print "config.json.new".colorize(:yellow).mode(:bold)
puts " file."
exit(0)
end
parser.on "-h", "--help", "Show help" do
puts parser

Loading…
Cancel
Save