Giter VIP home page Giter VIP logo

brother-scan-paperless's Introduction

brother-scan-paperless

Some quick modifications to the brother-scan docker to suit my needs to scan from my Brother printer directly to the Consume dir for Paperless. I had to change a few things

  • It needed to set proper uid:gid. Hacky but they must be specified in brother-scan.yaml now
  • The temp files needed to be processed somewhere other than the consume dir, so paperless didn't try to pick them up
  • Multipage scans were being assembled in a random order but the filenames are sequential, so forced a sort

Follows the old instructions below to get going for the most part. Copy the sample files, adjust to needs, add Brother's brscan4 deb, run the python3 setup.py build sdist and fire off the docker-compose file


brother-scan

This tool is alternative to the brscan-skey with automatic document feeder support and compressed PDF output.

Using Docker

The easiest way to use brscand is to build a Docker image with the Dockerfile provided here.

Requirements

Build image

Make sure you have downloaded the brscan4 deb file and placed it in the top-level directory of the repository next to the Dockerfile.

Adapt BRSCAN_DEB if the version has changed.

python3 setup.py build sdist
docker build -t brscan --build-arg BRSCAN_DEB="brscan4-0.4.9-1.amd64.deb" .

Configuration

Edit brother-scan.yaml according to your preferences.

Run

To run brscand with the following setup:

  • MFC-L2700DW scanner.
  • Scanner at IP address 192.168.0.10.
  • Host OS at IP address 192.168.0.100.
  • Output written to $HOME/brscan
docker run --rm \
  -v $HOME/brscan:/output -v $(pwd)/brother-scan.yaml:/brother-scan.yaml \
  -e SCANNER_MODEL=MFC-L2700DW -e SCANNER_IP=192.168.0.10 \
  -e ADVERTISE_IP=192.168.0.100 -p 54925:54925/udp \
  brscan

Running on host OS

If you for some reason want to run it directly on your Linux host OS, that might also be possible. It probably need to be Ubuntu, Debian, RedHat or something like that to make it work.

Python Virtual Environment

It is recommanded to use venv (Python Virtual Environment) to install the required Python modules.

Requirements

In order for this to work, host OS must have the following installed (assuming Debian)

  • sane and sane-utils packages (scanimage and scanadf commands)
  • poppler-utils package (pdfunite command)
  • libusb-0.1-4 package (libusb-0.1.so.4 library)
  • brscan4 (brscan4-0.4.4-1.amd64.deb can be fetched from Brother)

Installation

python3 -m venv .
./bin/pip install -r requirements.txt
python3 setup.py install

Configuration

Run brsaneconfig4 to configure the scanner. Example configuring MFC-L2700DW scanner with IP address 192.168.0.100:

brsaneconfig4 -a name="Brother" model="MFC-L2700DW" ip="192.168.0.100"

Edit brother-scan.yaml according to your preferences.

Run

Now you just need to run the brscand daemon. Example running on host with IP 192.168.0.10 and scanner with IP address 192.168.0.100:

brscand 192.168.0.100 192.168.0.10

Uselinks

Tested devices

  • MFC-L2710DN

brother-scan-paperless's People

Contributors

esben avatar neomilium avatar fcauwe avatar falkwinkler avatar quadportnick avatar

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.