MiniGlome / Archive.org-Downloader

Python3 script to download archive.org books in PDF format
896 stars 118 forks source link

skip download if output exists #12

Closed milahu closed 3 years ago

milahu commented 3 years ago

different books may have the same title

how does that make sense? on path collision, why overwrite old files?

we could use the unique archive id

MiniGlome commented 3 years ago

Files are not overwritten, see in make_pdf:

i = 1
while os.path.isfile(file):
    file = f"{title}({i}).pdf"
    i += 1

The output file is then title_(1).pdf for instance

milahu commented 3 years ago

mkay. maybe the archive id would be more useful than 0 1 2 3 .... ?

but with --jpg the images are overwritten