• Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go package to scan paper documents 📄 from a scanner 🖨️ via the network 🕸️ using the Apple AirScan (eSCL) protocol.

GitHub Actions CI Go Report Card PkgGoDev

airscan 📄 🖨️ 🕸️

The airscan Go package can be used to scan paper documents 📄 from a scanner 🖨️ via the network 🕸️ using the Apple AirScan (eSCL) protocol.

Getting started: example program

First, install the example program coming with this package:

go install -v github.com/stapelberg/airscan/cmd/airscan1@latest

Then, query the local network for AirScan compatible devices:

% airscan1
2020/08/16 08:50:31 finding airscan-compatible devices for 1s
2020/08/16 08:50:31 device "Brother MFC-L2750DW series" discovered (use -host="BRW405BD8AxxDyz")

Now, I can scan the contents of the flatbed scanner:

% airscan1 -host=BRW405BD8AxxDyz
2020/08/16 08:52:44 finding device for 5s (use -timeout=0 for unlimited)
2020/08/16 08:52:45 device "Brother MFC-L2750DW series" found in 298.151935ms
2020/08/16 08:52:51 scan done in 6.738205326s

…or the page(s) inserted into the Automatic Document Feeder (ADF):

% airscan1 -host=BRW405BD8A10D7C -source=adf
2020/08/16 11:10:34 finding device for 5s (use -timeout=0 for unlimited)
2020/08/16 11:10:34 device "Brother MFC-L2750DW series" found in 112.127399ms
2020/08/16 11:10:45 wrote /tmp/page12.jpg (211305 bytes)
2020/08/16 11:10:47 wrote /tmp/page13.jpg (139335 bytes)
2020/08/16 11:10:47 scan done in 13.068799513s

…or the page(s) from ADF, colored, and as single PDF file output:

% airscan1 -host=HPFXXXXXXXXXXXX -source adf -color RGB24 -format "application/pdf"
2021/04/04 00:12:13 finding device for 5s (use -timeout=0 for unlimited)
2021/04/04 00:12:14 device "HP OfficeJet Pro 9010 series" found in 315.486148ms
2021/04/04 00:14:07 wrote /tmp/page5.pdf (123456 bytes)
2021/04/04 00:14:07 scan done in 1m53.772520178s

Getting started: using the package in your program

See the package airscan examples in godoc for how to use the package to scan.

See airscan1.go for a full example scan program, including network service discovery, timeouts, and writing scan data to files.

Project status

The package does what I needed: grayscale/color scan of A4 documents from the flat bed or the automatic document feeder (ADF).

If you have any improvements, I’d be happy to review a pull request. Please see the contribution guidelines.

Tested devices

If you successfully scanned documents from your device using the airscan1 example program as described above, please send a pull request to include your report in this table for the benefit of other interested users:

Device Name Working features Known issues
Brother MFC-L2710DN flat bed scan, automatic document feeder scan must be run with -duplex=false
Brother MFC-L2750DW flat bed scan, automatic document feeder scan
Canon G3560 flat bed scan, color: RGB24
Epson XP-7100 flat bed scan, automatic document feeder scan must be run with -duplex=false for flat bed scanning; also needs -skip_cert_verify
HP Laserjet M479fdw flat bed scan, automatic document feeder scan
HP OfficeJet Pro 9010 series flat bed scan, automatic document feeder scan, color: RGB24

More Repositories

1

coronaqr

Go decoder and verifier for EU Digital COVID Certificate (EUDCC) QR code data
Go
169
star
2

scan2drive

scan paper documents 📄 from a scanner 🖨️ as PDFs to Google Drive for full-text search
C
151
star
3

expanderr

expands the Go Call Expression under your cursor to check errors
Go
145
star
4

costream

a co-programming / pair-programming twitch stream setup using H264/OPUS RTP (like WebRTC does)
Go
87
star
5

rsyncprom

rsync wrapper (or output parser) that pushes metrics to prometheus
Go
60
star
6

qrbill

QR-bill implementation (Swiss 🇨🇭 payment standard for wire transfers)
Go
53
star
7

android-davsync

