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

Suggestion: Recipe Scan2Cloud with RClone #363

Closed
Procuria opened this issue Sep 29, 2021 · 0 comments
Closed

Suggestion: Recipe Scan2Cloud with RClone #363

Procuria opened this issue Sep 29, 2021 · 0 comments
Assignees
Milestone

Comments

@Procuria
Copy link

Recipe for Scan2Cloud

This recipe covers all major cloud providers like Amazon, Dropbox, Google (Drive/Photos), Microsoft (Azure Blob Storage, OneDrive), Nextcloud (via WebDav), a network share of your choice (S/FTP) and many more by using Rclone.

  1. Install Rclone as described here
  2. Configure your Cloud Provider or Remote accordingly,
    for example Nextcloud via Webdav or Google Drive
  3. set up your pipeline
    in this example an OCR'd PDF using OCRmyPDF based on this recipe
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:-',
          `file="scan_$(date +"%d_%m_%Y-%H_%M_Uhr").pdf" && ocrmypdf -l ${config.ocrLanguage} --deskew --rotate-pages --force-ocr - "$file" && rclone copy "$file" Your_Configured_Provider_or_Remote:/path/to/folder`,
          'ls scan_*.*'
        ];
      }
    });
   },

The Scan2Cloud-line is:
file="scan_$(date +"%d_%m_%Y-%H_%M_Uhr").pdf" && ocrmypdf -l ${config.ocrLanguage} --deskew --rotate-pages --force-ocr - "$file" && rclone copy "$file" Your_Configured_Provider_or_Remote:/path/to/folder

We set a time-based filename, OCR the scan and send it via rclone copy to Your_Configured_Provider_or_Remote:/path/to/folder

You can even scan directly to your configured provider/remote by using rclone mount and redirecting your standard output using this recipe.

Thanks a ton again for this awesome project @sbs20 !

@sbs20 sbs20 self-assigned this Oct 31, 2021
@sbs20 sbs20 added this to the v2.18.1 milestone Oct 31, 2021
sbs20 added a commit that referenced this issue Oct 31, 2021
@sbs20 sbs20 closed this as completed Oct 31, 2021
NyCodeGHG pushed a commit to NyCodeGHG/scanservjs that referenced this issue Nov 4, 2021
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

No branches or pull requests

2 participants