Giter VIP home page Giter VIP logo

scanservjs's Introduction

scanservjs

scanservjs is a simple web-based UI for your scanner. It allows you to share one or more scanners (using SANE) on a network without the need for drivers or complicated installation. It can save to TIF, JPG, PNG, PDF and TXT (with Tesseract OCR) with varying compression settings, all of which can configured. It supports multipage scanning and all SANE compatible devices.

screenshot

Copyright 2016-2020 Sam Strachan

Requirements

  • SANE
  • ImageMagick
  • Tesseract (optional)
  • nodejs

Installation notes

For an easy docker-based install (assuming that SANE supports your scanner out-of-the-box on Debian) use the following commands. Please note that by default, configuration and scanned images are stored within the container and will be lost if you recreate it. If you want to map your scanned images then specify the volume mapping option -v /local/path/:/app/data/output/

Please note that the docker image is amd64 only - and will not work on ARM devices such as the Raspberry Pi. Please follow the manual installation process in these cases

docker pull sbs20/scanservjs:latest
docker rm --force scanservjs-container 2> /dev/null
docker run -d -p 8080:8080 -v /var/run/dbus:/var/run/dbus --restart unless-stopped --name scanservjs-container --privileged sbs20/scanservjs:latest

(--privileged is required for the container to access the host's devices, to allow it to talk to the scanner)

scanservjs will now be accessible from http://$host:8080/

If you want to install the latest staging branch (this may contain newer code)

docker pull sbs20/scanservjs:staging
docker rm --force scanservjs-container 2> /dev/null
docker run -d -p 8080:8080 -v /var/run/dbus:/var/run/dbus --restart unless-stopped --name scanservjs-container --privileged sbs20/scanservjs:staging

More installation options:

Environment variables

  • SANED_NET_HOSTS: If you want to use a SaneOverNetwork scanner then to perform the equivalent of adding hosts to /etc/sane.d/net.conf specify a list of ip addresses separated by semicolons in the SANED_NET_HOSTS environment variable.
  • AIRSCAN_DEVICES: If you want to specifically add sane-airscan devices to your /etc/sane.d/airscan.conf then use the AIRSCAN_DEVICES environment variable (semicolon delimited).
  • DEVICES: Force add devices use DEVICES (semicolon delimited)
  • SCANIMAGE_LIST_IGNORE: To force ignore scanimage -L

Airscan

sane-airscan uses Avahi / Zeroconf / Bonjour to discover devices on the local network. If you are running docker you will want to share dbus to make it work (-v /var/run/dbus:/var/run/dbus).

Example docker run

Use airscan and a locally detected scanner

This should support most use cases

docker run -d -p 8080:8080 \
  -v /var/run/dbus:/var/run/dbus \
  --name scanservjs-container --privileged scanservjs-image

Complicated

Add two net hosts to sane, use airscan to connect to two remote scanners, don't use scanimage -L, force a list of devices and override the OCR language

docker run -d -p 8080:8080 \
  -e SANED_HOSTS="10.0.100.30;10.0.100.31" \
  -e AIRSCAN_DEVICES='"Canon MFD" = "http://192.168.0.10/eSCL";"EPSON MFD" = "http://192.168.0.11/eSCL"' \
  -e SCANIMAGE_LIST_IGNORE=true \
  -e DEVICES="net:10.0.100.30:plustek:libusb:001:003;net:10.0.100.31:plustek:libusb:001:003;airscan:e0:Canon TR8500 series;airscan:e1:EPSON Cool Series" \
  -e OCR_LANG="fra" \
  -v /var/run/dbus:/var/run/dbus \
  --name scanservjs-container --privileged scanservjs-image

Why?

This is yet another scanimage-web-front-end. Why? It originally started as an adaptation of phpsane - just to make everything a bit newer, give it a refresh and make it work on minimal installations without imagemagick - that version is still available but is no longer maintained. Then, I just wanted to write it in node and enhance it a bit, and it's been a labour of love ever since.

Acknowledgements

  • This project owes a lot to phpsane

More about SANE

scanservjs's People

Contributors

sbs20 avatar telyn avatar jncrmx avatar dependabot[bot] avatar lighterowl avatar tgrundle avatar fmartinou avatar lul4n avatar mathieuruellanmyscript avatar tuxburner 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.