avoid overwriting file already present on GitHub
This commit is contained in:
4
ch08.jl
4
ch08.jl
@@ -5,13 +5,13 @@
|
|||||||
# Code for section 8.1
|
# Code for section 8.1
|
||||||
|
|
||||||
import Downloads
|
import Downloads
|
||||||
if isfile("puzzles.csv.bz2")
|
if isfile("new_puzzles.csv.bz2")
|
||||||
@info "file already present"
|
@info "file already present"
|
||||||
else
|
else
|
||||||
@info "fetching file"
|
@info "fetching file"
|
||||||
Downloads.download("https://database.lichess.org/" *
|
Downloads.download("https://database.lichess.org/" *
|
||||||
"lichess_db_puzzle.csv.bz2",
|
"lichess_db_puzzle.csv.bz2",
|
||||||
"puzzles.csv.bz2")
|
"new_puzzles.csv.bz2")
|
||||||
end
|
end
|
||||||
|
|
||||||
using CodecBzip2
|
using CodecBzip2
|
||||||
|
|||||||
Reference in New Issue
Block a user