added mkconfig
This commit is contained in:
parent
5511a355d4
commit
d31f591f52
@ -8,3 +8,5 @@
|
|||||||
|
|
||||||
## 2.0.1 - [16/05/2022]
|
## 2.0.1 - [16/05/2022]
|
||||||
- ➕ - Added colors to output
|
- ➕ - Added colors to output
|
||||||
|
- ➕ - Added help
|
||||||
|
- ➕ - Added `--mkconfig` param to make new config file
|
||||||
|
@ -14,6 +14,19 @@ begin
|
|||||||
|
|
||||||
exit(0)
|
exit(0)
|
||||||
end
|
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
|
parser.on "-h", "--help", "Show help" do
|
||||||
puts parser
|
puts parser
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user