Its a hacked together shell script. I wanted to learn shell scripting, but I should've probably programmed it in python.
But it basically does this:
- scan pages as png via scanimage in gray scale
- convert the image into a high contrast b/w one with image magick
- sort pages if I have to combine two scans (front and back side)
- create a single pdf of all the document pages via image magick
- move pdf to the paperless folder
I won't share it because it's really ugly and some of the functionality can be done with paperless native, like combining the pages of two scans. Which would've been easier.