eresturo / scanadf2docspell Goto Github PK
View Code? Open in Web Editor NEWA script to scan from ADF, preprocess and upload to Docspell.
License: GNU General Public License v3.0
A script to scan from ADF, preprocess and upload to Docspell.
License: GNU General Public License v3.0
Hi,
on the distro I use is not scanadf (sane-frontends package with scanadf) available. I'm also unable to get the required patch for sane.
However scanimage is still maintained, available on Arch and uses almost the same paramters as scanadf, but the ppm format isn't supported.
Supported formats are pnm|tiff|png|jpeg|pdf
.
I replaced scanadf with scanimage and added format parameter and it failed at converting to pdf.
./scan.py --device epson2:libusb:001:009 1 ✘
scan all pages using color mode: "Gray" and source: Automatic Document Feeder ...
scanimage --format=pnm -d epson2:libusb:001:009 --mode Gray --source "Automatic Document Feeder" --resolution 300 -o "scans/"9a866e34-e05e-11ec-801d-144f8a790aae"_%04d.ppm "
Preprocess all pages...: 100%|█████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.46it/s]
combine to one pdf...
Traceback (most recent call last):
File "/home/may/github/scanadf2docspell/./scan.py", line 69, in <module>
main(config=args)
File "/home/may/github/scanadf2docspell/./scan.py", line 25, in main
exporter.save_as_pdf(pages)
File "/home/may/github/scanadf2docspell/src/exporter.py", line 25, in save_as_pdf
f.write(img2pdf.convert(image_names, layout_fun=layout_fun_a4, viewer_center_window=True))
File "/usr/lib/python3.10/site-packages/img2pdf.py", line 2360, in convert
) in read_images(
File "/usr/lib/python3.10/site-packages/img2pdf.py", line 1537, in read_images
im = BytesIO(rawdata)
TypeError: a bytes-like object is required, not 'str'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.