niqdev / packtpub-crawler

Download your daily free Packt Publishing eBook https://www.packtpub.com/packt/offers/free-learning
MIT License
755 stars 178 forks source link

Support for uploading to Nextcloud #60

Open timbru31 opened 7 years ago

timbru31 commented 7 years ago

It would be very nice to have an automatic upload to Nextcloud (/ownCloud) instances.


Disclaimer, I might take this issue and work on a PR - depending on the amount of spare time.

juzim commented 7 years ago

Why don't you just download the files directly into the owncloud folder? If you are running the script on the same machine, we could also add a hook to make owncloud scan the folder after the download, so you don't need to install the client (hooks would be a nice feature anyways).

I know that there are issues with symlinked folders and owncloud, also headless client configuration might be complicated. But I think this is way out of scope since the current script works perfectly fine with an owncloud client. Are there any further advantages in handling uploads via api that I have missed?

timbru31 commented 7 years ago

Well my plan is to run the script on a server, so there is no ownCloud/Nextcloud client installed I could symlink/download files to. That's why I thought uploading via the API (via e.g. app passwords)

niqdev commented 7 years ago

Hi, I haven't try it but this is the official client. The example looks pretty straightforward