create src directory when it doesn't already exist.
This commit is contained in:
parent
1f4e3e71e1
commit
f211596f99
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue