Ich hatte kürlich meinen alten Barcodescanner (noch mit DIN-Stecker!) in der Hand. Trotz DIN-PS/2-Adapter, aktivem PS/2-USB-Adapter und gutem Zureden konnte ich ihn nicht mehr zum ordnungsgemäßen Funktionieren bringen. Also habe ich mir folgende Alternative überlegt:
Zunächst habe ich meine alte Webcam, eine Logitech QuickCam Messanger (USB-ID 046d:08da) ausgegraben. Hat out-of-the-box mit dem Kernel-Treiber ZC3XX USB Camera Driver funktioniert (zu testen mittels mplayer tv:// o. Ä.). Natürlich geht auch jede andere unter Linux funktionierende Webcam!
Erwartungsgemäß bietet die Open-Source-Gemeinde ein handliches Programm, das aus einem Webcam-Stream Barcodes lesen kann (übrigens auch zweidimensionale, z. B. QR-Codes): zbar. Gentoo-Nutzer sollten darauf achten, den v4l-USE-Flag zu setzen, sonst wird nur die nackte Bibliothek erstellt, nicht das Tool, was wir brauchen.
Das mitgelieferte Tool zbarcam übernimmt das Übersetzen des Webcam-Streams in Barcodes und schreibt das Ergebnis auf STDOUT.
Jetzt wäre es ja aber zu umständlich, einen Barcode einzulesen, von der Konsolenausgabe zu kopieren und dort einzufügen, wo er hin soll. Deswegen brauchen wir ein zweites Helferprogramm: xvkbd. Das kann von STDIN lesen und nach STDOUT schreiben – dort hin, wo der Cursor gerade ist.
Den „Barcodescanner“ startet man mit zbarcam --raw | xvkbd -file -. Das Fenster von zbarcam vielleicht noch kleiner machen, immer in den Vordergrund stellen und in ein Eck schieben und dann kann’s losgehen :-)
I just uploaded a new bugfix release for b8. The destructor of the MySQL storage backend always disconnected the MySQL connection, even if an existing link-resource was passed to b8. Release 0.5.2 fixes this. Now, the MySQL connection is only disconnected if b8 created the resource itself. Thanks to Gerhard Waldemair for the bug report!
Everyone can safely update to the new version. It's not necessary if you didn't have any problems with the MySQL backend or use the Berkeley DB backend. Only b8/storage/storage_mysql.php has been changed.
I just released a little update for serienbrief. It only adds a README file with build and dependency information for users using a distribution without an official serienbrief package (perhaps each and every distribution except Gentoo Linux). Therefore, no new version number, just an -r1 added.
Nobody has to update to this version if 0.2.2 is being installed, as this really only is a documentation update.
I just uploaded the brand new release 0.5.1 of my PHP spam filter b8. It's mostly a bugfix release. Here are the bugfixes:
Fixed some issues with the scope of variables leading to problems when multiple instances of b8 are created. Thanks to Mike Creuzer for the bug report!
Return a lexer error code instead of a rating if the lexer failed. The lexer never returned FALSE but b8 checked only for this value to validate the lexer didn't fail. Thanks to Matt Friedman for the bug report!
Additionally, some code cleanup and changes have been done:
Centralized the loading of class definition files in the b8 constructor and created a function to handle the inclusion.
A bit of code cleanup in the lexer: less useless nesting.
Everybody should update to the new version. No changes to the configuration should be necessary if you used version 0.5 or 0.5-r1, just fill in the new code to your b8 directory :-)