diff --git a/docs/integration.md b/docs/integration.md index 8274f1e9..38ef5bc6 100644 --- a/docs/integration.md +++ b/docs/integration.md @@ -2,7 +2,7 @@ It's not uncommon to want to integrate scanservjs with other software - you may wish to upload scans to Dropbox, paperless-ng or some other location. The -possibilities are endless and deep integration into the UI would add cruft for +possibilities are endless but deep integration into the UI would add cruft for the vast majority of users. Thankfully, the files just end up in a location on your filesystem so you are @@ -22,6 +22,39 @@ about paperless-ng resulted in You could integrate with Dropbox using [Dropbox-Uploader](https://github.com/andreafabrizi/Dropbox-Uploader) +## Recipe for Scan2Cloud + +This recipe covers all major cloud providers such as Amazon, Dropbox, Google +(Drive/Photos), Microsoft (Azure Blob Storage, OneDrive), Nextcloud (via +WebDav), a network share of your choice (S/FTP) and many +[more](https://rclone.org/overview/) by using [Rclone](https://rclone.org/). + +1. Install [Rclone](https://rclone.org/) as described + [here](https://rclone.org/install/) +2. Configure your [Cloud Provider or Remote](https://rclone.org/overview/) + accordingly, for example [Nextcloud via Webdav](https://rclone.org/webdav/) + or [Google Drive](https://rclone.org/drive/) + +Now you have a choice. If you want the update to occur on the scan itself then +you need to integrate into the pipeline. Alternatively, sync the output +directory itself and use either inotify or cron. If you want to embed into the +pipeline then something like the following may help: + +```javascript +config.pipelines.push({ + extension: 'pdf', + description: 'PDF | Scan2Cloud ⇒ Your_Configured_Provider_or_Remote ', + get commands() { + return [ + 'convert @- -quality 92 tmp-%04d.jpg && ls tmp-*.jpg', + 'convert @- pdf:-', + `rclone copy *.pdf YOUR_PROVIDER:/path/to/folder`, + 'ls scan_*.*' + ]; + } +}); +``` + ## Scan2Mail 1. Setup and configure [msmtp](https://wiki.debian.org/msmtp) and msmtp-mta as