Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ftps #8

Merged
merged 5 commits into from
Aug 5, 2023
Merged

Add ftps #8

merged 5 commits into from
Aug 5, 2023

Conversation

cwiggs
Copy link
Contributor

@cwiggs cwiggs commented Aug 2, 2023

This PR adds the ability to actually upload the files to an ftps server using curl. I used the same method that trigger_inotify.sh uses so if the FTP env vars are empty or unset the scripts will still work.

I marked this PR as a draft because it has changes that my other PRs have and therefore should go in after those PRs.

Also, after I worked on these code changes I worked on using the ocrmypdf tool to provide ocr capabilities. ocrmypdf wasn't available in Ubuntu 16.04 so I upgraded the base image to use ubuntu 20.04. After upgrading to Ubuntu 20.04, curl ran into an issue while uploading to the ftps server (I think it was this bug), so I switched to using lftp. I have the code mostly ready for all those changes but I'll wait until the current PRs I submitted are merged before I submit them.

Also just wanted to thank you for creating this repo and making it public, it helped me get started getting my brother scanner to work better.

cwiggs added 4 commits August 1, 2023 16:19
This commit adds a new shell script called `sendtoftps.sh` that uses
curl to send a file to an ftps server.  I've also added it to all of the
scanto* shell scripts.  If you don't pass in the FTP env vars it will
simply skip the step where it uploads via curl.
@PhilippMundhenk
Copy link
Owner

PR is still in draft, but I think can be merged, I'm not missing anything, are you?

I haven't tested the FTP part (no server at hand), but since there are no breaking changes (other than inotify from #7), I think should be safe to merge.

Happy to provide everything I can open source and extremely happy to receive your PRs! The best way to discover others and combine efforts!

@cwiggs cwiggs marked this pull request as ready for review August 3, 2023 21:13
@cwiggs
Copy link
Contributor Author

cwiggs commented Aug 3, 2023

Should be ready to go now. I was able to test it with a synology server.

@PhilippMundhenk PhilippMundhenk merged commit 367e06f into PhilippMundhenk:master Aug 5, 2023
@PhilippMundhenk
Copy link
Owner

Once again thank you for triggering me on this repo again, @cwiggs! This gave me the motivation to polish this up quite a bit more! I now made this a proper docker image in the GitHub registry that can be used directly and no longer needs to be built locally. I also added quite a number of improvements (logging, timezone, uid, ...), cleanups, etc. that should make this a whole lot more stable and usable! All thanks to your trigger!

@cwiggs cwiggs deleted the add_ftps branch September 5, 2023 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants