Open mhogomchungu opened 3 years ago
I was looking for this also.
Some background.... I have the script in a Docker container that I run from Gitlab CI. The Dockerfile installs it to /usr/bin
so it's on the path and removes the need for a user and home directory. Because there is no option to set the download directory, the Dockerfile uses sed
to modify the output location to /tmp
(otherwise it'd try writing to /usr/bin
), however it still creates Books/BookName
- I would have preferred to be able to use the current directory (because Gitlab provides this when runing the container) and I would prefer if it did not add Books/BookName
to the path. I've had to copy the files from /tmp/Books/BookName
to the current directory in my CI Job.
So, my slant on this feature request would be to allow the destination to be where the data is written (not to the root of a "library"). Perhaps both are needed to satisfy more use-cases... What about...
--output-directory
specifies the directory that the downloaded book data is written into (use .
for current directory);--library-directory
specifies the directory in which to create a book directory to download the book data into.The options would be mutually exclusive and the default behaviour if neither is given would to to work as it does now.
Also, while talking about options, a --no-create-epub
option to skip creating the epub file after downloading would be nice (I commit the downloaded files to Git and have a separate job that creates a zip with a deterministic hash - but that's a whole other story!)
Right now, destination path is hard coded to the folder where the executable is located and the option will make it possible for the executable in folder A and downloaded media to be in folder B.
The argument should be named "--destination".