Giter Site home page Giter Site logo

scanadf2docspell's Introduction

scanadf2docspell

This script scans from the ADF (Automatic Document Feeder), preprocesses it and uploads it to Docspell.

Codacy Badge Quality Gate Status CodeFactor MegaLinter

Overview

Prerequisites

  • A running Docspell instance.

  • Any Linux distro (tested on Ubuntu 20.04)

  • Install system requirements (apt command on Ubuntu:)

    sudo apt install sane python3 python3-pip libmagickwand-dev img2pdf sane-utils
  • See if scanimage is able to find your scanner

    scanimage -L
    • if scanner is not found -> check sane-find-scanner
      • Maybe also as sudo to see if it's an privileges problem
      • If yes try sudo adduser <username> lp and logout/login and restart scanner

Install

  • Clone the repository

    git clone https://github.com/eresturo/scanadf2docspell
  • Install requirements

    cd scanadf2docpsell
    pip3 install -r requirements.txt
  • Generate a API-Key, as described here

  • create a config file custom.conf

    api_key: 'YOUR_API_KEY'
    docspell_url: 'http://YOUR_DOCSPELL_URL'

Scanner specific adjustments

Unfortunately, scanimage arguments are partially dependent on the scanner. Therefore, a customized configuration per scanner may be necessary. For this purpose, you can specify with which command a flatbed, with which a single-page adf scan and with which a duplex adf scan can be triggered.

tested Scanners Config (custom.conf)
Epson XP 860 (default) command_flatbed: '--source Flatbed'
command_adf: '--source "Automatic Document Feeder" --adf-mode Simplex'
command_duplex_adf: '--source "Automatic Document Feeder" --adf-mode Duplex'
HP 5590 command_flatbed: '--source Flatbed'
command_adf: '--source ADF'
command_duplex_adf: '--source "ADF Duplex"'

Note: This list is far from complete. Which scanner do you use and which configuration is needed? Please tell us in an issue or pull request.

Scan

  • insert a document in your scanner and run

    ./scan.py
  • See help for further options.

    ./scan.py --help

Contribution

Suggestions, feature requests, ideas to improve the script? Feel free to open an issue or send a pull request :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.