11/05/2020 at 13:16 •
Turns out, the package installer for libusb and probably the sane.d installer package as well, are outdated versions that do not run well on MacOS Catalina.
Thanks go out to Jeff Stearns for directing my attention to that.
I included these package installers out of convenience because they do not require brew to install, but I did not check the versions against the official projects. Basically these are the same installer packages I used when trying Twainsane. But as these are quite old and do not run on newer MacOS instances, my advise for installing Scanity is to use Brew to install the latest and greatest versions of libusb and sane.d and not the included package installers.
Scanity itself is completely version agnostic regarding libusb or sane.d and should run fine until Apple pulls the plug on Intel binaries or drastically alters the menubar system. That's when we'll need a Scanity 2 I imagine.
I have thought about it and decided to leave the zip with the old installer packages up for instances where people might want to use older MacOS versions and have trouble with using Brew, but for relatively new machines, use brew to install LibUSB and Sane.d and then drag the scanity app to applications.
If the options from the pulldown menu do not work, use "show package contents" and move the Scanity.app and other .app files outside the package. Calvin Walden found this problem and subsequent solution. In possible future versions, this will work better.
06/17/2020 at 11:54 •
A short demo of my setup as it stands now.
The printer used is my trusty ancient HP5N connected to a RaspberryPi 3B via a parallel-to-USB adapter. The Pi is running CUPS and Sane.d and also some hacks that power on my antique laser printer which was covered in THIS project on Hackaday.io.
The scanner is a Canon LIDE 220. A small budget unit that conveniently is powered via USB. The buttons do not work because the button-daemon interfered with the network sharing. The front-end software however does all we need it to do.
First I use the front end to scan a colour document directly to preview.app and then I scan a document in black and white directly to the printer.
06/16/2020 at 11:17 •
After implementing a couple of features like lineart scanning and the option to scan to printer in grey and lineart modes, I thought it time to install the package on another macbook used around the house.
Installation isn't a typical drag and drop affair because there are some packages that need to be installed.
- Sane back-end
- Sane preference panel
All need to be installed, sane back-end needs to be configured to see your sane server and app security needs to be able to open anything before starting sanity. But if those conditions are met, the menu app starts up and should work.
For convenience I have uploaded a zip file with the sanity app and the software versions of Libusb and sane I used. While still the 1.1 version, this sanity install also has the option to scan lineart to screen and printer.
06/15/2020 at 14:30 •
Version one worked fine for people with the same user name as me! Rather a niche audience I feel. Yes, a path was hard-scripted in one of the files!
Version 1.1 fixes that and adds the direct to printer option which will scan a document and then push it via CUPS to the first or default printer. For my printer, I had to tweak the brightness level to get a good white, so depending on your hardware you might want to tweak that or other values.
The script for the scanity console is located in the app package/contents/resources/scanity.app/contents/resources/script
06/14/2020 at 13:58 •
So I want to make a front end that feels somewhat native to OSX. It should be simple and accessible. Seeing how stable and flexible the command line tool scanimage was working, I wanted to base it on that. So really all that I need to a nice dock or top bare menu item that calls scanimage in various ways. Not something I think firing up xCode for.
I remembered there was a software package that allowed to attach various scripting languages to a cocoa GUI environment called Platypus. It is not a full development environment, but it is really convenient if you want to start and control bash, python, perl or just about any scripting language with a nice interface. It outputs a small and elegant OSX app package that should work on any mac OSX 9 or higher.
What I did was really really simple. Basically I made 2 platypus apps. One is a bar menu object that presents the user with a couple of scan options. The second is an app that takes the necessary arguments runs the bash commands to scan an image and open the result in preview.
You can download the DMG file from the file section. It should work with any Mac with OS9 or higher and it should be able to work with any sane configuration as long as a scanner is detected.
Now it is still a bit hacky and rough around the edges, but altering the script behaviour is really easy, even without the Platypus profile data. The various scripts are editable in the resource package and that is the bulk of the behaviour.
Newer versions and the platypus profile will be available later.
06/14/2020 at 13:30 •
Turned out the sane web interfaces were as horrid and frustrating as the other ones, so there is nothing left to do but to either build a working front end or use the scanner in a sub optimal way that will certainly result in the machine being dumped in the attic at some point.
Now, what do I want when interfacing with a scanner on a mac? Do I want the same scanner interface I have seen since the first flatbed scanners I owned in the 90's? Those massive windows with a thousand options? No! The reason scanner software worked like that back then was because processing speed and storage where a thing. If you did not need to scan 1200DPI full A4 full colour uncompressed, then you tried to avoid it. Made sense then. Not now. Even with USB2 speeds and a moderately capable network, the loads are negligible.
It is perfectly reasonable in 2020 to simply request the entire page on any resolution and crop it afterwards. It is just as quick and far more convenient.
So, on a mac, what would be the ideal way to use a flatbed scanner? A simply short list of options that result in either a text or an image document opened in a suitable application. Basically I want to quickly command the scanner to scan 300DPI in greyscale and open it in preview where I can crop and save. That is all you really need for 99% of the time.