Skip to content

Commit

Permalink
RClone recipe sbs20#363
Browse files Browse the repository at this point in the history
  • Loading branch information
sbs20 authored and NyCodeGHG committed Nov 4, 2021
1 parent 1e612ac commit 45b3b7f
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion docs/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 45b3b7f

Please sign in to comment.