create src directory when it doesn't already exist.

This commit is contained in:
0x1eef 2022-07-17 17:03:54 -03:00
parent 1f4e3e71e1
commit f211596f99

View file

@ -21,6 +21,7 @@ require "net/http"
require "nokogiri" require "nokogiri"
require "json" require "json"
require "paint" require "paint"
require "fileutils"
require_relative "../../../binlib/io/line" require_relative "../../../binlib/io/line"
## ##
@ -73,6 +74,7 @@ end
end end
sleep(delay) sleep(delay)
end end
FileUtils.mkdir_p(File.dirname(dest))
File.binwrite(format(dest, chapter:), JSON.pretty_generate(rows)) File.binwrite(format(dest, chapter:), JSON.pretty_generate(rows))
line.end.print(Paint["Done.", :bold]) line.end.print(Paint["Done.", :bold])
.end.end .end.end