Tool to (automatically) share pictures to a WebDAV server
Java
48
star
8

zkj-nas-tools

NAS (Network Attached Storage) related tools
Go
43
star
9

configfiles

My own personal collection of configfiles. ⚠ Copy bits and pieces at your own risk. ⚠ Might be broken or break your computer. You have been warned :)
Emacs Lisp
35
star
10

wsmgr-for-i3

workspace manager for i3
Go
31
star
11

hmgo

minimal HomeMatic CCU (central control unit) re-implementation in Go
Go
27
star
12

goturbopfor

Teaching implementation of the TurboPFor integer compression algorithm
Go
22
star
13

regelwerk

regelwerk: a collection of behaviors (rules) for my MQTT-driven smart home. Published as an example, not as an active project.
Go
18
star
14

hugo

sources of michael.stapelberg.ch (using the hugo static website generator)
HTML
13
star
15

workspace-populate-for-i3

restores a 50/50 split layout and starts 2 urxvt terminals when a new workspace is created
Go
13
star
16

godebiancontrol

Golang debian control file parser
Go
13
star
17

gibot

Simple IRC bot that helps software projects
Go
12
star
18

hue2mqtt

bridge for Philips Hue to MQTT, written in Go
Go
11
star
19

rsyncparse

rsync output parser
Go
9
star
20

shelly2mqtt

HTTP-to-MQTT adapter for my Shelly-connected door sensors
Go
6
star
21

fitbit-backup

Simple Go program to download your weight data from fitbit
Go
5
star
22

pw-to-yubi

personalizes your yubikey with a static password
Perl
5
star
23

next-chrome-for-i3

next-chrome-for-i3 focuses the chrome window on the current workspace or starts a new chrome instance
Go
5
star
24

stapelberg.github.io

My personal web site (rendered HTML version) — please report issues in github.com/stapelberg/hugo instead, where the sources are
HTML
4
star
25

intercom-backpack

Software/Artifacts of my intercom MQTT backpack project
C++
4
star
26

percentage-for-i3

resizes the current window to use the specified percentage of its parent container
Go
4
star
27

prozesskommunikation

C
4
star
28

xcb-proto

fork of http://cgit.freedesktop.org/xcb/proto/ for documentation
Python
4
star
29

debian-ensure-basics

script to install essential software and configs on fresh Debian systems
Shell
4
star
30

xcb-man-pregenerated

pregenerated xcb manpages for easier reviewing
4
star
31

kinesis-repl

Kinesis Advantage Contoured replacement keyboard controller (succeeded by the kinT keyboard controller: https://github.com/kinx-project/kint)
3
star
32

vsy-bullshit

Bullshit-Bingo für die Vorlesung VSY
C++
3
star
33

kinectboard

An awesome kinect board.
C++
3
star
34

nuki2mqtt

Go program that receives Nuki Bridge webhooks and publishes contents to MQTT
Go
3
star
35

loggedexec

Go
3
star
36

defaultsink2mqtt

publish pulseaudio default sink on MQTT
Go
3
star
37

pretix-datatrans

Ein Plugin für die Shop-Software «pretix» um Zahlungen via datatrans zu ermöglichen
Python
2
star
38

mystrom2mqtt

HTTP-to-MQTT adapter for myStrom power switch
Go
2
star
39

kry-uebung3

Perl
1
star
40

travis-exp

Shell
1
star
41

cpan-install

"How to install a Perl module from CPAN?"
1
star
42

kry-uebung1

C++
1
star
43

godoc-exported

Go
1
star
44

xapian-ruby

Xapian 1.0.18 Bindings for Ruby (1.8-1.9.1 supported)
Ruby
1
star
45

mscompress

compress data using LZ77 algorithm
C
1
star
46

X11-XCB

Perl-Bindings for libxcb
Perl
1
star
47

greetbot

IRC bot which says hello
Go
1
star
48

sit-aufgabe2

Perl
1
star
49

kry-uebung4

KRY Übung 4
Perl
1
star
50

xen-lvm-snapshot

Scripts to make backups of snapshots of LVMs easy
Shell
1
star