Do you like comics? I am sure you do. You can find a lot of them on The Eye website, so I have been playing with a Go project, Comiccon, to download them so you can read them whenever you wish.
Comiccon is a toy project to download comics and keep them up to date. It takes advantage of goroutines to download several comics at the same time, limited by the number of CPUs you have. The CLI is built with the Go library Cobra.
Code
You can find the repository on GitHub.
Installation
go get -u github.com/mendrugory/comicconHow to use it
Help
$ comiccon helpDownload
$ comiccon downloadIf a comic has already been downloaded, it will not be downloaded again.
The command’s configuration is saved in a file called config.json.
Optional flags
- Base Folder: Directory where the comics will be downloaded. It is created if it does not exist (default: current directory).
- Extensions: Extensions of the files to download, separated by commas (default: cbr, jpg and pdf).
Link: Sub-link of the route, if you only want to download part of the collection (check the list of collections)
$ comiccon download --basefolder /tmp/comics --extensions cbr --link "DC Chronology"
Docker
To run it with Docker, the only thing we must keep in mind is mapping the volumes so the comics are kept.
$ docker run --rm -v /tmp/comics:/tmp/comics mendrugory/comiccon download --basefolder /tmp/comics --extensions cbr --link "DC Chronology"Enjoy!!